Image Viewer for BTII

Any developer realated stuff
Post Reply
User avatar
Darendor
Posts: 1502
Joined: Wed Jan 14, 2009 1:53 am
Location: Red Deer, Alberta, Canada

Image Viewer for BTII

Post by Darendor »

So I thought I'd put to use some of the subroutines we've found so far. I figured a tour of the various pictures in the game would be kinda neat.

I tossed this code into 9a00 in the memory with the party standing in Tangramayne:

Code: Select all

.C:9a00  E6 C1       INC $C1
.C:9a02  A2 00       LDX #$00
.C:9a04  20 1B 08    JSR $081B
.C:9a07  E8          INX
.C:9a08  20 78 08    JSR $0878
.C:9a0b  C9 A0       CMP #$A0
.C:9a0d  F0 05       BEQ $9A14
.C:9a0f  4C 04 9A    JMP $9A04
.C:9a12  20 E1 08    JSR $08E1
.C:9a15  4C 00 90    JMP $9000
When I type "g 9a00" in the WinVICE monitor, it displays a picture, but the X register goes to like 6b or something, and when I press a key, it loads the temple picture. Pressing a key again just causes it to display the temple picture.

:?

Pressing SPACE exits the thing, like it should.

Any hints?
User avatar
Darendor
Posts: 1502
Joined: Wed Jan 14, 2009 1:53 am
Location: Red Deer, Alberta, Canada

Re: Image Viewer for BTII

Post by Darendor »

Aha, I got it.

Code: Select all

.C:9a00  A9 00       LDA #$00
.C:9a02  8D 1C 9A    STA $9A1C
.C:9a05  AD 1C 9A    LDA $9A1C
.C:9a08  AA          TAX
.C:9a09  20 1B 08    JSR $081B
.C:9a0c  20 78 08    JSR $0878
.C:9a0f  C9 A0       CMP #$A0
.C:9a11  F0 06       BEQ $9A19
.C:9a13  EE 19 9A    INC $9A1C
.C:9a16  4C 05 9A    JMP $9A05
.C:9a19  4C 00 90    JMP $9000f
It's crude, but it works. I dunno what the subroutine is to clear the picture window, but whatever.
Post Reply