ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ bra L6288 L6297 clr ,x bra L62D6 L629B cmpa #$08 Left arrow? bne L62AE cmpx >$2D75 beq L627B * 6809/6309 - BSR bsr L62DB dec >$2D77 leax -1,x bra L627B L62AE cmpa #$0D CR? bne L62B6 clr ,x bra L62D6 L62B6 cmpa #$20 Space? bhs L62BF lbsr L4039 bra L627B L62BF ldb >$2D77 cmpb >$2D74 blo L62CC lbsr L4039 bra L627B L62CC sta ,x+ Save char in buffer lbsr L6CF5 Also write it to the screen inc >$2D77 bra L627B L62D6 lbsr L6430 puls pc,u,y,x,b L62DB pshs u,y,x,d ldx #$2DC8 lbsr L6D07 Write out string @ X (NUL terminated) puls pc,u,y,x,d L62E5 pshs d sta >$2DCC L62EA lbsr L61C2 cmpa >$2DCC bne L62EA puls pc,d L62F4 pshs x,b ldb >$2DDD incb cmpb #$10 blo L62FF clrb L62FF cmpb >$2DDE bne L6306 puls pc,x,b L6306 stb >$2DDD ldx #$2DCD sta b,x puls pc,x,b L6310 pshs x,b ldb >$2DDE cmpb >$2DDD bne L631D clra puls pc,x,b L631D incb cmpb #$10 blo L6323 clrb L6323 stb >$2DDE ldx #$2DCD lda b,x puls pc,x,b * Get key in input buffer. * Exit: A=0 means no key pressed, CTRL-Z if ABORT or EXIT (CTRL C/E), otherwise * key itself. L632D pshs y,x,b inc >$2DE0 clra ldb #SS.Ready os9 I$GetStt bcc L633D Data ready on keyboard, skip ahead * 6809/6309 - add sleep for remainder of clock tick if no key pressed (multi-tasking friendly) ldx #1 Remainder of current time slice os9 F$Sleep Put Rogue to sleep for remaining time slice, to wait for another key clra Otherwise exit puls pc,y,x,b * Key in keyboard buffer L633D clra Read char from keyboard ldx #$2DDF ldy #$0001 os9 I$Read lda >$2DDF Get char adda >$2DE0 Add to ??? and store back sta >$2DE0 lda >$2DDF Get original key back cmpa #$03 ? beq L635E Yes, skip ahead cmpa #$05 ? beq L635E Yes, skip ahead puls pc,y,x,b Otherwise return with key in A L635E lda #$1A If abort or Exit, change to puls pc,y,x,b L6362 pshs x,d * 6809/6309 - replace two lines with ldx #$2DE0 / ldb ,x ldb >$2DE0 Get first byte in buffer ldx #$2DE0 Point to start of buffer L636A lda 1,x Get next byte, add to previous adda ,x sta ,x+ Save as new previous cmpx #$2DEC Done buffer? bne L636A No, keep going addb ,x Add original first byte to last stb ,x Save in last position * 6809/6309 - Since B is restore from stack after, we should be able to use D (instead of just A) * to shrink/speed this up. inc >$2DE0 lda >$2DE1 adda #2 sta >$2DE1 lda >$2DE2 adda #3 sta >$2DE2 lda >$2DE3 adda #5 sta >$2DE3 puls pc,x,d L6396 pshs u cmpd #$0000 beq L63A7 ldu >$2DE0 lbsr L3C5C * 6809/6309 - BSR lbsr L6362 L63A7 puls pc,u * I think this is the 8 bit random number generator. * Entry: A=highest # to generate * Exit: A=Random number (0 to original A) L63A9 pshs b tsta If RND range is 0 to 0, then just exit with A=0 beq L63B9 ldb >$2DE0 lbsr L3CA4 tfr b,a * 6809/6309 - BSR lbsr L6362 L63B9 puls pc,b L63BB tsta bne L63C1 clrb bra L63DC * 6809/6309 - std >$2DED L63C1 sta >$2DED stb >$2DEE clra clrb L63C9 pshs d clra ldb >$2DEE lbsr L6396 addd #$0001 addd ,s++ dec >$2DED bne L63C9 L63DC rts L63DD pshs u,y,x,d clra ldb #SS.ScSiz os9 I$GetStt Get current screen size * 6809 note: Could do sty >$37CB / tfr x,d / stb $37CB instead of next 4 lines. tfr x,d Move X size to D stb >$37CB Save copy tfr y,d Move Y size to D stb >$37CC Save copy lbsr L6D6F * 6809/6309 - BSR lbsr L6430 lbsr L6D30 lbsr L6C3B lbsr L6A96 clra clrb lbsr L6CDE CurXY to b,a puls pc,u,y,x,d L6405 pshs u,y,x,d lbsr L6869 clra clrb lbsr L65DF puls pc,u,y,x,d L6411 pshs u,y,x,d lbsr L6D6F lbsr L6C1D lbsr L6AA2 lbsr L66EE puls pc,u,y,x,d * Write 2 bytes @ >$2DEF to screen * 6809/6309 - Don't think we need to save U here. L6421 pshs u,y,x,d ldx #$2DEF ldy #$0002 clra os9 I$Write puls pc,u,y,x,d * Write 2 bytes @ >$2DF1 to screen * 6809/6309 - Don't think we need to save U here. L6430 pshs u,y,x,d ldx #$2DF1 ldy #$0002 clra os9 I$Write puls pc,u,y,x,d L643F pshs x,d sta >$2E11 lbsr L3F32 tsta beq L6452 ldd #$2000 std >$2E05 bra L648E L6452 lda >$2E11 lbsr L3F46 tsta bne L6487 ldb >$2E11 cmpb #$20 bhs L6475 addb #$40 pshs b ldu #$2E12 '^%c' pshs u ldx #$2E05 lbsr L3D23 leas 3,s bra L648E L6475 clra pshs d ldu #$2E16 ' %d>' pshs u ldx #$2E05 lbsr L3D23 leas 4,s bra L648E L6487 lda >$2E11 clrb std >$2E05 L648E ldu #$2E05 puls pc,x,d L6493 pshs u ldu #$2DF9 '****|- ' * 6809/6309 - BSR lbsr L649D puls pc,u L649D pshs u,y,x,d sty >$2E20 stx >$2E22 ldd >$2E20 incb lbsr L6CDE CurXY to b,a lda 5,u ldb >$2E23 subb >$2E21 decb stb >$2E1F * 6809/6309 - BSR lbsr L6532 lda >$2E22 ldb >$2E21 incb lbsr L6CDE CurXY to b,a lda 5,u ldb >$2E1F lbsr L6532 lda >$2E20 inca sta >$2E1F L64D5 lda >$2E1F cmpa >$2E22 bhs L64FE lda >$2E1F ldb >$2E21 lbsr L6CDE CurXY to b,a lda 4,u Get char lbsr L6CF5 Write to screen lda >$2E1F ldb >$2E23 lbsr L6CDE CurXY to b,a lda 4,u Get char lbsr L6CF5 Write to screen inc >$2E1F bra L64D5 L64FE ldd >$2E20 lbsr L6CDE CurXY to b,a lda ,u Get char lbsr L6CF5 Write to screen lda >$2E20 ldb >$2E23 lbsr L6CDE CurXY to b,a lda 1,u Get char lbsr L6CF5 Write to screen lda >$2E22 ldb >$2E21 lbsr L6CDE CurXY to b,a lda 2,u Get char lbsr L6CF5 Write to screen ldd >$2E22 lbsr L6CDE CurXY to b,a lda 3,u lbsr L6CF5 puls pc,u,y,x,d L6532 pshs x,b ldx #$4B34 L6537 sta ,x+ decb bne L6537 clr ,x ldx #$4B34 lbsr L6D07 Write out string @ X (NUL terminated) puls pc,x,b L6546 pshs u,y,x,d lbsr L6D6F lda >$37CC ldb >$37CB lbsr L3CA4 sta >$2E29 lda #$02 ldb >$37CC lbsr L3CA4 sta >$2E2A lda >$37CE sta >$2E27 clr >$2E25 lda #$01 sta >$2E26 lda >$37CD deca sta >$2E28 L6577 lda >$2E25 cmpa >$2E2A * 6809/6309 - BCC lbcc L65DA * 6809/6309 - ldd >$2E25 lda >$2E25 ldb >$2E26 lbsr L6CDE CurXY to b,a lda #$2A Write '*' to screen lbsr L6CF5 lda >$2E25 ldb >$2E28 lbsr L6CDE CurXY to b,a lda #$2A Write '*' to screen lbsr L6CF5 lda >$2E27 ldb >$2E26 lbsr L6CDE CurXY to b,a lda #$2A Write '*' to screen lbsr L6CF5 * 6809/6309 - ldd >$2E27 lda >$2E27 ldb >$2E28 lbsr L6CDE CurXY to b,a lda #$2A Write '*' to screen lbsr L6CF5 lbsr L3BAB approx .045 sec time delay (counting both). F$Sleep 2 or 3 ticks instead lbsr L3BAB inc >$2E25 lda >$2E26 adda >$2E29 sta >$2E26 dec >$2E27 lda >$2E28 suba >$2E29 sta >$2E28 * 6809/6309 - BRA lbra L6577 L65DA lbsr L6D6F puls pc,u,y,x,d * 6809/6309 - std >$355B L65DF sta >$355B stb >$355C rts L65E6 pshs x,b lda >$355B ldb #80 mul addd #$2E2B tfr d,x ldb >$355C abx lda ,x tst >$3571 bne L6610 ldx #$35A6 ldb #$C1 L6603 cmpa ,x+ beq L660E incb cmpb #216 blo L6603 bra L6610 L660E tfr b,a L6610 puls pc,x,b L6612 pshs u,y,x,d cmpa #$20 lblo L66D8 sta >$356D bpl L662E tst >$3571 bne L662E suba #$C1 ldx #$35A6 lda a,x sta >$356D L662E lda >$10DC cmpa >$3561 blo L6648 cmpa >$3562 bhi L6648 lda >$10DD cmpa >$3563 blo L6648 cmpa >$3564 bls L664E L6648 lbsr L678B lbsr L66EE L664E lda >$355C cmpa >$355D blo L66A7 cmpa #80 bhi L66C0 cmpa >$355E bhi L66A7 lda >$355B cmpa >$355F blo L66A7 cmpa #23 bhi L66C0 cmpa >$3560 bhi L66A7 lda >$355B ldb #80 mul addd #$2E2B tfr d,x ldb >$355C abx lda >$356D cmpa ,x beq L66BB sta ,x lda >$355C suba >$355D ldb >$355B subb >$355F addd #$2021 std >$356B clra ldx #$356A Point to buffer ldy #$0004 Write out 4 bytes to std out os9 I$Write bra L66BB L66A7 lda >$355B ldb #80 mul addd #$2E2B tfr d,x ldb >$355C abx lda >$356D sta ,x L66BB inc >$355C puls pc,u,y,x,d L66C0 lda >$355C pshs a lda >$355B pshs a ldu #$3572 'addch: bad coords. (%i,%i)' pshs u lbsr L68D8 * 6809/6309 - leas 4,s leas 2,s leas 2,s puls pc,u,y,x,d L66D8 pshs a ldu #$358D 'addch: bad chr. (ASC %i)' pshs u lbsr L68D8 * 6809/6309 - leas 3,s leas 2,s leas 1,s lda #$20 sta >$356D lbra L662E L66EE pshs u,y,x,d tst >$3570 bne L6754 lda >$355F Get line # on map screen ldb #80 * 80 chars/line for map mul addd #$2E2B Add to start of current map screen buffer tfr d,x Move to X ldb >$355D Get char # on current line on map screen abx ldd #$2021 Cursor position=0,1 std >$356B Save for CuyXY clra ldb >$37CB std >$35BD L6711 pshs x clra ldx #$356A Send CurXY command ldy #$0003 os9 I$Write ldx ,s Get back write buffer ptr ldy >$35BD Get length to write * 6809/6309 - BSR lbsr L6775 * 6809/6309 - leay ,y - 2 bytes shorter, same speed cmpy #$0000 Any map to draw? beq L6736 No, skip os9 I$Write cmpy >$35BD beq L6740 L6736 ldx #$3569 Clear to end of Line char ldy #$0001 os9 I$Write Clear remainder of screen line L6740 puls x leax <80,x inc >$356C lda >$356C suba #$20 cmpa >$356E bls L6711 puls pc,u,y,x,d L6754 ldd #$2021 Cursor position 0,1 std >$356B clra ldx #$356A Send CurXY command ldy #$0003 os9 I$Write clra ldx #$2E2B Point to buffer of currently known map for player ldy #$06E0 Size of map (80x22) lbsr L6775 Working from end, find first map char that is "active" os9 I$Write Write to screen puls pc,u,y,x,d Restore regs and return * Scan from end of known map until first "real" map char (no spaces). This allows * us to write only the # of bytes from the top of the map until we don't see * anything lower L6775 pshs x,d Preserve regs pshs x Save known map buffer ptr tfr y,d Move size of known map to D addd ,s++ Calculate end of map ptr tfr d,x Point to end of map L677F lda ,-x Get map char cmpa #$20 Space (unknown or nothing there)? bne L6789 No, real map piece, exit leay -1,y Dec size bne L677F Still more to check, keep going L6789 puls pc,x,d L678B pshs d lda >$37CB cmpa #80 bne L679D lda >$37CC cmpa #24 lbeq L6846 If full 80x24 go here (NOTE: do we need to LBHS for 80x25)? L679D lda >$10DD suba >$3566 bpl L67B8 clr >$355F clr >$3563 lda >$3565 sta >$3560 suba #$02 sta >$3564 bra L67EF L67B8 adda >$3565 cmpa #$15 bls L67D4 lda #$15 sta >$3560 sta >$3564 suba >$3565 sta >$355F adda #$02 sta >$3563 bra L67EF L67D4 lda >$10DD suba >$3566 sta >$355F adda #$02 sta >$3563 suba #$02 adda >$3565 sta >$3560 suba #$02 sta >$3564 L67EF lda >$10DC suba >$3568 bpl L680A clr >$355D clr >$3561 lda >$3567 sta >$355E suba #$02 sta >$3562 bra L6844 L680A adda >$3567 cmpa #$4F bls L6826 lda #$4F sta >$355E sta >$3562 suba >$3567 sta >$355D adda #$02 sta >$3561 bra L6844 L6826 lda >$10DC suba >$3568 sta >$355D adda #$02 sta >$3561 suba #$02 adda >$3567 sta >$355E suba #$02 sta >$3562 clr >$3570 L6844 puls pc,d L6846 clr >$355F Clear Y coord for current known map buffer clr >$3563 lda #$15 sta >$3560 sta >$3564 clr >$355D Clear X coord for current known map buffer clr >$3561 lda #79 sta >$355E sta >$3562 lda #$01 sta >$3570 puls pc,d L6869 pshs u,y,x,d pshs a lda >$37CC suba #$02 suba >$3660 sta >$356E suba #$01 sta >$356F deca sta >$3565 lda >$37CB deca sta >$3567 lda >$356F lsra sta >$3566 lda >$37CB lsra sta >$3568 clr >$355C clr >$355B lbsr L678B tst ,s+ beq L68A6 * 6809/6309 - BSR lbsr L68A8 L68A6 puls pc,u,y,x,d * Clear 1,840 bytes from $2E2B to $355A with $20 (80x23). (visible map+1 line) * 6809/6309 - don't preserve/restore Y or U - they are never changed L68A8 pshs u,y,x,d * 6809/6309 - replace next 3 lines with LDX #$355B * 6309 - TFM ldd #$2E2B addd #$0730 tfr d,x ldd #$2020 L68B5 std ,--x std ,--x std ,--x std ,--x cmpx #$2E2B bne L68B5 puls pc,u,y,x,d L68C4 pshs d lbsr L65DF tfr x,d tfr b,a lbsr L6612 puls pc,d L68D2 lbsr L65DF lbra L65E6 L68D8 tst [<$02,s] bne L68EC pshs d clra clrb lbsr L6CDE CurXY to b,a lbsr L6D78 Clear to end of line clr >$0D94 puls pc,d L68EC stu >$3642 * 6809/6309 - wouldn't a puls u be faster & same size? ldu ,s++ * 6809/6309 - BSR lbsr L68FD * 6809/6309 - wouldn't a pshs u be faster & same size? stu ,--s ldu >$3642 * 6809/6309 - change to BRA L6927 (rts from there), remove RTS lbsr L6927 rts L68FD stx >$3644 stu >$3646 std >$3648 ldx #$35BF ldb >$363F abx * 6809/6309 - wouldn't a puls u be faster & same size? ldu ,s++ lbsr L3D23 * 6809/6309 - wouldn't a pshs u be faster & same size? stu ,--s ldx #$35BF lbsr L3FE7 Get length of string @ X (NUL terminated) sta >$363F ldx >$3644 ldu >$3646 ldd >$3648 rts L6927 pshs u,x,d tst >$063D beq L6937 ldx #$0D0E ldu #$35BF lbsr L3FF3 L6937 tst >$0D94 beq L6955 tst >$364A bne L6945 clra lbsr L5088 L6945 clr >$364A clra ldb >$0D94 lbsr L6CDE CurXY to b,a ldx #$364B ' More ' lbsr L697B L6955 ldx #$35BF lda 1,x cmpa #$29 ')'? beq L696D lda ,x lbsr L3F0A tsta beq L696D lda ,x lbsr L3F5D sta ,x L696D lbsr L6996 lda >$363F sta >$0D94 clr >$363F puls pc,u,x,d L697B pshs u,y,x,d clra ldb >$3640 lbsr L6CDE CurXY to b,a lbsr L6D4C lbsr L6D07 Write out string @ X (NUL terminated) lbsr L6D42 L698D lbsr L61C2 cmpa #$20 ?Space? bne L698D puls pc,u,y,x,d L6996 pshs u,y,x,d ldd #$0000 std >$3654 stx >$3652 L69A1 ldx >$3654 ldy >$3652 lbsr L6A36 ldx >$3652 lbsr L3FE7 Get length of string @ X (NUL terminated) sta >$3658 sta >$363F lda >$3658 cmpa >$3641 bls L6A34 ldx #$3659 ' Cont ' * 6809/6309 - BSR lbsr L697B ldd >$3652 std >$3654 L69CB ldx >$3652 Get ptr to buffer to check L69CE lda ,x Get char? cmpa #$20 Is it a space? beq L69DC Yes, skip ahead leax 1,x No, bump ptr tsta Was char a NUL? bne L69CE no, keep looking ldx #$0000 Change ptr to 0 L69DC stx >$3656 Save ptr ldd >$3654 cmpd >$3652 bne L6A06 ldd >$3656 beq L69FA clra ldb >$3641 addd >$3654 cmpd >$3656 bhi L6A06 L69FA clra ldb >$3641 addd >$3654 std >$3652 bra L69A1 L6A06 ldd >$3656 * 6809/6309 - BEQ lbeq L69A1 clra ldb >$3641 addd >$3654 cmpd >$3656 * 6809/6309 - BLS lbls L69A1 ldx >$3652 lbsr L3FE7 Get length of string @ X (NUL terminated) cmpa >$3641 lbcs L69A1 ldd >$3656 addd #$0001 std >$3652 bra L69CB L6A34 puls pc,u,y,x,d L6A36 pshs u,y,x,d cmpx #$0000 bne L6A65 clra clrb lbsr L6CDE CurXY to b,a tfr y,x lbsr L3FE7 Get length of string @ X (NUL terminated) cmpa >$3641 bls L6A4F lda >$3641 L6A4F sta >$3640 ldb >$37CB lbsr L6D87 lbsr L3FE7 Get length of string @ X (NUL terminated) cmpa >$37CB bhs L6A94 lbsr L6D78 Clear to end of line bra L6A94 L6A65 pshs y cmpx ,s++ bhi L6A94 clra clrb lbsr L6CDE CurXY to b,a lbsr L3FE7 Get length of string @ X (NUL terminated) cmpa >$3641 bls L6A7B lda >$3641 L6A7B sta >$3640 ldb >$37CB lbsr L6D87 leax 1,x lbsr L3FE7 Get length of string @ X (NUL terminated) inca cmpa >$37CB bhs L6A65 lbsr L6D78 Clear to end of line bra L6A65 * 6809/6309 - Might be able to share some labels to shrink code (like one below) L6A94 puls pc,u,y,x,d L6A96 pshs u,y,x,d lda >$37CB suba #6 sta >$3641 puls pc,u,y,x,d L6AA2 pshs u,y,x,d lbsr L622D lda >$0D91 cmpa >$36F7 beq L6ACB sta >$36F7 * 6809/6309 - CLRA should be safe lda #$00 lbsr L6C95 cmpa #$FF beq L6ACB ldb >$0D91 clra pshs d ldu #$3701 'Level:%-2.2d' pshs u lbsr L6D16 leas 4,s L6ACB ldd >$10ED cmpd >$36FA beq L6B17 std >$36FA lda #1 lbsr L6C95 ldu >$10F1 pshs u ldu >$10ED pshs u ldu #$370E 'Hits:%.3d(%.3d)' pshs u lbsr L6D16 leas 6,s ldd >$10ED cmpd #100 bhs L6B17 cmpd #10 bhs L6B04 lda #$20 Write space to screen lbsr L6CF5 L6B04 lda #$20 Write space to screen lbsr L6CF5 ldd >$10F1 cmpd #100 bhs L6B17 lda #$20 Write space to screen lbsr L6CF5 L6B17 lda >$10E6 cmpa >$36FD beq L6B47 sta >$36FD lda #2 lbsr L6C95 clra ldb >$10A7 pshs d ldb >$10E6 pshs d ldu #$371E 'Str:%.2d(%.2d)' pshs u lbsr L6D16 leas 6,s cmpd #10 bhs L6B47 lda #$20 Write space to screen lbsr L6CF5 L6B47 ldd >$0D92 cmpd >$36F8 beq L6B6B std >$36F8 lda #$03 lbsr L6C95 cmpa #$FF beq L6B6B ldu >$0D92 pshs u ldu #$372D 'Gold:%-5.5u' pshs u lbsr L6D16 leas 4,s L6B6B ldx >$0DB1 * 6809/6309 - Redundant, remove CMPX cmpx #$0000 beq L6B78 lda <18,x bra L6B7B L6B78 lda >$10EC L6B7B cmpa >$36FC beq L6B9B sta >$36FC lda #$04 lbsr L6C95 ldb >$36FC subb #$0B negb sex pshs d ldu #$3739 'Armor:%-2.2d' pshs u lbsr L6D16 leas 4,s L6B9B lda >$10EB cmpa >$36FE beq L6BC5 sta >$36FE lda #5 lbsr L6C95 cmpa #$FF beq L6BC5 lda >$36FE deca lsla ldx #$0504 ldd a,x pshs d ldu #$3746 '%-12s' pshs u lbsr L6D16 leas 4,s L6BC5 lda >$0DA7 cmpa >$36FF beq L6BF2 sta >$36FF lda #6 lbsr L6C95 cmpa #$FF beq L6BF2 ldx >$36D1 lbsr L6D07 Write out string @ X (NUL terminated) lda #$06 lbsr L6C95 lda >$0DA7 Get hunger status beq L6BF2 If 0 (presume "normal"), skip ahead lsla *2 since 2 byte entries ldx #$36D1 Base of table ldx a,x Get ptr to hunger status string (which are spaces,Hungry,Weak,Faint,? in that order) lbsr L6D07 Write out string @ X (NUL terminated) L6BF2 lda >$1527 cmpa >$3700 beq L6C1B sta >$3700 lda #$07 lbsr L6C95 tst >$1527 beq L6C15 lbsr L6D4C ldx #$374C 'Fast' lbsr L6D07 Write out string @ X (NUL terminated) lbsr L6D42 bra L6C1B L6C15 ldx #$3751 ' ' lbsr L6D07 Write out string @ X (NUL terminated) L6C1B puls pc,u,y,x,d L6C1D ldd #$FEFE sta >$36F7 std >$36F8 std >$36FA * 6809/6309 - replace next 4 lines with std >$36FD / std >$36FF sta >$36FD sta >$36FE sta >$36FF sta >$3700 lda #$80 sta >$36FC rts L6C3B pshs u,y,x,d lda >$37CB Get # of columns wide window is cmpa >$3664 bhs L6C54 ldb >$3664 clra pshs d ldu #$3756 'Rogue will not run in a window less than %d columns wide.CRLF' pshs u lbsr L4186 * Another SWI ? swi L6C54 lda >$37CC Get window height cmpa #12 12 or more? bhs L6C69 yes, proceed ldd #$000C No, report error pshs d ldu #$3792 'Rogue will not run in a window less than %d rows tall.CRLF' pshs u lbsr L4186 swi L6C69 lda >$37CB Get columns wide window is ldx #$3664 Point to table of 6 widths (used as ranges, as in "up to") - 20,32,40,50,65,80 clrb L6C70 cmpa b,x blo L6C7B tst b,x beq L6C7B incb bra L6C70 L6C7B decb ldx #$366B Point to another table based on width entry # above (contains 2,2,2,2,2,1) lda b,x Get table value sta >$3660 Save it lda #8 mul std >$3662 Save value *8 (either 16 or 8) lda >$37CC suba >$3660 sta >$3661 puls pc,u,y,x,d L6C95 pshs x,d ldx >$3662 Get value (either 8 or 16) leax >$3671,x Point to other tbl based on that value ldb a,x Get entry from within 8 byte table block cmpb #$FF beq L6CB5 ldx >$3662 leax >$36A1,x lda a,x adda >$3661 lbsr L6CDE CurXY to b,a puls pc,x,d L6CB5 puls x,d lda #$FF rts * Set Foreground color to A. 6809/6309 - U should not need preserved L6CBA pshs u,y,x,d sta >$37D5 clra ldx #$37D3 ldy #$0003 os9 I$Write puls pc,u,y,x,d * Set Background color to A 6808/6309 - U should not need preserved L6CCC pshs u,y,x,d sta >$37D8 clra ldx #$37D6 ldy #$0003 os9 I$Write puls pc,u,y,x,d * CurXY to B,A L6CDE pshs y,x,d exg a,b Swap Y/X cursor coord we want addd #$2020 Add $20 to each for CurXY command std >$37D1 Save ($02 is preloaded from Rogue.dat) clra ldx #$37D0 Send CurXY ldy #$0003 os9 I$Write puls pc,y,x,d * Write 1 char in A to std in (out) L6CF5 pshs y,x,d sta >$37CF clra ldx #$37CF ldy #$0001 os9 I$Write puls pc,y,x,d * Write out string @ X (NUL terminated) L6D07 pshs y,x,d lbsr L3FE7 Get length of string @ X (NUL terminated) tfr a,b Move length to Y clra tfr d,y os9 I$Write puls pc,y,x,d L6D16 stu >$37D9 stx >$37DB * 6809/6309 - shouldn't this be PULS u? ldu ,s++ ldx #$35BF lbsr L3D23 * 6809/6309 - BSR lbsr L6D07 Write out string @ X (NUL terminated) * 6809/6309 - shouldn't this be PSHS u? stu ,--s ldu >$37D9 ldx >$37DB rts * 6809/6309 - change routine to: pshs d / ldd >$37CB / deca / decb / std >$37CD / puls d,pc L6D30 pshs a lda >$37CB deca sta >$37CD lda >$37CC deca sta >$37CE puls pc,a * Turn reverse video OFF. Could just ldx #$37DD/ldy #2/clra/os9 I$Write L6D42 pshs x ldx #$37DD * 6809/6309 - BSR lbsr L6D07 Write out string @ X (NUL terminated) puls pc,x * Turn reverse video ON. Could just ldx #$37E0/ldy #2/clra/os9 I$Write (and share with OFF above L6D4C pshs x ldx #$37E0 * 6809/6309 - BSR lbsr L6D07 Write out string @ X (NUL terminated) puls pc,x L6D56 pshs d pshs a lbsr L3FE7 Get length of string @ X (NUL terminated) pshs a ldb >$37CD subb ,s+ lsrb puls a lbsr L6CDE CurXY to b,a * 6809/6309 - BSR lbsr L6D07 Write out string @ X (NUL terminated) puls pc,d * Clear our window L6D6F pshs a lda #$0C Clear window * 6809/6309 - BSR after some of the above LBSR's are changed to BSR's lbsr L6CF5 puls pc,a * Clear from current cursor position to end of line L6D78 pshs a lda #$04 Clear to EOL lbsr L6CF5 puls pc,a L6D81 lbsr L6CDE CurXY to b,a * 6809/6309 - BRA (after above BSR's are replaced) lbra L6D07 * Write text out - if text <= window width, print whole thing, otherwise just to width of window L6D87 pshs y,x,d lbsr L3FE7 Get length of string @ X (NUL terminated) pshs a cmpb ,s+ ? Is it within width of window? bls L6D94 Yes, print full string tfr a,b No, set length to width of window instead L6D94 clra tfr d,y os9 I$Write puls pc,y,x,d L6D9C pshs y,x,d ldx >$10F5 ldb #$61 'a' L6DA3 cmpx #$0000 beq L6DB8 pshs b cmpa ,s+ bne L6DB2 tfr x,u bra L6DBD L6DB2 incb lbsr L3C39 bra L6DA3 L6DB8 stb ,u ldu #$0000 L6DBD puls pc,y,x,d L6DBF pshs u,y,x,d sta >$37E8 stx >$37E6 cmpx #$0000 bne L6DE3 ldb #$01 stb >$37E4 lda >$10DD ldb >$10DC lbsr L54E5 stx >$37E6 lbeq L7035 bra L6DE6 L6DE3 clr >$37E4 L6DE6 ldy >$10F3 lda 8,y anda #$02 bne L6DF4 lda #$C2 bra L6DF6 L6DF4 lda #$C3 L6DF6 sta >$37E3 tst <$15,x beq L6E5E ldy >$10F5 sty >$37E9 * 6809/6309 - leay ,y is 2 bytes smaller, same speed L6E06 cmpy #$0000 beq L6E5E lda <$15,x cmpa <$15,y bne L6E4E lda $E,x adda $E,y sta $E,y tst >$37E4 beq L6E3F ldu #$10F7 lbsr L6112 ldb >$37E3 clra tfr d,x ldb >$10DC lda >$10DD lbsr L68C4 lda >$10DD lbsr L3CF4 lda >$37E3 sta ,u L6E3F ldu >$37E6 lbsr L61A0 ldx >$37E9 stx >$37E6 lbra L6FD7 L6E4E ldx >$37E9 lbsr L3C39 stx >$37E9 * 6809/6309 - leay ,x - same size, 2 cyc faster tfr x,y ldx >$37E6 bra L6E06 L6E5E lda >$0D9A cmpa #$16 blo L6E72 ldu #$37ED pshs u lbsr L68D8 leas 2,s lbra L7035 L6E72 ldx >$37E6 lda 4,x cmpa #$CD bne L6EC5 lda $F,x cmpa #$06 bne L6EC5 lda <$13,x anda #$08 beq L6EBA ldu #$10F7 lbsr L6112 tfr x,u lbsr L61A0 ldb >$37E3 clra tfr d,x lda >$10DD ldb >$10DC lbsr L68C4 lda >$10DD lbsr L3CF4 lda >$37E3 sta ,u ldu #$380B 'the scroll turns to dust as you pick it up' pshs u lbsr L68D8 leas 2,s lbra L7035 L6EBA ldx >$37E6 lda <$13,x ora #$08 sta <$13,x L6EC5 inc >$0D9A tst >$37E4 beq L6EED ldu #$10F7 lbsr L6112 ldb >$37E3 clra tfr d,x lda >$10DD ldb >$10DC lbsr L68C4 lda >$10DD lbsr L3CF4 lda >$37E3 sta ,u L6EED clr >$37E5 ldx >$37E6 ldy >$10F5 sty >$37E9 * 6809/6309 - leay ,y is 2 bytes smaller, same speed L6EFB cmpy #$0000 * 6809/6309 - change to beq to ldy >$10F5 (L6F1D) beq L6F17 lda 4,x cmpa 4,y beq L6F17 tfr y,x lbsr L3C39 tfr x,y sty >$37E9 ldx >$37E6 bra L6EFB * 6809/6309 - leay ,y is 2 bytes smaller, same speed L6F17 cmpy #$0000 bne L6F46 * 6809/6309 - new label for above branch (skips 2nd cmpy/bne) L6F1D ldy >$10F5 sty >$37E9 * 6809/6309 - leay ,y is 2 bytes smaller, same speed L6F25 cmpy #$0000 beq L6F71 lda 4,y cmpa #$CC bne L6F71 sty >$37EB pshs x * 6809/6309 - leax ,y - same size, 2 cyc faster tfr y,x lbsr L3C39 * 6809/6309 - leay ,x - same size, 2 cyc faster tfr x,y puls x sty >$37E9 bra L6F25 L6F46 lda 4,x cmpa 4,y bne L6F71 lda $F,x cmpa $F,y bne L6F59 lda #$01 sta >$37E5 bra L6F71 L6F59 sty >$37EB pshs x * 6809/6309 - leax ,y - same size, 2 cyc faster tfr y,x lbsr L3C39 stx >$37E9 * 6809/6309 - leay ,x - same size, 2 cyc faster tfr x,y puls x * 6809/6309 - leay ,y is 2 bytes smaller, same speed cmpy #$0000 bne L6F46 * 6809/6309 - leay ,y is 2 bytes smaller, same speed L6F71 cmpy #$0000 bne L6F8E ldu >$10F5 bne L6F81 stx >$10F5 bra L6FD7 L6F81 ldu >$37EB stx ,u stu 2,x clr ,x clr 1,x bra L6FD7 L6F8E tst >$37E5 beq L6FAF lda 4,x lbsr L3C1B tsta beq L6FAF ldy >$37E9 inc $E,y ldu >$37E6 lbsr L61A0 ldx >$37E9 stx >$37E6 bra L6FD7 L6FAF ldx >$37E9 * 6809/6309 - replace lbsr with ldx 2,x (eliminate lbsr) lbsr L3C4D ldu >$37E6 stx 2,u * 6809/6309 - redundant - eliminate cmpx. cmpx #$0000 beq L6FC8 ldx >$37E6 ldu 2,u stx ,u bra L6FCE L6FC8 ldx >$37E6 stx >$10F5 L6FCE ldy >$37E9 sty ,x stx 2,y L6FD7 ldy >$10F9 sty >$37E9 * 6809/6309 - leay ,y - same speed, saves 2 cycles L6FDF cmpy #$0000 beq L700C ldu 10,y lda ,u ldx >$37E6 cmpa 5,x bne L6FFB lda 1,u cmpa 6,x bne L6FFB ldd #$10DC std 10,y L6FFB pshs x * 6809/6309 - leax ,y - faster tfr y,x lbsr L3C39 * 6809/6309 - leay ,x - faster tfr x,y sty >$37E9 puls x bra L6FDF L700C lda 4,x cmpa #$D5 bne L701A lda #$01 sta >$0637 sta >$0638 L701A tst >$37E8 bne L7035 lbsr L723E pshs a lda #1 lbsr L72B6 pshs u ldu #$3836 'you can now have %s (%c)' pshs u lbsr L68D8 leas 5,s L7035 puls pc,u,y,x,d L7037 pshs u,y,x,b stx >$388C sta >$388E stu >$388F clr >$3891 lda #$61 'a' sta >$38E2 L704A ldx >$388C beq L70BE lda >$388E beq L7086 cmpa 4,x beq L7086 cmpa #$FF bne L706E ldb 4,x cmpb #$CD beq L7086 cmpb #$CE beq L7086 cmpb #$D1 beq L7086 cmpb #$D2 beq L7086 L706E cmpa #$CF bne L7078 ldb 4,x cmpb #$CE beq L7086 L7078 cmpa #$D2 bne L70B0 lda <$14,x beq L70B0 lda <$12,x beq L70B0 L7086 inc >$3891 lda >$38E2 pshs a ldd #$3884 '%c) %%s' pshs d ldx #$3892 lbsr L3D23 leas 3,s ldx >$388C clra lbsr L72B6 ldy #$3892 ldd >$388F lbsr L7B5E cmpa #$20 space? bne L70E2 no, exit L70B0 inc >$38E2 ldx >$388C lbsr L3C39 stx >$388C bra L704A L70BE tst >$3891 bne L70DC tst >$388E bne L70CF ldu #$384B 'you are empty handed' pshs u bra L70D4 L70CF ldu #$3860 'you don't have anything appropriate' pshs u L70D4 lbsr L68D8 leas 2,s clra * 6809/6309 - replace with puls pc,u,y,x,b (same size, saves 3 cycles) bra L70E2 L70DC ldd >$388F lbsr L7D29 L70E2 puls pc,u,y,x,b L70E4 pshs u,y,x,d cmpa #$CB bne L7111 lda >$10DD ldb >$10DC lbsr L54E5 cmpx #$0000 beq L7118 ldd <$10,x lbsr L7267 ldu #$10F7 lbsr L6112 tfr x,u lbsr L61A0 ldy >$10F3 clr 6,y * 6809/6309 - replace with puls pc,u,y,x,d (same size, saves 3 cycles) bra L7118 L7111 ldx #$0000 clra lbsr L6DBF L7118 puls pc,u,y,x,d L711A pshs u,y,d stx >$3975 sta >$3977 clr >$3980 ldu #$1523 'on' lda ,u+ cmpa #$73 's'? bne L714F lda ,u+ cmpa #$65 'e'? bne L714F lda ,u cmpa #$6C 'l'? bne L714F ldx >$3975 ldu #$3969 'eat' lbsr L3FCD tsta beq L714F ldu #$396D 'drop' lbsr L3FCD tsta bne L715B L714F ldx #$1523 ldu #$3972 'on' lbsr L3FCD tsta bne L7160 L715B lda #$01 sta >$3980 L7160 lda >$05FD sta >$397F ldu >$10F5 bne L717B ldu #$38E3 'you aren't carrying anything' pshs u lbsr L68D8 leas 2,s ldx #$0000 lbra L723C L717B lda >$397C sta >$397A L7181 tst >$397F beq L7195 lda >$397A ldu #$397B lbsr L6D9C cmpu >$397D beq L71B6 L7195 tst >$3980 beq L71A1 lda #$2A '*' sta >$397A bra L71B6 L71A1 ldu >$3975 pshs u ldu #$3900 'which object do you want to %s? (* for list): ' pshs u lbsr L68D8 leas 4,s lbsr L61F7 sta >$397A L71B6 clr >$0D94 clr >$397F clr >$3980 lda >$397A cmpa #$2A '*'? beq L71CA cmpa #$3A ':'? bne L71EA L71CA ldx >$10F5 ldu >$3975 lda >$3977 lbsr L7037 sta >$397A bne L71E3 clr >$05FC ldx #$0000 bra L723C L71E3 cmpa #$20 Space? beq L7181 sta >$397C L71EA cmpa #$1A ? bne L7200 clr >$05FC ldu #$1470 pshs u lbsr L68D8 leas 2,s ldx #$0000 bra L723C L7200 lda >$397A ldu #$397B lbsr L6D9C stu >$3978 bne L7221 lda >$397B deca pshs a ldu #$392F 'please specify a letter between 'a' and '%c' pshs u lbsr L68D8 leas 3,s lbra L7181 L7221 ldx >$3975 ldu #$395C 'identify' lbsr L3FCD tsta beq L7239 lda >$397A sta >$397C ldx >$3978 stx >$397D L7239 ldx >$3978 L723C puls pc,u,y,d L723E pshs u,y,x,b lda #$61 'a' ldy >$10F5 * 6809/6309 - leay ,y is 2 bytes smaller, same speed L7246 cmpy #$0000 beq L7263 pshs x cmpy ,s++ * 6809/6309 - change to beq L7265, eliminate bra (let it fall through to L7255) bne L7255 bra L7265 L7255 inca pshs x * 6809/6309 - leax ,y is same size, faster tfr y,x lbsr L3C39 * 6809/6309 - leay ,x is same size, faster tfr x,y puls x bra L7246 L7263 lda #$3F '?' L7265 puls pc,u,y,x,b L7267 pshs u,y,x,d std >$399B ldy >$10F3 lda 8,y anda #$02 beq L727A lda #$C3 bra L727C L727A lda #$C2 ? Force object type to Gold? L727C sta >$399A ldd >$399B addd >$0D92 std >$0D92 ldb >$399A clra tfr d,x lda >$10DD ldb >$10DC lbsr L68C4 lbsr L3CF4 lda >$399A sta ,u ldd >$399B * 6809/6309 - Redundant; remove cmpd cmpd #$0000 bls L72B4 pshs d ldu #$3981 'you found %u gold pieces' pshs u lbsr L68D8 leas 4,s L72B4 puls pc,u,y,x,d * Special object checking goes here, I think L72B6 pshs y,x,d * 6809/6309 - leay ,x is same size, faster tfr x,y sta >$399D lda $F,y sta >$399E Save object sub-type (o_which) ldx #$4B34 lda 4,y Get object type (o_type) cmpa #$CD Scroll? bne L733F No, check for next type ldb $E,y cmpb #1 bne L72DB ldu #$399F 'A scroll ' lbsr L3FF3 leax 9,x bra L72ED L72DB clra pshs d ldu #$39A9 '%d scrolls ' pshs u lbsr L3D23 leas 4,s lbsr L3FE7 Get length of string @ X (NUL terminated) leax a,x L72ED lda >$399E Get scroll type ldu #$05FE Point to flag table of which scrolls players knows tst a,u Does player know this scroll? beq L730F No, use random gibberish or what player called them ldb #4 4 bytes per entry mul addd #$0156 Point to scroll names table tfr d,u ldu ,u Get ptr to scrolls real name pshs u Save it ldu #$39B5 'of %s' pshs u lbsr L3D23 leas 4,s bra L733C L730F lsla *2 for 2 bytes/entry ldu #$07ED Point to tbl for scroll names if not known to player tst [a,u] Check 1st byte at name ptr beq L7327 Nothing yet, skip ahead ldu a,u Get ptr to non-official name pshs u ldu #$39BB 'called %s' pshs u lbsr L3D23 leas 4,s bra L733C L7327 lda >$399E Get scroll type again (0-14) ldb #21 21 bytes per random gibberish scroll name mul addd #$0642 Point to gibberish name for scroll pshs d ldu #$39C5 'titled '%s' pshs u lbsr L3D23 leas 4,s L733C lbra L7691 L733F cmpa #$CE Potion? lbne L73EC ldb $E,y Get # of potions of this type? cmpb #1 If >1, skip to plural text bne L7355 ldu #$39D1 'A potion ' lbsr L3FF3 leax 9,x bra L7367 L7355 clra pshs d ldu #$39DB '%d potions ' pshs u lbsr L3D23 leas 4,s lbsr L3FE7 Get length of string @ X (NUL terminated) leax a,x L7367 lda >$399E Get potion type ldu #$060D Point to table of which potions player knows tst a,u Does player know this potion type? beq L7397 No, skip ahead * 6809/6309 - redundant, remove lda lda >$399E lsla *2 bytes per entry ldu #$077D Point to table of ptrs to potion names assigned by player ldu a,u pshs u lda >$399E Get potion type again ldb #4 4 bytes per entry mul addd #$0262 Point to table of ptrs to real potion names tfr d,u ldu ,u pshs u ldu #$39E7 'of %s(%s)' pshs u lbsr L3D23 leas 6,s bra L73E9 * Player doesn't know current potion type L7397 lsla ldu #$080B Point to player assigned name table for potions tst [a,u] Has player assigned name to it? beq L73B9 No, use potion color instead ldu #$077D Point to tbl of potion names assigned by player ldu a,u Get ptr to potion we are doing pshs u ldu #$080B Point to assigned name table ldu a,u Get that ptr pshs u ldu #$39F1 'called %s(%s)' pshs u lbsr L3D23 leas 6,s bra L73E9 L73B9 ldx #$4B34 ldu #$077D ldu a,u ldb $E,y Get # of potions of this type player has cmpb #1 If >1, use plural text bne L73DA pshs u lbsr L56E3 pshs u ldu #$39FF 'A%s %s potion' pshs u lbsr L3D23 leas 6,s bra L73E9 L73DA pshs u clra pshs d ldu #$3A0D '%d %s potions' pshs u lbsr L3D23 leas 6,s L73E9 lbra L7691 L73EC cmpa #$CC Slime Mold? bne L7445 lda >$399E cmpa #$01 bne L7427 ldb $E,y Get # of slime molds player has cmpb #1 >1, use plural text bne L7413 ldu #$150B 'Slime Mold' pshs u lbsr L56E3 pshs u ldu #$3A1B 'A%s %s' pshs u lbsr L3D23 leas 6,s bra L7442 L7413 ldu #$150B 'Slime Mold' pshs u clra pshs d ldu #$3A22 '%d %ss' pshs u lbsr L3D23 leas 6,s bra L7442 L7427 ldb $E,y Get # of food player has cmpb #1 >1, use plural text bne L7435 ldu #$3A29 'Some food' lbsr L3FF3 bra L7442 L7435 clra pshs d ldu #$3A33 '%d rations of food' pshs u lbsr L3D23 leas 4,s L7442 lbra L7691 L7445 cmpa #$CF Weapon? lbne L74F7 No, skip ahead ldb $E,y Get # of weapon player has cmpb #1 >1, use plural text bne L746B lda >$399E Get object # again lsla 2 bytes/entry ldu #$004B Point to tbl of ptrs to weapon names ldu a,u Point to specific weapon name lbsr L56E3 pshs u ldu #$3A46 'A%s ' pshs u lbsr L3D23 leas 4,s bra L7478 L746B clra pshs d ldu #$3A4B '%d ' pshs u lbsr L3D23 leas 4,s L7478 lbsr L3FE7 Get length of string @ X (NUL terminated) leax a,x lda <$13,y ??? Maybe weapon is a +/-? anda #$02 beq L74A9 lda >$399E Get weapon object # again lsla 2 bytes/ptr to weapon name ldu #$004B Start of weapons name tbl ldu a,u Point to specific weapon name pshs u * 6809/6309 - ldd <$10,y lda <$10,y ldb <$11,y ldu #$00CF lbsr L899A pshs u ldu #$3A4F '%s %s' pshs u lbsr L3D23 leas 6,s bra L74BE L74A9 lda >$399E Get object # lsla 2 bytes/ptr ldu #$004B Start of weapons name tbl ldu a,u Point to specific weapon name pshs u ldu #$3A55 '%s' pshs u lbsr L3D23 leas 4,s L74BE ldb $E,y Get # of weapon player has cmpb #1 If just one, skip ahead beq L74CA ldu #$3A58 's' (add s for plural) lbsr L3FFD L74CA tst <$14,y ?Special weapon flag set? beq L74F4 No, skip ahead lda <$13,y ?Yes, check for specific special types? anda #$40 beq L74F4 No, skip ahead ldu #$3A5A ' of ' lbsr L3FFD lda <$14,y Get special type suba #$41 ldb #18 mul addd #$10FB tfr d,u ldu ,u lbsr L3FFD ldu #$3A5F ' slaying' lbsr L3FFD L74F4 lbra L7691 L74F7 cmpa #$D0 Armor? bne L754E lda <$13,y anda #$02 beq L7536 ldb <$12,y subb #$0B negb clra pshs d lda >$399E Get armor type # lsla 2 bytes per ptr ldu #$00C7 Point to tbl of ptrs to armor names ldu a,u Get ptr to our armor type pshs u lda >$399E Get armor type again ldu #$014E Point to ???? armor table lda a,u Get entry suba <$12,y clrb ldu #$00D0 Some other table lbsr L899A pshs u ldu #$3A68 '%s %s [armor class %d]' pshs u lbsr L3D23 leas 8,s bra L754B L7536 lda >$399E Get armor type # lsla 2 bytes per ptr ldu #$00C7 Point to tbl of armor names ldu a,u Get ptr to our armor type pshs u ldu #$3A7F '%s' pshs u lbsr L3D23 leas 4,s L754B lbra L7691 L754E cmpa #$D5 Amulet of Yendor? bne L755B ldu #$3A82 'The Amulet of Yendor' lbsr L3FF3 lbra L7691 L755B cmpa #$D2 Wand/Staff? lbne L75F8 No, skip ahead lda >$399E Get object # lsla * 2 bytes for ptrs ldu #$07D1 Point to table of ptrs to ??? (wands) ldu a,u Get ptr to specific wand name pshs u lbsr L56E3 pshs u ldu #$3A97 'A%s %s ' pshs u lbsr L3D23 leas 6,s ldu #$4B34 lbsr L3FE7 Get length of string @ X (NUL terminated) leax a,x lda >$399E Get object # again ldu #$0629 Point to ??? Wand table tst a,u Has it been identified? beq L75B8 No, skip ahead * 6809/6309 - redundant, A not reloaded. Remove lda lda >$399E lsla * 2 per tbl entry ldu #$07B5 ldu a,u Get ptr to wand name assigned by player pshs u lbsr L8688 pshs u lda >$399E Get object # again ldb #4 4 bytes/entry mul addd #$043C Point to specific entry of our wand type tfr d,u ldu ,u Get ptr to wands real name pshs u ldu #$3A9F 'of %s%s(%s)' pshs u lbsr L3D23 leas 8,s bra L75F5 L75B8 lsla * 2 bytes/ptr ldu #$0843 Point to player assigned wand name ptrs tst [a,u] Has player named it? beq L75DA no, use unidentified name ldu #$07B5 Yes, get ptr to player assigned name ldu a,u pshs u ldu #$0843 ldu a,u pshs u ldu #$3AAB ' %s' pshs u lbsr L3D23 leas 6,s bra L75F5 L75DA ldx #$4B36 ldu #$07D1 ldu a,u pshs u ldu #$07B5 ldu a,u pshs u ldu #$3AB9 pshs u lbsr L3D23 leas 6,s L75F5 lbra L7691 L75F8 cmpa #$D1 Ring object type? bne L7669 No, skip ahead lda >$399E Get ring type # ldu #$061B Has this ring type been seen before? tst a,u beq L762E No, skip ahead lsla ldu #$0799 Point to player assigned name ptr tbl ldu a,u Get ptr pshs u lda >$399E Get ring type # ldb #4 4 bytes/entry mul addd #$034C Point to start of ring name tbl tfr d,u ldu ,u Get ptr to real ring name pshs u lbsr L9667 pshs u ldu #$3ABF 'A%s ring of %s(%s)' pshs u lbsr L3D23 leas 8,s * 6809/6309 - BRA L7691 bra L7666 L762E lsla ldu #$0827 Point to player assigned ring name ptrs tst [a,u] Has player named this one? beq L7650 No, use default unidentified ring name ldu #$0799 ldu a,u pshs u ldu #$0827 Get ptr to player assigned ring name ldu a,u pshs u ldu #$3AD2 'A ring called %s(%s)' pshs u lbsr L3D23 leas 6,s * 6809/6309 - BRA L7691 bra L7666 L7650 ldu #$0799 Point to ring name ptr tbl ldu a,u Get ptr for our ring pshs u lbsr L56E3 pshs u ldu #$3AE7 'A%s %s ring' pshs u lbsr L3D23 leas 6,s * 6809/6309 - BRA L7666 lbra L7691 L7669 cmpa #$CB Gold object? bne L767F No, skip ahead ldu <$10,y pshs u ldu #$3AF3 '%u gold pieces' pshs u lbsr L3D23 * 6809/6309 - Change next to lines to BRA L768F (new label) leas 4,s lbra L7691 L767F lda $F,y pshs a lda 4,y pshs a ldu #$3B02 'Something bizarre [o_type:%i],[o_which:%i]' (you should never see this) pshs u lbsr L3D23 L768F leas 4,s * After special object processing above, they all come here (post object descriptions) L7691 cmpy >$0DB1 bne L769D ldu #$3B2D ' (being worn)' lbsr L3FFD L769D cmpy >$0DB7 bne L76A9 ldu #$3B3B ' (weapon in hand)' lbsr L3FFD L76A9 cmpy >$0DB3 bne L76B5 ldu #$3B4D ' (on left hand)' lbsr L3FFD L76B5 cmpy >$0DB5 bne L76C1 ldu #$3B5D ' (on right hand)' lbsr L3FFD L76C1 tst >$399D beq L76DA lda >$4B34 lbsr L3EF6 tsta beq L76DA lda >$4B34 lbsr L3F6C sta >$4B34 bra L76F1 L76DA tst >$399D bne L76F1 lda >$4B34 lbsr L3F0A tsta beq L76F1 lda >$4B34 lbsr L3F5D sta >$4B34 L76F1 ldu #$4B34 puls pc,y,x,d L76F6 pshs u,y,x,d lda >$10DD ldb >$10DC lbsr L3BBB cmpa #$C2 beq L7715 cmpa #$C3 beq L7715 ldu #$3B73 'there is something there already' pshs u lbsr L68D8 leas 2,s puls pc,u,y,x,d L7715 ldx #$3B6E 'drop' clra lbsr L711A cmpx #$0000 bne L7723 puls pc,u,y,x,d L7723 lbsr L77AC tsta bne L772B puls pc,u,y,x,d L772B lda $E,x cmpa #2 blo L776F lda 4,x cmpa #$CF beq L776F pshs x lbsr L6162 * 6809/6309 - leau ,x - same size, faster tfr x,u puls x cmpu #$0000 bne L7752 ldu #$3B94 'can't drop it, it appears to be stuck in your pack!' pshs u lbsr L68D8 leas 2,s puls pc,u,y,x,d L7752 dec $E,x pshs u,x lda #$1F exg u,x lbsr L3C51 puls u,x lda #1 sta $E,u * 6809/6309 - leax ,u - same size, faster tfr u,x tst <$15,x beq L7775 inc >$0D9A bra L7775 L776F ldu #$10F5 lbsr L6112 L7775 dec >$0D9A ldu #$10F7 lbsr L6138 lda >$10DD ldb >$10DC lbsr L3CF4 lda 4,x sta ,u ldd >$10DC std 5,x lda 4,x cmpa #$D5 bne L7799 clr >$0637 L7799 lda #1 lbsr L72B6 pshs u ldu #$3BC8 'dropped %s' pshs u lbsr L68D8 leas 4,s puls pc,u,y,x,d L77AC pshs u,x cmpx #$0000 bne L77B7 lda #1 puls pc,u,x L77B7 cmpx >$0DB1 Same as armor worn object ptr? beq L77CF cmpx >$0DB7 Same as weapon wielded object ptr? beq L77CF cmpx >$0DB3 Same as left hand ring object ptr? beq L77CF cmpx >$0DB5 Same as right hand ring object ptr? beq L77CF lda #1 puls pc,u,x L77CF lda <$13,x anda #$01 beq L77E3 ldu #$3BD3 'you can't. It appears to be cursed' pshs u lbsr L68D8 leas 2,s clra puls pc,u,x L77E3 clra clrb cmpx >$0DB7 Same as weapon wielded object ptr? bne L77EF No, check next std >$0DB7 Save as new weapon wielded object ptr bra L782C L77EF cmpx >$0DB1 Same as armor worn object ptr? bne L77FC No, check next lbsr L873F std >$0DB1 Save new armor worn object ptr bra L782C L77FC cmpx >$0DB3 Same as ring on left hand object ptr? bne L7806 No, check next std >$0DB3 Save new ring on left hand object ptr bra L7810 L7806 cmpx >$0DB5 Same as ring on right hand object ptr? bne L782C std >$0DB5 Save new ring on right hand object ptr bra L7810 L7810 lda $F,x cmpa #1 bne L781F lda <$12,x nega lbsr L55F0 bra L782C L781F cmpa #4 bne L782C lbsr L5FC3 ldu #L5FC3+PrgOffst-$1B2 (#$BE11) lbsr L5EA2 L782C lda #1 puls pc,u,x L7830 pshs u,d lbsr L6162 cmpx #$0000 bne L783C puls pc,u,d L783C clr <$10,x clr <$11,x ldd #$3BF7 '0d0'? (maybe) std $A,x std $C,x lda #$B sta <$12,x lda #$01 sta $E,x clr <$15,x clr <$13,x clr <$14,x lda >$0D9C cmpa #3 bls L7866 lda #$02 bra L786E L7866 ldu #$1454 lda #$07 lbsr L79C9 * 6809/6309 - TSTA L786E cmpa #$00 bne L7883 lda #$CE sta 4,x ldu #$0262 Point to potion name table lda #$0E lbsr L79C9 sta $F,x lbra L79C7 L7883 cmpa #$01 bne L7898 lda #$CD sta 4,x ldu #$0156 Point to ??? lda #$0F lbsr L79C9 sta $F,x lbra L79C7 L7898 cmpa #$02 bne L78B7 clr >$0D9C lda #$CC sta 4,x lda #$0A lbsr L63A9 tsta beq L78B0 clr $F,x lbra L79C7 L78B0 lda #$01 sta $F,x lbra L79C7 L78B7 cmpa #$03 bne L78FE lda #$CF sta 4,x lda #$0A lbsr L63A9 sta $F,x lbsr L893F lda #$64 lbsr L63A9 cmpa #10 bge L78EA lda <$13,x ora #$01 sta <$13,x lda #3 lbsr L63A9 adda #$01 nega adda <$10,x sta <$10,x bra L78FB L78EA cmpa #$0F bge L78FB lda #$03 lbsr L63A9 adda #$01 adda <$10,x sta <$10,x L78FB lbra L79C7 L78FE cmpa #$04 bne L7957 lda #$D0 sta 4,x lda #$64 lbsr L63A9 ldu #$0146 clrb L790F cmpa b,u blt L7918 suba b,u incb bra L790F L7918 stb $F,x ldu #$014E lda b,u sta <$12,x lda #$64 lbsr L63A9 cmpa #$14 bhs L7942 lda <$13,x ora #1 sta <$13,x lda #3 lbsr L63A9 adda #1 adda <$12,x sta <$12,x bra L7954 L7942 cmpa #$1C bge L7954 lda #3 lbsr L63A9 adda #1 nega adda <$12,x sta <$12,x L7954 lbra L79C7 L7957 cmpa #5 bne L79A5 lda #$D1 sta 4,x ldu #$034C lda #$0E lbsr L79C9 sta $F,x cmpa #1 beq L7979 * 6809/6309 - tsta cmpa #$00 beq L7979 cmpa #$07 beq L7979 cmpa #$08 bne L7992 L7979 lda #$03 lbsr L63A9 sta <$12,x bne L7990 lda #$FF sta <$12,x lda <$13,x ora #$01 sta <$13,x L7990 bra L79A2 L7992 cmpa #$06 beq L799A cmpa #$0B bne L79A2 L799A lda <$13,x ora #1 sta <$13,x * 6809/6309 - BRA L79A2 lbra L79C7 L79A5 cmpa #$06 bne L79BD lda #$D2 sta 4,x ldu #$043C Point to tbl of pointers for wands lda #$0E * 6809/6309 - BSR lbsr L79C9 sta $F,x lbsr L7D34 * 6809/6309 - BRA lbra L79C7 L79BD ldu #$3BFB 'Picked a bad kind of object.' pshs u lbsr L68D8 leas 2,s L79C7 puls pc,u,d L79C9 pshs u sta >$3C18 lda #$64 lbsr L63A9 clrb L79D4 cmpa 2,u blt L79DF suba 2,u incb leau 4,u bra L79D4 L79DF tfr b,a cmpa >$3C18 blt L79F1 ldu #$3C19 'Picked a bad object out of this list ' pshs u lbsr L68D8 leas 2,s clra L79F1 puls pc,u L79F3 pshs u,y,d lda #$CE * 6809/6309 - BSR lbsr L7A11 lda #$CD * 6809/6309 - BSR lbsr L7A11 lda #$D1 * 6809/6309 - BSR lbsr L7A11 lda #$D2 * 6809/6309 - BSR lbsr L7A1E ldd #$1470 lbsr L7D29 puls pc,u,y,d * 6809/6309 - BSR L7A11 lbsr L7A1E ldd #$1470 ldy #$3C3F lbra L7B5E L7A1E pshs u,y,x,d sta >$3C41 cmpa #$CD Scroll? bne L7A32 lda #$0F ldy #$05FE Point to tbl of flags of known scroll types ldu #$07ED Point to tbl of scroll names assigned by player bra L7A5D L7A32 cmpa #$CE Potion? bne L7A41 lda #$0E ldy #$060D Point to tbl of flags of known potion types ldu #$080B Point to tbl of potion names assigned by player bra L7A5D L7A41 cmpa #$D1 Ring? bne L7A50 lda #$0E ldy #$061B Point to tbl of flags of known ring types ldu #$0827 Point to table of ring names assigned by player bra L7A5D L7A50 cmpa #$D2 Wand? bne L7A5D lda #$0E ldy #$0629 Point to tbl of flags of known wand types ldu #$0843 Point to table of wand names assigned by player L7A5D ldx #$3C68 * 6809/6309 - BSR lbsr L7AD4 sta >$3C47 sty >$3C42 stu >$3C44 ldx #$3C49 lda #$01 sta $E,x clr <$13,x clr >$3C48 clr >$3C46 L7A7D lda >$3C46 cmpa >$3C47 bhs L7AC1 lda >$3C46 ldu #$3C68 lda a,u ldu >$3C42 tst a,u bne L7A9C lsla ldu >$3C44 tst [a,u] beq L7ABC L7A9C lda >$3C41 sta $04,x lda >$3C46 ldu #$3C68 lda a,u sta $F,x clra lbsr L72B6 ldd #$1470 ldy #$3C81 '%s' lbsr L7B5E inc >$3C48 L7ABC inc >$3C46 bra L7A7D L7AC1 tst >$3C48 bne L7AD2 lda >$3C41 lbsr L7B12 ldd #$1470 lbsr L7B5E L7AD2 puls pc,u,y,x,d L7AD4 pshs d sta >$3C84 clra L7ADA sta a,x inca cmpa >$3C84 blo L7ADA lda >$3C84 sta >$3C85 L7AE8 lbsr L63A9 sta >$3C86 lda >$3C85 deca ldb a,x pshs b lda >$3C86 ldb a,x lda >$3C85 deca stb a,x puls b lda >$3C86 stb a,x dec >$3C85 lda >$3C85 bne L7AE8 puls pc,d L7B12 pshs u,x,d pshs a ldx #$4B34 ldu #$3C87 'Haven't discovered anything' pshs u lbsr L3D23 leas 2,s lbsr L3FE7 Get length of string @ X (NUL terminated) leax a,x puls a cmpa #$CE Potion? bne L7B33 ldu #$3CA3 'potion' bra L7B4C L7B33 cmpa #$CD Scroll? bne L7B3C ldu #$3CAA 'scroll' bra L7B4C L7B3C cmpa #$D1 Ring? bne L7B45 ldu #$3CB1 'ring' bra L7B4C L7B45 cmpa #$D2 Wand? bne L7B4C ldu #$3CB6 'stick' L7B4C pshs u ldu #$3CBC ' about any %ss' pshs u lbsr L3D23 leas 4,s ldy #$4B34 puls pc,u,x,d L7B5E pshs u,y,x std >$3CCC sty >$3CCE stu >$3CD0 lda #$20 sta >$3CD2 clr >$3CD3 ldd >$3CCE lbne L7BFE lda #$01 sta >$3CD3 tst [>$3CCC] beq L7BD7 lda >$37CB cmpa #$2C bhs L7BBE cmpa #$1E bhs L7BA4 lda >$37CE deca clrb lbsr L6CDE CurXY to b,a ldu #$3CD4 -Select item-CRLF-Esc to cancel-' pshs u lbsr L6D16 leas 2,s lbra L7CBA L7BA4 lda >$37CE deca clrb ÄTPÎx†U—qŽTŸrÿ@¶ÿ!„÷·ÿ!½g´ †ø½bpŽÌUUíŒ%ù¶ÿ…&ùÌøýŽÿçæ„Å@& Ìèçæ„Å@&†à—w½f4_¶ €&Z×WÌTÝHŽŸ@† —LŽaŸU†ÿ—K—vÆ Ž&†o€J&û½cZ&ó†—DEƆŽ4Žu>½b}†Æ E½b}DÆ ½TÞ½TÞÆ½TÞ½TÞÆÆ ÄTÄÆÆ Æ 4E½bƒ Eæä½bƒ5„Žgt¿ †5·ÿP½eнc ½c3Ž-½cÆ#½h›3Æ4D½g`½d‚½e¹½cc& Žÿ×KÖKç… 5D'&&Á$×½d0†`§Â\ž@¦§ Ç %ýd0Š@§ÀZ&¹ž@¦§„oâÆ½h›Î~nŽÀ½c3½c>'çä½c>'¦äçäÆ =ëàÁ"ÄUˆÑ×X÷,ƽh•YP½eÐJÆ×GZ×y–Y'×JŽ † o€J&û J½eÐP J½bdŽo€Œ-%ùÞ)Žs%濾„§€Œtº%óŽyo€ŒS%ù½fÜ y*Æ×y ½Y'Žr‡Î –y¦†§ÀƽgFá_'÷çÀƽgFá^'÷á_'óçĽX½Xh½YêŽØŽtº†½g`ÁÀ" ƽgFË Æ ½gF=:ìÎs%3ÄVL˦Ą€&כЀ§Äì„§!ç#ìí%ìí'1© –%·—?†ÿ—x P½eÐ G'C½ZZ½b+, eÌÿÿ×÷×(÷-÷@×3Ý8Ý4–J%Ý8Ý4Ý6ŽyÌÿ—1©ç¤ &ö9O½g`X$L~g`½g`Ê€9Žzî¨ì!Ýì#݆—B—D~Yê–x'½Xh /Žz_–&í!–%íÄW#¦¸ „ϧ¸ ®+¦„Š0§„¯)†§-†ÿ§¤—†—D—B®½aʽg`¶ÿ…&ö½aÑïŽÿ†û§¦„„@&$4P†¿§f„$už†ý§æ„Ä@&솧æ„Ä@&â5–(&–x&½eІ½hL†½d˜J&ú~V}½]`ŽzÆ×B×D¦-&–š$*½eã ŽXI4æ¤*9—~Z«j-46ž+&}®+¦'DDC…'ÄWÔCDD&öŒ(¦„…'bÎXD4@ŠóC'¦„ŠüC')9½g`Ä'†½hL̽fDŽ@†§¨¦¸ „ó§¸ D~a0†½h)Ö1†<=Ý+̽fDŽ-†§¨¦¸ „ü§¸ D~`j56½V㦤&½[I½\d½`½`Õ½^½g`–'ù~WGŽzÌví!Ý—&Ì í#Ý—%Ì—D×BÎ=0ï.†ÿ§¤3ÉúÀ﨎sgÄX˜¯+¯)9ŽáOΠ¦À0‰@O¦À0‰@–='ßO¦Ä 4T5ÔÎ_ ΀4½d´0Ë5Π¦Æ4 Ž|”ÆD=1«†—Î}èìÁCS¤‰ä‰ª ê í„í‰ìÁCS¤‰ä‰ª ê íí‰0ˆ &Í5 Žâ†—#44–#—Îzª–yÆ¥=3ˆ!—B†—7ª„êí‰í &ð¦Àª„ÄY\§„§‰0ˆ B&Û504 &Ã550‰ý" #&¯94Tî.½d´–B—–D'0ÜBXX=3Ë설ÀäÀª‰ê‰í„ì¤ÀäÀª‰ê‰í0ˆ &Ù5ÔÜBH›B=3Ë설ÀäÀª‰ê‰턦¤Àª‰§0ˆ &ß5Ô4`Üí!Üí#½d´ÜB D'.XX=3Ë설É@ªÀäÉ@êÀí„ì¤É@ªÀäÉ@êÀÄZ í0ˆ B&Ù5àH›B=3Ë–BÆ=†=21«ì„¤ ªÀä êÀ턦¤ ªÀ§0ˆ B&å5àŽz†—D—B½Y€DŽŒ¦¤+½]@1©ŒÅ#ïŽ-¦¤+½X.ަ¤+½_ަ¤+½_ÊŽ@¦¤+~X9½Y€Î4ƨ–H=3Ëï¨3É@ï.¦¸ „笠 Žs!–¦†®+0†¦„Ч„¯)Žs–ÆÄZäç¤HH0†ì„í%ìí'9\N½Y€½Yêì'Àí'j¤94VŽz¦¸ „'î)£ &¦„«¤' ¦„ &†½hLO!C5Ö xÎpÀ½l;½g`Ä'†½h/9†ÿ—§¤x¦#—%¦!—&Îqˆ½l;®)æ„+~¦—('ɦ„Š0§„¦¸ „ϧ¸ –>&K–=&¦+ ¦…@&y…€'Š@§†_½fF #†  #Š€§Ä[¨†_½fF†½XÏ—B½Yê–#'U @æÅ 'OÈ€*L #Œ #ç ÔÊ ç À†½h/ŽØ$Ć=l… ?–w„ï·ÿ"Ž ÿ½dš–w·ÿ"–; †<§-ì)í+o"o$9–J‹J&û–?'J&û½d˜½d˜|,#~Uµ4̽fDŒ4†_½fF5‚ì%ã!Ýì'ã#Ü%OÝ9J—9†—ŽyÄ\lD1©† —B¦-&uÎ>øï.Î>€ï¨¦¤+'9ž+&Y½[ $(½Zó¦¤&d®)¦Š š§ ®+¦„𧆠—B½Y€½\ j¨'v =ž+& ½]ö®+¦„û§Žs!æ…®+:¯)¦Š§½ZÝ î¨ Ü+&÷j-Î?pì!Ýì#ݽYê &ÿc9Ü+&ûž6&ñ–/Æ<=Ý6Ì,í#Žs—_"+†i0Œ†‰íÄ]0!¯+o¤†§¨ É ņ —BD®+¦„ð§®)¦„„𧄆ÿ§¤½Y€o-9†—Æ–=ŽØ1«†—BD½Y€¦¤*~]ïÎ@À–Z„Æ=3Ëì!Ýì#Ýï.3È ¦¤'P½\N½YꆗB Dì%ýì'ýŽz#"'$½Y€¦¸ „§¸ ŽØ–Æ=:c„½Xh½[I—B ½\N½Y€½Yê *ÿÄ]ôo9½g`ÄË×9Ž–2+=' Ü+&! 2'Ç –3'Ü+& 39–2& ¦-'Ü+&j-ÎCHì!Ýì#݆ —'—B~YêÎB”ï.ÎAà暴—'—BD¦¤+X'/Ü+&Ͻ[ $(½Zó¦¤&®+¦„?§®)¦ŠÀ§†—B—'½Y€~\ 9Ü+& ½]öj¨'?Žs!æ…®+:¯)¦Š@§®+¦„¿§~ZÝÜ+&Ä^¸Ì,í#Žs—_"+†i0Œ†‰í!¯+o¤†§¨9†Z—29†½h)¶·ü ýü € ýüý&½_ 292Žo-®+¦„?§–'—B~Y€†—B½Y€öÑ% ¶‘& Á‚%–„ý—_–„'Ì@Ý 9ަ-'%Ü+&j-ÎH(Ü 3Ëï.3Éþ°ï¨ì!Ýì#݆—B~YêÜ+&ݦ¤'nÄ_|ÎEˆÜ 3Ëï.ÎD83Ë暴—BD½Zó¦¤&q®)¦Š0§®+¦„ϧ®)¦„&,̽fDÎpÀ½l;½g`Ä&†½hL–:—32†ÿ·¾$¦„ϧ†—BD½Y€~\ ½_Žs!–憮+0…¯)¦Š§®+¦„ï§~Zݽ[ $(9ž8'9DŽ-¦-'Ü+&j-ÎO¨ì!Ýì#݆ —B~YêÎO0ï.ÎÄ`@N¸ï¨† —B¦¤+V'2Ü+&Õ½Zó½[ $½X¦¤&µ¦¸ Ч¸ ¦¸ „ü§¸ † —B½Y€j¨'I~\ Ü+&£½]öŽs!æ…®+:¯)¦„Ч„¦¸ „þ§¸ ~ZÝÜ+&Ì,í#Žs—_"+†i0Œ†‰í!¯+o¤†§¨9†ÿ§¤–.Æ<=Ý8o-9ž4'9DŽ@¦-'–+&j-î¨ì!Ýì#݆—B~YꆗB¦¤+Äa’'?Ü+&Þ½Zó½[ $½Wô¦¤&¾¦¸ Š §¸ O®)æÅ@&VÅ€&Y¦¸ „ó§¸ †—B½Y€j¨'x~\ Ü+&Ÿ½Y€½]öŽs!æ…®+:¯)¦„Ч„¦¸ „û§¸ ŽP˜ÖÀ'0‰P¯¨0‰¨¯.~ZÝÄ¿ #L Ä =& #ç½XÊ ˜Ü+&Ì)í#Žs—_"+†i0Œ†‰í!¯+o¤†§¨9–0Æ<=Ý4†ÿ§¤oÄaÈ-9ÎrO Žw 4Ì4Þ)æäïZ&û0ˆJ&ó5”Ì4æä®Á¯Z&÷0ˆJ&ï5„ŽWË–>' Æ"½h›Îr –=' ƽh›Îqß Æ½h›Îq§ŽWºŽ ÆZo„o0ˆ Z&öŽ ÖG'†—BÎu¦À§„¦À§0ˆ B&ñZ&ç9–wŽ4o‚Œ"ù·ÿ"·ÿÀ·ÿ÷ÿÅ9J&û94FOíã4 DÄbŒ' o# E'c#Œo" E'c" D' ¦§"ì„0Œìmd'(þ E'FVf" D'f#þ E'FVf" D'f#jd Ôí¤ D'1$Œ1#¦ä§dje&5VL&’ D'Xëa:5ÆX:5ƆÎ``ïJ&û9½g`ĽdŸž@Î~,ž@9†·ÿ"·ÿÀ·ÿ·ÿÄ9 ŒŸ@¦À*÷„~d0_½cQ 'é‰À0Á "ð~dÄcP04½d‚½cc'øÆ`çŸ@5”4TM5ÔÎÿŽMOJ4§B!SiB$åläh§a¨„¤„æaç€M'êæBçbÆøËD$û–W' Á0$Ë Á0%À0ëä'GÁ"EÊ@)'–v&Ê çäžU½dšÆÿL&æb¡a5&&vO5†§B¦Ä„@9çB¦ÄŠ€mB+ŠÀ9Æ3ŽcæÁ!%ŽcÈÁ0$ØÁ+#ˆ@M'®Ë ªXÄdÈ&\æ…  ^_ [ ] 0 \@4ž@& Œ'C†`§‚ % & †`§€Å&ö  %)M+ @%`%„߈@§€Ÿ@Œÿ#Žìˆ íŒà%öÆ`,5– L&Æ ×Lž@¦„‹Ч„ŽaŒž)0&ü9½g`ÊŒÆ`ŽŸ@瀌ÿ#ù9æ!ÄT×Cæ!¦#DVDVDVÃ9P–X·,† §âÎÄdØ;Ž&4TƦÀ¡€&Z&÷5T"ƒ;# ƦÀ§ÈêZ&ø 3Èjä&Ó¦à' % ½h ½h "½h$3Èëƒ&# Ʀ€§ÀZ&ù½c Î~ ½c3Æ Î㎒†14VƦÀ‹p§€Z&÷¦À #Æq‹f Æ`‹pç§0ˆè¦ä§†æÀç€J&ù5V0ˆ 3ÈëLZ&ÃŽÂÎ~†½c3½d˜ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ!"#$ÈÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿCUBIXV BIN êÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ*Æ!½h•ž)½ccY'ÄeœöÿÅ'N'ïO\'îP0&â Ù~U•ÎôŽ~¿Æ ¶ó K+¦€§ÀZ&ò9ÖzÎÿ¦Ä„÷T$ЧÁ9¶ÿ §âQŽÆ×ßÌ@€—Ê÷ÿ ȶÿ+ЌۖD&æç‚ÖZ*Øì„XYYYHYHYHYŽr‹¦à·ÿ ¦…—Ö{½eÒöÿ#Ê öÿ#Ä÷÷ÿ#94pž)Î,0Z%¯í¦‚Y©ÂÄf`‰„§ÄXXX*5Œ"&0¶&$)–G$#4V†½hL G½bÎq¥½l;¶,L#†·,?5VŒ "µŽƒo↧â¦À&æa&0 lajä&ì5öÆ=ÃrËÆ¦ §„0ˆ Z&ö0‰ÿ!9>=ö,T×<ÖJTTÁ#ÆTË ×;–J% = %D% >=ö,SÄTT4ÖJÁ#ÆSÄTTëàçâTÄg$Ë×/Ë×1æäSÄË×.æäTTË×0æà\XXX×:94OÝtCY%Ct øtÔtÑu"ø5’4žH0Œ~Ë%ŽTŸHæ„5¶ÿ Z ž+'0Œx&†½hLŸ+ ž8'0Ÿ8ž4'0Ÿ4ž6'0Ÿ6_¶ÿ~…@&Æ×{;ÌÎÿ~§_½h¶ç_½h¶Žd1„†S§Ä¦Ä*0&ø 1?'¦Ä*øÆ×z×{oÄZÄgè*½d¥ŽÎhÞ½c3ƽd˜Z&ú̽huZJ&ùoĽh¶Æ½eÒ~f4Ž~dšÌ  Æ qÌ 4Æ 4ÆŒ4]'½gFëäŒ4¶ÿ~„@'O*Œ4Öz'‹Ð/5–4"ŽizX®…‹¦€' øO!C5–4ß%5–† † 4-}ÿ~*û·ÿ~#54 4þ4¶ÿ~H+ ¶ÿ~H*Äh¬ú½d˜5% ‰Žd~dš4O—ºO„5–4† µŽ-Ʀ€¬Z&ù5–THIS PROGRAM WOULD SOUND A LOT BETTER IF YOU WOULD INSTALL THE TANDY SPEECH/SOUND CARTRIDGE. A TALKING GAME SOUNDS MUCH BETTER THAN ONE WHICH CANÄip'T SPEAK.iÂiÔißiìi÷jjjj8jCjTjlj‡jžj¨jÂjÑjæjúkkkk+k7kBkHkTk_kek€k‘k§k¼kõll)DARN BLAST CURSESCLOES CALLNEAR MIIISSSWATTCH OUTGOTCH UHSO LONG SNAYKBO NIS AWARDEDU HAVE THE TOP SCORE 2 Äj4DAYGUHD SCOREWELL PLAYED GAYMKEEP UP THE GUHD WORKGUHD EFFORT KEEP TRYINGBETTER LUCK NEXT TIMEAHMA CHERNO PLACE TO GO BUT UPR U ASLEEPHERE COMES THE SNAYKSSSS SSSS SSSS SSSÄjøSFREEZ FRAYMTTIME OUTFFREE RIDESSPIN OUTGGOINN UPDDISK AWAYBY BYUHH ORONG TURNWOUPSPLEASE CHOOSE SKILL LEHVILWELCUM 2 CUBIX 2 HITS I AM REDDEE1 HIT I AM REDDEEÄk¼CUBIX COPYRIGHT 9 TEEN 8 T 4 SPECTRAL ASSOE SHEE ETSDO U WANT 2 PLAY ANOTHER GAYMTOGGLE I AM REDDEEWHAT IS YOUR NAYM47PO—[—`—e—j†ÿ·ÿ¶ÿD%–p&g7ƒÿÿ']Ý^76ÝcŸhŸm7—oO_Ý\ÝaÝfÝkŽSž[Äl€¦‰lÀž`«‰mÀže«‰nÀžj«‰oÀŠ·ÿ Ü\Ó^Ý\ÜaÓcÝaÜfÓhÝfÜkÓmÝk1?&Ç o&¿ÿŠ5· !#%')+-.0235679:;<<=>>???????>>=<<;:987653210.-,+)('&%#"!  !"#$$%&''()**++,,-----------,,++*))('&%$##"! ÄmD !!""###$$$$$$$###""!    "%'*,.024689;<=>>?????>>=<;:98764320/.,+*)('&&%$$$############$$$$$$%%%Än%%%%%%$$$$$$$######"""""""""""""""""""""""""""""!!!!!    !"#$%'()*+,ÄnÌ-./01234567889::;;<<==>>>>??????????>>>>===<<;;::9988766544322100/..-,,+**))(''&&%%%$$###"""!!!!!   Äo  !"##$%&&'())*+,,-../001223345566778899::;;;<<<====>>>>>???????????????>>>>>====<<<;;;::998877665543322100/..-,,+*))('&&%$##"! ÄpT  ÜÍÜ! – á • næîÄqKðJ·s÷ˆ%ø¥[ÿÿ VÍûÿÿÿÿ<0Ïð0ÏÏüÃ<Ì0ÃÀÃ<Ì0ÃÀÃ3ÏÀ?ÃÀÃ3Ì0ÃÀÃ3Ì0ÃÀ<0Ïð0ÄqÜÏÀÀüÀÃÀÃ???0ÀÌ0à 00ÀÌ0à 00ÌÌ0ÿ ?0ÌÌ0à 0ÌÌ0à 03ÀÃ? ?ü<Ãÿ0Ã0 À0Ã0 À0Ã3Ìóü0Ã0Ì3À0Ã0Ì3À0<ÃüÿðÿÀÀÀ À Ã0ÀÀ À à 3ðü03 30À?ó  À030  ÿ03À ÿÿÿÿÿÿÿÿÄr ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿpˆˆˆˆˆp ` ppˆp€€øpˆ0ˆpøø€€ððp€€ðˆˆpø @@@pˆˆpˆˆppˆˆxpÿúÐúÐÿý°ý°ÐÖ*0Äsd Ät(ZXÿ<˜ÿ¨ÿHJ/°ÿf¨/ÿ2ÿx:F°ÿ¸FÿPÿ¨*]Ätì°ÿºÈ]ÿPÿØt°ÿäØtÿPÿ ‹°ÿè‹ÿPÿ8 ¸ˆª ªªª*ª¨¨‚¨¨ØØØØØX(ª‚ª€¢ª€¢ª *ª  ª  ª  ª  ª ª€ª€ª€ªfffffv`€  *¨ *¨ ªª ªª€ªªªªªªªª*¨*¨*¨   À À ÀÄu° À À ÀÐøúÚŠ€"Š€"ª€*ª€(ª€"ª€*ª€Š*ˆª"¨¬ÌÌÌÌÌÌ, /¸-º¨´¨¢ª¢ªªªŠª¢ªª*(€*ˆ€ ¢ €€€€€ þÿ8??€ààààø?ø?ø?þÿÿÿÿÿÿÿÿÿüÄvtÿüÿàÿ€€?ÿÿÿÿ€ÿ€ÿ€ÿàÿàÿàÿàÿàÿàÿàÿàÿÀÿÀ?€?€?€?€?€?€???ÿÿˆÿøÿþÿþÿþÿøÿøÿøÿàÿ€ÿÿÿÿÿÿÿÿ??€?€?ÀÿÀÿÀ?ÿÀ?ÿÀ?ÿÀÿÀÿÀÿÄw8@@]PUPUPU@@ÀÀÀÀ@@UPUP@ÿÿÀÀÀÀÿÿð0,p¦ÕÁWj: ððÀ€€Àðð5 e&૪iF1LððÀ€€Àð  *¨*¨ªªºªºªªªªªªªªªªªª‚*˜*¨  À€Äwü€À  *¨*¨ºªºªªªªª*€*  À€€À € ð¨( Ѝ( (( ¨ˆ  Š*¢( (  ¨(((  €à?àÀÀÀÀÿàÿàø À€€€€ààà€€€€€àøÃÀÀà € ð¨( Ѝ ¨ˆÄxÀ *¢( (¨ ¨   €ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿà?àÀÀÀÀà€€€à€€€€€ÀÀÀàà  *°*°    £€*°(((* "€  à¢ Š¨( (* (€((0  €øÀ€€ÿÿ?€€€€€€‚?ƒÇ€ààÄy„à  *°(° £€*°* "€  Ѝ(*(* €0  €ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿøÀ€€€€€€€ààà?€Àÿàÿàÿàþ À8€ÀÀ?€Àÿàþ À8€ÿÿñÿÀÀ?ÀÌðÿðÕð÷ðÿðÄzH € € € € € €óÀÀ? ??Àó0ÿðõpýðÿð € € € € € €<ðÀ?@PTUUU@UUPUUTUUUUUUUT€õUUR€ýUUJ€ÿUU*€ÿÕTª€ÿõRª€ÿýJª€ÿÿªª€ÿÿªª€ÿÿªª€ÿÿªª€ÿÿªÄ{ ª€ÿÿªª€ÿÿªª€ÿÿªª€ÿÿªª€ÿÿªª?ÿª¨ÿª ÿª€ÿª?¨ €@DDD@DDDDDDD@QTDDD@UUDD@@UQUTD@UUUU@@UU@UU@@UU@UU@@UU@UU@@UU@UU@@U@Ä{ÐU@U@U@@ADP€ ˆ""ˆˆ€"" ˆˆˆ""""ˆˆˆˆ€¢"""¨ˆˆˆ€ª"" ªˆˆ€€ª¢"ª¨ˆ€ªª ªª€€ªª€ªª€€ªª€ªª€€ªª€ªª€€ªª€*ª€ ª€ª€ ª€€*‚ ˆ €Ä|”@DDD@DDDDDDDDDDDD@D@€ ˆ""ˆˆ€"" ˆˆˆ""""ˆˆˆˆ""""ˆˆˆ"" ˆˆ€""ˆÄ}X €@PTUUU@UUPUUTUUTUUUUUUTUUTUUPUU@UTP@€  ¨*ªªª€ªª  ªª¨*ªªªªªªª*ªªª ªª¨ªª ªª€*ª ¨ €€àø?þÿÿ€ÿÿàÿÿø?ÿÿþÿÿÿÿ?ÿÿþÿÿøÿÿàÿÿ€±~?þøà€CUBIX VER 1.3 COPR. 1984 SPECTRAL ASSOCIATES WHAT'S YOUR NAME?ENTER SKILL LEVEL (0-15©PLAY ANOTHER GAME (Y OR N© NAME SCORE LEVELDOUBLE`SPEED9ÿT®+¦„𧆠—B½Y€½\ j¨1C3 ldx #$3FD7 lbsr L268D * 6809/6309 - BRA L81C9 lbra L8215 L81CC cmpa #$02 beq L81DA cmpa #$03 beq L81DA cmpa #$04 * 6809/6309 replace 2 lines with bne L8215 (equal falls through to L81DA) beq L81DA bra L8215 L81DA lda >$3FDB cmpa #$02 bne L81E9 ldd #$3E91 'bolt' std >$3FD9 bra L81FB L81E9 cmpa #$03 bne L81F5 ldd #$3E96 'flame' std >$3FD9 bra L81FB L81F5 ldd #$3E9C 'ice' std >$3FD9 L81FB ldu #$10DC ldy #$0DAF ldd >$3FD9 lbsr L8313 lda >$3FDB ldb #$01 ldu #$0629 stb a,u * 6809/6309 - redundant - remove LBRA lbra L8215 L8215 ldx >$3FD3 dec <$12,x lda <$12,x * 6809/6309 - redundant - remove cmpa cmpa #$00 bhs L8225 clr <$12,x L8225 puls pc,u,y,x,d L8227 pshs u,y,x,d clr >$40C2 lda >$10DD ldb >$10DC lbsr L3BBB cmpa #$CA bne L824C lda >$10DD lbsr L3BC6 anda #$0F ldb #$22 mul addd #$0EED std >$40C5 bra L8252 L824C clr >$40C5 clr >$40C6 L8252 ldy >$10F3 lda 8,y anda #$02 sta >$40C4 ldu #$4072 ldx >$10F9 L8263 cmpx #$0000 beq L82A3 ldd <$1B,x cmpd >$10F3 beq L829A cmpd >$40C5 beq L829A tst >$40C4 beq L829E lda 5,x ldb 4,x lbsr L3BBB cmpa #$CA bne L829E lda 5,x lbsr L3BC6 anda #$0F ldb #$22 mul addd #$0EED cmpd >$10F3 bne L829E * 6809/6309 - replace 2 lines with stx ,u++ L829A stx ,u leau 2,u L829E lbsr L3C39 bra L8263 L82A3 stu >$40C7 tfr u,d subd #$4072 ldu #$0002 exg d,u lbsr L3C5C stu >$40C2 cmpu #$0000 bne L82C8 ldu #$400B 'you have a tingling feeling' pshs u lbsr L68D8 leas 2,s * 6809/6309 - replace with L8311 puls pc,u,y,x,d bra L8311 L82C8 ldu >$40C7 clra clrb std ,u ldu >$10ED ldd #$0002 lbsr L3C5C stu >$10ED ldd >$40C2 lbsr L3C5C leau 1,u stu >$40C2 ldu #$4072 L82E9 ldx ,u * 6809/6309 - this will now branch to above version L8311 label beq L8311 ldd <$15,x subd >$40C2 std <$15,x * 6809/6309 - redundant, remove cmpd cmpd #$0000 bgt L8304 lbsr L25F0 lbsr L3A1C bra L830D L8304 pshs x leax 4,x lbsr L268D puls x L830D leau 2,u bra L82E9 * 6809/6309 - Move line and label up to just before L82C8 L8311 puls pc,u,y,x,d L8313 pshs u,y,x,d stu >$41B7 sty >$41B9 std >$41BB ldd ,y std >$41B5 ldx >$41BB ldu #$40C9 'frost' lbsr L3FCD tsta bne L8334 lda #$01 bra L8335 L8334 clra L8335 sta >$41B4 lda #$CF sta >$4199 lda #$0A sta >$41A4 ldd #$40CF '6d6' std >$41A1 std >$419F * 6809/6309 - Replace next 3 lines with ldd #$1e00 / std >$41A5 lda #$1E sta >$41A5 clr >$41A6 ldd >$41BB std >$005F lda >$41B6 adda >$41B5 * 6809/6309 - redundant, remove CMPA cmpa #$00 bne L836B lda #$2F '/' sta >$4189 * 6809/6309 - BRA lbra L8398 L836B cmpa #$01 beq L8375 cmpa #$FF * 6809/6309 - replace 2 lines with bne L8386 (eq falls through to L8375) beq L8375 bra L8386 L8375 lda >$41B6 Determine if horizontal or vertical blast; change char appropriately beq L837E lda #$7C '|' bra L8380 L837E lda #$2D '-' L8380 sta >$4189 * 6809/6309 - BRA lbra L8398 L8386 cmpa #$02 beq L8390 cmpa #$FE * 6809/6309 - Change following 2 lines to bne L8398 (fall through to L8390) beq L8390 bra L8398 L8390 lda #$5C '\' sta >$4189 * 6809/6309 - Redundant - remove lbra lbra L8398 L8398 ldu >$41B7 ldd ,u std >$4193 cmpu #$10DC bne L83A9 clra bra L83AB L83A9 lda #$01 L83AB sta >$418C clr >$418D clr >$418E clr >$418F L83B7 lda >$418F cmpa #6 lbhs L8639 tst >$418D lbne L8639 lda >$41B6 adda >$4194 sta >$4194 ldb >$41B5 addb >$4193 stb >$4193 lbsr L5AF2 sta >$4188 ldd #$4193 ldu #$10DC lbsr L5A95 tsta beq L83F0 lda #$C1 sta >$4188 L83F0 lda >$418F ldb #3 mul addd #$41BF tfr d,u ldd >$4193 std ,u lda >$4194 ldb >$4193 lbsr L68D2 pshs a lda >$418F ldb #3 mul addd #$41C1 tfr d,u puls a sta ,u cmpa >$4189 bne L8421 clr ,u L8421 lda >$4188 cmpa #$CA beq L8446 cmpa #$C4 beq L8446 cmpa #$C5 beq L8446 cmpa #$C6 beq L8446 cmpa #$C7 beq L8446 cmpa #$C8 beq L8446 cmpa #$C9 beq L8446 cmpa #$20 * 6809/6309 - replace 2 lines with bne L8473 (eq falls through to L8446) beq L8446 bra L8473 L8446 tst >$418E bne L8458 tst >$418C bne L8455 inc >$418C bra L8458 L8455 clr >$418C L8458 clr >$418E neg >$41B6 neg >$41B5 ldd >$41BB pshs d ldu #$40D9 'the %s bounces' pshs u lbsr L68D8 leas 4,s lbra L8633 L8473 tst >$418C lbne L855C lda >$4194 ldb >$4193 lbsr L2CDB stx >$418A lbeq L855C lda #1 sta >$418C tst >$418E bne L8499 inc >$418E bra L849C L8499 clr >$418E L849C lda 9,x cmpa #$40 beq L84AD lda >$4194 ldb >$4193 lbsr L3BBB sta 9,x L84AD lda #$03 tfr x,y lbsr L37D3 tsta beq L84BC tst >$41B4 beq L851A L84BC ldd >$4193 std >$419A lda #1 sta >$418D lda 7,x cmpa #$44 'D' (Dragon?) bne L84EA ldu #$40D3 'flame' pshs x ldx >$41BB lbsr L3FCD puls x tsta bne L84EA ldu #$40E8 'the flame bounces off the dragon' pshs u lbsr L68D8 leas 2,s lbra L860D L84EA stx >$418A ldx #$4195 lda >$4194 ldb >$4193 lbsr L8978 lda >$4194 lbsr L68D2 cmpa >$4189 lbeq L860D pshs a lda >$418F ldb #3 mul addd #$41C1 tfr d,u puls a sta ,u lbra L860D L851A lda #$58 'X' (Xeroc?) cmpa >$4188 bne L852A ldx >$418A cmpa 8,x lbne L860D L852A ldd >$41B7 cmpd #$10DC bne L8539 ldx #$4193 lbsr L268D L8539 lda >$4188 suba #$41 ldb #18 mul addd #$10FB tfr d,u ldd ,u pshs d ldd >$41BB pshs d ldu #$4109 'the %s whizzes past the %s' pshs u lbsr L68D8 leas 6,s lbra L860D L855C tst >$418C lbeq L860D ldd #$4193 ldu #$10DC lbsr L5A95 tsta lbeq L860D clr >$418C tst >$418E bne L857E inc >$418E bra L8581 L857E clr >$418E L8581 lda #3 lbsr L37F4 tsta bne L85FE tst >$41B4 beq L85AD ldu #$4124 'You are frozen by a blast of frost from the Ice Monster' pshs u lbsr L68D8 leas 2,s lda >$0D98 cmpa #$14 bhs L85E3 ldd #$0007 lbsr L5870 addb >$0D98 stb >$0D98 bra L85E3 * 6809/6309 - ldd #$0606 L85AD lda #$06 ldb #$06 lbsr L63BB pshs d ldd >$10ED subd ,s++ std >$10ED * 6809/6309 - redundant, remove cmpd cmpd #$0000 bgt L85E3 ldd >$41B7 cmpd #$10DC bne L85D3 lda #$62 lbsr L0716 * Another SWI? swi L85D3 ldu >$41B7 lda 1,u ldb ,u lbsr L2CDB lda 7,x lbsr L0716 * Another SWI? swi L85E3 lda #$01 sta >$418D tst >$41B4 bne L860D ldd >$41BB pshs d ldu #$415C 'you are hit by the %s' pshs u lbsr L68D8 leas 4,s bra L860D L85FE ldd >$41BB pshs d ldu #$4172 'the %s whizzes by you' pshs u lbsr L68D8 leas 4,s * 6809/6309 - next 4 lines - this appears to be useless? Both cases lbsr L3C50 and then run L861A? L860D tst >$41B4 beq L8617 lbsr L3C50 Just an RTS??? bra L861A * 6809/6309 - this is just an RTS? Eliminate L8617 lbsr L3C50 Just an RTS? L860D lbsr L3BAB Approx 2-3 tick time delay ldb >$4189 Get frost/fire, etc. char (\,|,/,-) clra Put into D pshs x Save x, but 16 bit char into x tfr d,x lda >$4194 ldb >$4193 lbsr L68C4 puls x lbsr L3C50 L8633 inc >$418F lbra L83B7 L8639 clr >$4191 L863C lda >$4191 cmpa >$418F bhs L8686 lbsr L3BAB ldb #3 mul addd #$41C1 tfr d,u tst ,u beq L8681 lda >$4191 ldb #3 mul std >$41BD addd #$41C0 tfr d,u lda ,u pshs a ldd >$41BD addd #$41BF tfr d,u ldb ,u puls a lbsr L65DF ldd >$41BD addd #$41C1 tfr d,u lda ,u lbsr L6612 L8681 inc >$4191 bra L863C L8686 puls pc,u,y,x,d L8688 pshs y,x,d lda <$13,y anda #$02 bne L8698 ldu #$41F1 clr ,u bra L86AB L8698 ldb <$12,y clra pshs d ldd #$41E3 ? ' [%d charges]' pshs d ldx #$41F1 lbsr L3D23 leas 4,s L86AB ldu #$41F1 puls pc,y,x,d L86B0 pshs u,x,d ldd >$0DB1 beq L86C6 ldu #$420A 'you are already wearing some. You'll have to take it off first.' pshs u lbsr L68D8 leas 2,s clr >$05FC puls pc,u,x,d L86C6 ldx #$4205 'wear' lda #$D0 Armor object type lbsr L711A cmpx #$0000 beq L8704 lda 4,x cmpa #$D0 Is it an armor type? beq L86E5 Yes, skip ahead ldu #$424A 'you can't wear that' pshs u lbsr L68D8 leas 2,s puls pc,u,x,d * 6809/6309 - BSR L86E5 lbsr L873F lda <$13,x ora #$02 sta <$13,x lda #1 lbsr L72B6 pshs u ldu #$425E 'you are now wearing %s' pshs u lbsr L68D8 leas 4,s stx >$0DB1 L8704 puls pc,u,x,d L8706 pshs u,x,d ldx >$0DB1 bne L871C clr >$05FC ldu #$4275 pshs u lbsr L68D8 leas 2,s puls pc,u,x,d L871C lbsr L77AC tsta beq L873D clra clrb std >$0DB1 * 6809/6309 - inca lda #$01 lbsr L72B6 pshs u lbsr L723E pshs a ldu #$4292 'you used to be wearing %c) %s' pshs u lbsr L68D8 leas 5,s L873D puls pc,u,x,d L873F lbsr L5E58 lbra L5EB2 * 6809/6309 - std >$433D L8745 sta >$433D stb >$433E pshs u,y,x,d lda #$CF Weapon object type ldx #$4337 'throw' lbsr L711A cmpx #$0000 beq L87D2 lbsr L77AC tsta beq L87D2 lbsr L571E tsta bne L87D2 L8766 lda $E,x cmpa #$02 bhs L8777 ldu #$10F5 lbsr L6112 dec >$0D9A bra L87AB L8777 pshs x lbsr L6162 tfr x,u puls x cmpu #$0000 bne L8796 lda #1 sta $E,x ldu #$4314 'something in your pack explodes!!!' pshs u lbsr L68D8 leas 2,s bra L8766 L8796 dec $E,x tst <$15,x bne L87A0 dec >$0D9A L87A0 exg x,u lda #$1F lbsr L3C51 lda #1 sta $E,x * 6809/6309 - ldd >$433D L87AB lda >$433D ldb >$433E lbsr L87D4 lda 6,x ldb 5,x pshs x lbsr L2CDB * 6809/6309 - leau ,x tfr x,u puls x cmpu #$0000 beq L87CD lbsr L8978 tsta bne L87D2 L87CD lda #$01 lbsr L88B1 L87D2 puls pc,u,y,x,d L87D4 pshs u,y,x,d * 6809/6309 - std >$433F sta >$433F stb >$4340 lda #$40 sta >$4341 ldd >$10DC std 5,x L87E6 lda >$4341 cmpa #$40 beq L8815 leau 5,x tfr u,d ldu #$10DC lbsr L5A95 tsta bne L8815 lda 6,x ldb 5,x lbsr L28A4 tsta beq L8815 tfr x,u ldb >$4341 clra tfr d,x lda 6,u ldb 5,u lbsr L68C4 tfr u,x L8815 lda 6,x adda >$433F sta 6,x ldb 5,x addb >$4340 stb 5,x lbsr L5AF2 tfr a,b lbsr L58E8 tsta beq L8860 cmpb #$CA beq L8860 lda 6,x ldb 5,x lbsr L28A4 tsta beq L8859 lda 6,x lbsr L3BBB sta >$4341 lda 6,x * 6809/6309 - leay ,x tfr x,y tfr d,x clra ldb 4,y exg d,x lbsr L68C4 * 6809/6309 - leax ,y tfr y,x lbsr L3BAB bra L87E6 L8859 lda #$40 sta >$4341 bra L87E6 L8860 puls pc,u,y,x,d L8862 pshs y,x,d lda 4,x cmpa #$CF Weapon object? bne L8874 No, try next object type lda $F,x Get weapon type lsla ldu #$004B point to weapon name ptr table ldu a,u Point to specific weapon name * 6809/6309 - replace with puls pc,y,x,d bra L88AF L8874 cmpa #$D0 Armor object? bne L8882 no, try next object type lda $F,x Get armor type lsla ldu #$00C7 Point to armor name ptr table ldu a,u point to specific armor name * 6809/6309 - replace with puls pc,y,x,d bra L88AF L8882 cmpa #$CC Food object? bne L888B no, try next object type ldu #$4342 'food' * 6809/6309 - replace with puls pc,y,x,d bra L88AF L888B cmpa #$CE For other special types, go to L889F beq L889F cmpa #$CD beq L889F cmpa #$D5 beq L889F cmpa #$D2 beq L889F cmpa #$D1 bne L88AC Not other special types - special processing L889F lda #$01 lbsr L72B6 L88A4 lda ,u+ Search text for space cmpa #$20 bne L88A4 * 6809/6309 - replace with puls pc,y,x,d bra L88AF L88AC ldu #$4347 'bizarre thing' (should never get hear - unknown object type) * 6809/6309 - remove line, embed puls where each BRA L88AF appears above L88AF puls pc,y,x,d L88B1 pshs u,y,x,d sta >$437E ldu #$437C lbsr L8A56 cmpa #$01 bne L891D tfr x,y lda >$437D ldb >$437C lbsr L5AAA lda 4,y sta >$4B84,x ldd >$437C std 5,y lda >$437D ldb >$437C lbsr L28A4 tsta beq L8913 lda 6,y ldb 5,y lbsr L3BC6 * 6809/6309 - remove through L88F3 - all redundant since A/B forcibly reloaded tfr a,b anda #$40 bne L88F3 andb #$20 beq L88F6 L88F3 lbsr L3C50 L88F6 clra ldb 4,y tfr d,x lda >$437D ldb >$437C lbsr L68C4 lbsr L3C50 lbsr L2CDB cmpx #$0000 beq L8913 lda 4,y sta 9,x * 6809/6309 - leax ,y L8913 tfr y,x ldu #$10F7 lbsr L6138 * 6809/6309 - replace with puls pc,u,y,x,d bra L893D L891D cmpa #$02 bne L8924 clr >$437E L8924 tst >$437E beq L8938 lbsr L8862 pshs u ldu #$4355 'the %s vanishes as it hits the ground' pshs u lbsr L68D8 leas 4,s * 6809/6309 - leau ,x L8938 tfr x,u lbsr L61A0 L893D puls pc,u,y,x,d L893F pshs u,y,x,d ldb #6 6 bytes per entry mul addd #$42D8 Base of table (includes 2 ptrs to damage tables?, plus ??) tfr d,u ldd ,u Get ptr to first damage string std $A,x ldd 2,u Get ptr to second damage string std $C,x lda 4,u Get ??? sta $9,x lda 5,u Get ?? sta <$13,x anda #$20 beq L8972 lda #8 lbsr L63A9 adda #8 sta $E,x lda >$0DA6 sta <$15,x inc >$0DA6 bra L8976 L8972 lda #1 sta $E,x L8976 puls pc,u,y,x,d L8978 pshs u,y,x,b * 6809/6309 - lea ,x tfr x,u lbsr L2CDB cmpx #$0000 beq L8997 sta >$4380 * 6809/6309 - replace 2 lines with ldy #$473F / stb ,y stb >$437F ldy #$437F ldb 7,x lda #1 lbsr L2E75 * 6809/6309 - change to puls pc,u,y,x,b bra L8998 L8997 clra L8998 puls pc,u,y,x,b L899A pshs y,x,d * 6809/6309 - std >$4398 sta >$4398 stb >$4399 tfr a,b sex pshs d lda >$4398 * 6809/6309 - redundant, remove cmpa cmpa #$00 bge L89B3 ldd #$1470 bra L89B6 L89B3 ldd #$4396 '+' L89B6 pshs d ldd #$438B '%s%d' pshs d ldx #$4381 lbsr L3D23 leas 6,s cmpu #$00CF >$00CF points to 'chain mail' bne L89FB ldb >$4399 sex pshs d * 6809/6309 - tstb cmpb #0 bge L89DA ldd #$1470 bra L89DD L89DA ldd #$4396 '+' L89DD pshs d ldd #$4390 ',%s%d' pshs d ldx #$4381 lbsr L3FE7 Get length of string @ X (NUL terminated) tfr a,b D=length clra pshs d ldd #$4381 Add to start ptr addd ,s++ tfr d,x Move end ptr to X lbsr L3D23 leas 6,s L89FB ldu #$4381 puls pc,y,x,d L8A00 pshs u,y,x,d ldx >$0DB7 ldu >$0DB7 lbsr L77AC stu >$0DB7 tsta beq L8A54 ldx #$439A 'wield' lda #$CF Weapon object type lbsr L711A cmpx #$0000 bne L8A23 L8A1E clr >$05FC bra L8A54 L8A23 lda 4,x cmpa #$D0 Armor type? bne L8A35 ldu #$43A0 'you can't wield armor' pshs u lbsr L68D8 leas 2,s bra L8A1E L8A35 lbsr L571E tsta bne L8A1E lda #1 lbsr L72B6 stx >$0DB7 lbsr L723E pshs a pshs u ldu #$43B6 'you are now wielding %s (%c)' pshs u lbsr L68D8 leas 5,s L8A54 puls pc,u,y,x,d L8A56 pshs u,y,x,b clr >$43D7 lda 6,x deca sta >$43D3 adda #$02 sta >$43D5 lda 5,x inca sta >$43D6 L8A6C lda >$43D3 cmpa >$43D5 lbhi L8AFB lda 5,x deca sta >$43D4 L8A7C lda >$43D4 cmpa >$43D6 bhi L8AF5 * 6809/6309 - ldd >$43D3 lda >$43D3 ldb >$43D4 cmpa >$10DD bne L8A94 cmpb >$10DC beq L8AF0 L8A94 lbsr L5ADE tsta bne L8AF0 lda >$43D3 lbsr L3BBB cmpa #$C2 ? Gold object, maybe? beq L8AA8 cmpa #$C3 bne L8ABD L8AA8 inc >$43D7 lda >$43D7 lbsr L63A9 tsta bne L8AF0 lda >$43D3 sta 1,u stb ,u bra L8AF0 L8ABD lbsr L58E8 tsta beq L8AF0 * 6809/6309 - ldd >$43D3 lda >$43D3 ldb >$43D4 * 6809/6309 - leay ,x tfr x,y lbsr L54E5 exg x,y * 6809/6309 - leay ,y - same speed, 2 bytes smaller cmpy #$0000 beq L8AF0 lda 4,x cmpa 4,y bne L8AF0 lda <$15,y beq L8AF0 cmpa <$15,x bne L8AF0 lda $E,y adda $E,x sta $E,y lda #2 bra L8B03 L8AF0 inc >$43D4 bra L8A7C L8AF5 inc >$43D3 lbra L8A6C L8AFB clra tst >$43D7 beq L8B03 lda #$01 L8B03 puls pc,u,y,x,b * Read scroll routine L8B05 pshs u,y,x,d clr >$468E ldx #$43D8 'read' lda #$CD Scroll o_type lbsr L711A stx >$468C lbeq L8FAF cmpa 4,x beq L8B2A ldu #$43DD 'there is nothing on it to read' pshs u lbsr L68D8 leas 2,s lbra L8FAF L8B2A ldu #$43FC 'as you read the scroll, it vanishes.' pshs u lbsr L68D8 leas 2,s cmpx >$0DB7 bne L8B3F clr >$0DB7 clr >$0DB8 L8B3F lda $F,x Get scroll type * 6809/6309 - redundant. Remove cmpa cmpa #$00 bne L8B5A Not 'confuse monster' scroll, skip ahead ldd >$10E4 ? Flag 'confuse monster' active for next attack by player? ora #$04 std >$10E4 ldu #$4420 'your hands begin to glow red' pshs u lbsr L68D8 leas 2,s lbra L8F6B L8B5A cmpa #4 Enchant armor? bne L8B7C No, check next ldu >$0DB1 ? Get ptr to player stats? beq L8B79 dec <$12,u ? Dec armor class? * 6809/6309 - replace 2 lines with lda #$FE lda #$01 coma anda <$13,u sta <$13,u ldu #$443D 'your armor glows faintly for a moment' pshs u lbsr L68D8 leas 2,s L8B79 lbra L8F6B L8B7C cmpa #$02 Hold monster scroll? bne L8BE3 No, check next lda >$10DC adda #3 sta >$4689 suba #6 sta >$4688 ldb >$10DD addb #3 stb >$468B L8B95 lda >$4688 cmpa >$4689 bhi L8BE0 * 6809/6309 - tsta cmpa #$00 blo L8BDB cmpa #80 bhs L8BDB ldb >$10DD subb #3 stb >$468A L8BAD ldb >$468A cmpb >$468B bhi L8BDB * 6809/6309 - tstb cmpb #$00 bls L8BD6 cmpb >$0D8E bhs L8BD6 lda >$468A ldb >$4688 lbsr L2CDB cmpx #$0000 beq L8BD6 ldd $C,x anda #$FF andb #$FB orb #$80 std $C,x L8BD6 inc >$468A bra L8BAD L8BDB inc >$4688 bra L8B95 L8BE0 lbra L8F6B L8BE3 cmpa #3 Sleep scroll? bne L8C10 no, check next * 6809/6309 - replace next 3 lines with ldd #$0501 / stb >$0601 ldb #$01 stb >$0601 lda #$05 lbsr L63A9 adda #$04 adda >$0D98 sta >$0D98 ldd >$10E4 anda #$FF andb #$FB std >$10E4 ldu #$4463 'you fall asleep' pshs u lbsr L68D8 leas 2,s lbra L8F6B L8C10 cmpa #10 Create monster? bne L8C46 no, check next lda >$10DD ldb >$10DC ldx #$4686 lbsr L2DE0 tsta beq L8C39 lbsr L6162 cmpx #$0000 beq L8C39 tfr x,u clra lbsr L29A7 ldx #$4686 lbsr L29E5 bra L8C43 L8C39 ldu #$4473 'you hear a faint cry of anguish in the distance' pshs u lbsr L68D8 leas 2,s L8C43 lbra L8F6B L8C46 cmpa #5 Identify scroll? bne L8C7F No, check next ldb #$01 stb >$0603 ldu #$44A3 'this scroll is an identify scroll' pshs u lbsr L68D8 leas 2,s ldx #$1523 'on' ldu #$4678 'on' lbsr L3FCD tsta beq L8C6E ldu #$467B 'sel' lbsr L3FCD tsta bne L8C74 L8C6E ldx #$467F ' More ' lbsr L697B L8C74 lbsr L46AD lda #$01 sta >$05FC lbra L8F6B L8C7F cmpa #1 Magic Mapping? lbne L8D5D No, check next ldb #$01 stb >$05FF ldu #$44C5 'oh, now this scroll has a map on it' pshs u lbsr L68D8 leas 2,s lda #1 sta >$468A L8C99 lda >$468A cmpa #22 lbcc L8D5A clrb stb >$4688 L8CA6 ldb >$4688 cmpb #80 lbhs L8D54 lda >$468A lbsr L5AAA lda >$4B84,x I think this is the "special gfx char" check for remapping. sta >$468F cmpa #$C5 beq L8CD4 cmpa #$C4 beq L8CD4 cmpa #$C6 beq L8CD4 cmpa #$C7 beq L8CD4 cmpa #$C8 beq L8CD4 cmpa #$C9 bne L8CF2 L8CD4 lda >$5264,x anda #$10 bne L8D1E lda #$CA sta >$4B84,x sta >$468F lda #$10 coma anda >$5264,x sta >$5264,x bra L8D1E L8CF2 cmpa #$CA beq L8CFE cmpa #$C3 beq L8CFE cmpa #$D3 bne L8D19 L8CFE lda >$468A ldb >$4688 lbsr L2CDB cmpx #$0000 beq L8D1E lda 9,x cmpa #$20 Space? bne L8D1E lda >$468F sta 9,x bra L8D1E L8D19 lda #$20 No active map object, print space sta >$468F L8D1E lda >$468F cmpa #$CA bne L8D38 lda >$468A ldb >$4688 lbsr L65DF lbsr L65E6 cmpa #$CA beq L8D38 lbsr L3C50 L8D38 ldb >$468F cmpb #$20 beq L8D4B clra tfr d,x lda >$468A ldb >$4688 lbsr L68C4 L8D4B lbsr L3C50 inc >$4688 lbra L8CA6 L8D54 inc >$468A lbra L8C99 L8D5A lbra L8F6B L8D5D cmpa #7 Food Detection? bne L8DCE No, check next clr >$468F ldx >$10F7 L8D67 cmpx #$0000 beq L8DAB lda 4,x Get o_type cmpa #$CC Food type? bne L8D8B No, skip ahead lda #1 sta >$468F lbsr L3C50 lda 6,x ldb 5,x lbsr L65DF lda #$CC Food type lbsr L6612 lbsr L3C50 bra L8DA6 L8D8B cmpa #$D5 Amulet type? bne L8DA6 lda #1 sta >$468F lbsr L3C50 lda 6,x ldb 5,x lbsr L65DF lda #$D5 lbsr L6612 lbsr L3C50 L8DA6 lbsr L3C39 bra L8D67 L8DAB ldb >$468F ? Food found on current level flag? beq L8DC1 No food on level, different message ldb #1 stb >$0605 ldu #$44E9 'your nose tingles as you sense food' pshs u lbsr L68D8 leas 2,s bra L8DCB L8DC1 ldu #$450D 'you hear a growling noise very close to you' pshs u lbsr L68D8 leas 2,s L8DCB lbra L8F6B L8DCE cmpa #8 Teleportation? bne L8DE5 No, check next ldx >$10F3 lbsr L49CC cmpx >$10F3 beq L8DE2 ldb #1 stb >$0606 L8DE2 lbra L8F6B L8DE5 cmpa #9 Enchant weapon? bne L8E30 No, check next ldx >$0DB7 Get ptr to object block for weapon being wielded beq L8DF4 None, skip ahead lda 4,x Get object type cmpa #$CF Weapon type? beq L8E00 Yes, skip ahead L8DF4 ldu #$4539 'you feel a strange sense of loss' pshs u lbsr L68D8 leas 2,s bra L8E2D * 6809/6309 - replace 2 lines with lda #$FE L8E00 lda #1 First, clear any curse on wielded weapon coma anda <$13,x sta <$13,x lda #2 lbsr L63A9 tsta bne L8E16 inc <$10,x Increase blessing level by 1 bra L8E19 L8E16 inc <$11,x L8E19 lda $F,x Get which object sub-type lsla *2 for ptr ldu #$004B Point to weapon name table ldd a,u Point to our weapon pshs d ldu #$455A 'your %s glows blue for a moment' pshs u lbsr L68D8 leas 4,s L8E2D lbra L8F6B L8E30 cmpa #6 Scare monster? bne L8E41 No, check next ldu #$464D 'you hear maniacal laughter in the distance' pshs u lbsr L68D8 leas 2,s lbra L8F6B L8E41 cmpa #11 Remove curse? bne L8E8D No, check next * 6809/6309 - replace 2 lines with lda #$FE lda #1 coma pshs a ldx >$0DB1 Get ptr to object block for armor being worn beq L8E57 None, skip ahead lda ,s anda <$13,x clear curse flag on armor sta <$13,x L8E57 ldx >$0DB7 Get ptr to object block for weapon being wielded. beq L8E64 No, skip ahead lda ,s anda <$13,x clear curse flag on weapon sta <$13,x L8E64 ldx >$0DB3 Get ptr to object block for ring on left hand beq L8E71 None, skip ahead lda ,s anda <$13,x clear curse flag on left ring sta <$13,x L8E71 ldx >$0DB5 Get ptr to object block for ring on right hand beq L8E7E None, skip ahead lda ,s anda <$13,x Clear curse flag on right ring sta <$13,x L8E7E leas 1,s ldu #$457A 'you feel as if somebody is watching over you' pshs u lbsr L68D8 leas 2,s lbra L8F6B L8E8D cmpa #12 Aggravate monsters? bne L8EA1 No, check next lbsr L56C9 ldu #$45A7 'you hear a high pitched humming noise' pshs u lbsr L68D8 leas 2,s lbra L8F6B L8EA1 cmpa #13 Blank paper? bne L8EB2 No, check next ldu #$45CD 'this scroll seems to be blank' pshs u lbsr L68D8 leas 2,s lbra L8F6B L8EB2 cmpa #14 Vorpalize weapon? lbne L8F61 No, check next ldx >$0DB7 Get weapon wielded object block ptr beq L8EC3 none, skip ahead lda 4,x Get object type cmpa #$CF Weapon? beq L8ED0 Yes, go vorpalize it L8EC3 ldu #$464D No, 'you hear maniacal laughter in the distance' pshs u lbsr L68D8 leas 2,s lbra L8F5E L8ED0 tst <$14,x beq L8EFC lda $F,x Get which weapon type lsla ldu #$004B Point to weapon name tbl ldd a,u Get ptr to our weapon name pshs d ldu #$45EB 'your %s vanishes in a puff of smoke' pshs u lbsr L68D8 leas 4,s ldu #$10F5 lbsr L6112 tfr x,u lbsr L61A0 ldx #$0000 Set so that player has no weapon wielded. stx >$0DB7 bra L8F5E L8EFC lbsr L2CB5 sta <$14,x inc <$10,x Increase blessing level of weapon inc <$11,x Increase damage(?) level of weapon lda #1 ??? flag something for weapon sta <$12,x ldu #$1473 ' of intense white light' pshs u lda $F,x Get which type weapon lsla * 2 for pointer ldu #$004B Point to weapons name table ldd a,u Our specific weapon pshs d ldu #$148B 'your %s gives off a flash%s' pshs u lbsr L68D8 leas 6,s lda #20 lbsr L63A9 tsta bne L8F5E * 6809/6309 - replace 6 lines with lda #$41 / ora <$13,x / sta <$13,x lda #1 Set cursed/blessed flag? ora <$13,x sta <$13,x lda #$40 ??? some other flag ora <$13,x sta <$13,x ldb #$01 stb >$060C lda <$14,x Get monster letter suba #$41 Make binary (0-25) ldb #18 mul addd #$10FB Point to base of monster table tfr d,u ldd ,u Get pointer to monster name pshs d ldu #$460F 'you feel a sudden desire to kill %ss.' pshs u lbsr L68D8 leas 4,s * 6809/6309 - BRA L8F5E lbra L8F6B L8F61 ldu #$4635 'what a puzzling scroll!' (you should never get this) pshs u lbsr L68D8 leas 2,s L8F6B lda #$01 lbsr L5088 lbsr L6AA2 dec >$0D9A ldx >$468C lda $E,x cmpa #$01 bls L8F83 dec $E,x bra L8F8E L8F83 ldu #$10F5 lbsr L6112 lda #$01 sta >$468E L8F8E lda $F,x ??? Get which sub-type of object? ldu #$05FE lda a,u pshs a lda $F,x lsla ldx #$07ED leax a,x puls a lbsr L5897 tst >$468E beq L8FAF ldu >$468C lbsr L61A0 L8FAF puls pc,u,y,x,d L8FB1 pshs u,y,x,d clr >$4901 lda #$CE Potion object ldx #$4690 'quaff' lbsr L711A stx >$48FD lbeq L9383 cmpa 4,x Is this a potion object? beq L8FD6 Yes, go drink the potion ldu #$4696 No, 'yuk! Why would you want to drink that?' pshs u lbsr L68D8 leas 2,s lbra L9383 L8FD6 cmpx >$0DB7 Is drink object being wielded as a weapon? bne L8FDE No, skip ahead ldx #$0000 Yes, set object ptr to 0 L8FDE lda $F,x Get which type of object * 6809/6309 - redundant, remove cmpa #$0 cmpa #$00 bne L9025 not confusion, try next type ldb #$01 Flag that player will now recognize potion of confusion stb >$060D ldx #$10D8 ldd #$0100 lbsr L3C3C pshs a ldd #$0008 lbsr L6396 addd #$0014 ldu #L5FAB+PrgOffst-$1B2 (#$BDF9) tst ,s+ beq L9009 lbsr L5E90 bra L9010 L9009 tfr d,y clra clrb lbsr L5E82 * 6809/6309 - lda >$10E4 / ora #$01 / sta >$10E4 L9010 ldd >$10E4 Get player status flags ora #$01 Set confusion flag std >$10E4 Save it back ldu #$46BD 'wait, what's going on? Huh? What? Who?' pshs u lbsr L68D8 leas 2,s lbra L9346 L9025 cmpa #2 Poison potion? bne L905F No, check next ldu #$46E4 'you feel %s sick' stu >$4902 lda #$01 sta >$060D+2 Flag player recognizes poison potion lda #$02 lbsr L3C00 tsta bne L904D We are protected against poison, skip ahead lda #$03 lbsr L63A9 inca nega lbsr L55F0 ldu #$46F6 'very' pshs u bra L9052 L904D ldu #$46FB 'momentarily' pshs u L9052 ldu >$4902 pshs u lbsr L68D8 leas 4,s lbra L9346 L905F cmpa #5 Healing poition? bne L9098 No, check next lda #$01 sta >$060D+5 Flag player knows healing potion ldb #$04 lda >$10EB lbsr L63BB addd >$10ED Add hit points std >$10ED Save new total cmpd >$10F1 Are we now past fully healed? ble L9088 No, skip ahead ldd >$10F1 We were fully healed, increase our max hit points by 1 addd #$0001 std >$10F1 Save new max hit points std >$10ED Save as new current hit points L9088 lbsr L5FFF ldu #$4707 'you begin to feel better' pshs u lbsr L68D8 leas 2,s lbra L9346 L9098 cmpa #3 Gain Strength potion? bne L90B1 No, check next lda #$01 sta >$060D+3 Flag player knows Gain Strength potion lbsr L55F0 ldu #$4720 'you feel stronger. What bulging muscles!' pshs u lbsr L68D8 leas 2,s lbra L9346 L90B1 cmpa #6 Monster Detection potion? bne L90EA No, check next ldu #L93BF+PrgOffst-$1B2 (#$F20D) ldd #$0100 Init flags(?) to $0100 ldy #$0014 Counter to 20 lbsr L5E82 Add to table @ u2C24 ldd >$10F9 bne L90D3 ldu #$4749 'you have a strange feeling for a moment' pshs u lbsr L68D8 leas 2,s bra L90E7 L90D3 clra lbsr L93BF ora >$0613 sta >$0613 ldu #$1470 pshs u lbsr L68D8 leas 2,s L90E7 lbra L9346 L90EA cmpa #7 Magic detection potion? lbne L9189 No, try next ldx >$10F7 lbeq L917C clr >$4904 L90FA cmpx #$0000 beq L9129 lbsr L39CF tsta beq L9124 lda #$01 sta >$4904 * 6809/6309 - leay ,x tfr x,y lbsr L5918 clra pshs x tfr d,u lda 6,x ldb 5,x * 6809/6309 - leax ,u tfr u,x lbsr L68C4 puls x lda #$01 sta >$060D+7 Flag player knows Magic Detection potion L9124 lbsr L3C39 bra L90FA L9129 ldy >$10F9 * 6809/6309 - leay ,y L912D cmpy #$0000 beq L916B ldx <$1D,y L9136 cmpx #$0000 beq L9162 lbsr L39CF tsta beq L915D lda #$01 sta >$4904 ldb #$D6 clra pshs x tfr d,u lda 5,y ldb 4,y * 6809/6309 - leax ,u tfr u,x lbsr L68C4 puls x lda #$01 sta >$060D+7 Flag player knows Magic Detection potion L915D lbsr L3C39 bra L9136 * 6809/6309 - leax ,y L9162 tfr y,x lbsr L3C39 * 6809/6309 - leay ,x tfr x,y bra L912D L916B tst >$4904 Did we find magic items on this level? beq L917C No ldu #$47A8 Yes, 'You sense the presence of magic.' pshs u lbsr L68D8 leas 2,s bra L9186 L917C ldu #$4771 'you have a strange feeling for a moment then it passes' pshs u lbsr L68D8 leas 2,s L9186 lbra L9346 L9189 cmpa #1 Paralysis potion? bne L91AE No, try next lda #$01 Flag player knows Paralysis potion sta >$060D+1 lda #$02 sta >$0D98 ldd >$10E4 anda #$FF andb #$FB std >$10E4 ldu #$47C9 'you can't move' pshs u lbsr L68D8 leas 2,s lbra L9346 L91AE cmpa #4 See Invisible potion? bne L91E6 No, try next ldx #$10D8 ldd #$0800 lbsr L3C3C tsta bne L91D1 ldu #L5FC3+PrgOffst-$1B2 (#$BE11) clra clrb ldy #$012C lbsr L5E82 clra lbsr L5088 lbsr L9385 L91D1 lbsr L5FFF ldu #$150B 'Slime Mold' pshs u ldu #$47D8 'this potion tastes like %s juice' pshs u lbsr L68D8 leas 4,s lbra L9346 L91E6 cmpa #8 Raise Level potion? bne L91FF No, try next lda #$01 sta >$060D+8 Flag that player knows Raise level potion ldu #$47F9 'you suddenly feel much more skillfull' pshs u lbsr L68D8 leas 2,s lbsr L38A8 lbra L9346 L91FF cmpa #9 Extra Healing potion? bne L9255 No, try next lda #$01 sta >$060D+9 Flag that player knows Extra Healing potion lda >$10EB ldb #8 lbsr L63BB addd >$10ED Add hit points to player std >$10ED cmpd >$10F1 Are we past players current maximum HP? ble L9245 No, we are done adding tfr d,u ldd >$10F1 Get players max hit points addd >$10EB Add ? addd #$0001 and one more pshs d tfr u,d cmpd ,s++ ble L9239 If player not already fully healed, heal them and bump up max by 1 ldd >$10F1 Player fully healed already; add 2 to max addd #$0001 std >$10F1 L9239 ldd >$10F1 addd #$0001 std >$10F1 Save new max hit points std >$10ED Save new current hit points L9245 lbsr L5FFF ldu #$481E 'you begin to feel much better' pshs u lbsr L68D8 leas 2,s lbra L9346 L9255 cmpa #10 Haste Self potion? bne L9271 No, check next lda #$01 sta >$060D+10 Flag that player knows Haste Self potion lbsr L565D tsta beq L926E ldu #$483C 'you feel yourself moving much faster' pshs u lbsr L68D8 leas 2,s L926E lbra L9346 L9271 cmpa #11 Restore strength potion? bne L92F2 No, check next * 6809/6309 - LDD #$0001 lda #$00 ldb #$01 lbsr L3BE8 tsta beq L928D ldy >$0DB3 Get ptr to object block for ring on left hand lda <$12,y Get ??? nega ldx #$10E6 lbsr L563F * 6809/6309 - LDD #$0101 L928D lda #$01 ldb #$01 lbsr L3BE8 tsta beq L92A5 ldy >$0DB5 Get ptr to object block for ring on right hand lda <$12,y nega ldx #$10E6 lbsr L563F L92A5 ldd >$10A7 pshs d tfr d,u ldd >$10E6 cmpd ,s++ bhs L92B7 stu >$10E6 * 6809/6309 - LDD #$0001 L92B7 lda #$00 ldb #$01 lbsr L3BE8 tsta beq L92CE ldy >$0DB3 Get ptr to object block for ring on left hand lda <$12,y ldx #$10E6 lbsr L563F * 6809/6309 - LDD #$0101 L92CE lda #$01 ldb #$01 lbsr L3BE8 tsta beq L92E5 ldy >$0DB5 Get ptr to object block for ring on right hand lda <$12,y ldx #$10E6 lbsr L563F L92E5 ldu #$4861 'hey, this tastes great. It makes you feel warm all over' (restore strength if player @ full strength) pshs u lbsr L68D8 leas 2,s * 6809/6309 - bra lbra L9346 L92F2 cmpa #12 Blindness potion? bne L932B No, check next lda #$01 sta >$060D+12 Flag players knows blindness potion ldx #$10D8 ldd #$0001 lbsr L3C3C tsta bne L931E ldd >$10E4 Set player bit flag for blindness orb #$01 std >$10E4 ldu #L5FFF+PrgOffst-$1B2 (#$BE4D) clra clrb ldy #$012C lbsr L5E82 lbsr L5088 L931E ldu #$489A 'a cloak of darkness falls around you' pshs u lbsr L68D8 leas 2,s * 6809/6309 - bra lbra L9346 L932B cmpa #13 Thirst Quenching potion? bne L933C No, skip ahead ldu #$48BF 'this potion tastes extremely dull' pshs u lbsr L68D8 leas 2,s * 6809/6309 - bra lbra L9346 L933C ldu #$48E1 'what an odd tasting potion!' (should never see this) pshs u lbsr L68D8 leas 2,s L9346 lbsr L6AA2 dec >$0D9A ldx >$48FD lda $E,x cmpa #$01 bls L9359 dec $E,x bra L9364 L9359 ldu #$10F5 lbsr L6112 lda #$01 sta >$4901 L9364 lda $F,x pshs a lsla ldx #$080B leax a,x ldu #$060D Get ptr to flags for which potion types are known to player puls a lda a,u lbsr L5897 tst >$4901 beq L9383 ldu >$48FD lbsr L61A0 L9383 puls pc,u,y,x,d L9385 pshs u,y,x,d ldd >$10E4 Get player status flags ora #$08 Set "see invisible" flag std >$10E4 Save it back ldx >$10F9 L9392 cmpx #$0000 beq L93BD ldd #$0010 lbsr L3C3C tsta beq L93B8 lbsr L25F0 tsta beq L93B8 ldb 8,x clra pshs x tfr d,u lda 5,x ldb 4,x * 6809/6309 - leax ,u tfr u,x lbsr L68C4 puls x L93B8 lbsr L3C39 bra L9392 L93BD puls pc,u,y,x,d L93BF pshs u,y,x,b sta >$490C clr >$4907 ldx >$10F9 L93CA cmpx #$0000 beq L9426 lda 5,x ldb 4,x lbsr L65DF lbsr L25F0 tsta bne L93E9 lbsr L65E6 sta >$490B cmpa 7,x beq L93E9 clra bra L93EB L93E9 lda #$01 L93EB sta >$4908 tst >$490C beq L9404 lbsr L25F0 tsta bne L9421 lda 9,x cmpa #$40 beq L9421 lbsr L6612 bra L9421 L9404 tst >$4908 bne L9411 lbsr L3C50 lda >$490B sta 9,x L9411 lda 7,x lbsr L6612 tst >$4908 bne L9421 lbsr L3C50 inc >$4907 L9421 lbsr L3C39 bra L93CA L9426 ldd >$10E4 Get player status flags orb #$02 Set monster detection flag std >$10E4 tst >$490C ??? Maybe # of monsters on current level? beq L943A anda #$FF If >$490C is <>0, then clear monster detection flag andb #$FD std >$10E4 L943A lda >$4907 puls pc,u,y,x,b * Throwing potions as a weapon L943F pshs u,y,x,d tfr d,y lda $0F,y Get which type of potion was thrown * 6809/6309 - redundant, remove cmpa cmpa #$00 beq L944F Confusion potion thrown cmpa #$0C Blindness potion thrown * 6809/6309 - change 2 lines to bne L9472 (fall through to L944F) beq L944F bra L9472 * 6809/6309 - lda $C,x / ora #$01 / sta $C,x L944F ldd $C,x Flag monster confused ora #$01 std $C,x lda 7,x Get monster letter suba #$41 Make binary (from ASCII) ldb #18 18 bytes/monster table entry mul addd #$10FB Point into monster table tfr d,u ldd ,u Point to monster name pshs d ldu #$490D 'the %s appears confused' pshs u lbsr L68D8 leas 4,s * 6809/6309 - bra lbra L94D7 L9472 cmpa #1 Paralysis potion thrown? bne L9483 No, check next ldd $C,x Get flags anda #$FF Clear paralyzed bit (Which means paralyzed) andb #$FB orb #$80 std $C,x * 6809/6309 - bra lbra L94D7 L9483 cmpa #5 Healing potion thrown? beq L948D Yes, go do cmpa #9 Extra healing potion thrown? * 6809/6309 - change to bne L94AE (let beq fall through to L948D beq L948D bra L94AE L948D ldd #$0008 I think add up to 8 hit points to monster lbsr L6396 addd <$15,x std <$15,x cmpd <$19,x Past maximum for monster? ble L94AB No, done ldd <$19,x Yes, increase monsters HP by 1 (both current & max) addd #$0001 std <$19,x std <$15,x * 6809/6309 - bra L94AB lbra L94D7 L94AE cmpa #8 Raise Level potion thrown? bne L94CA No, check next ldd <$15,x Get monsters hit points addd #$0008 Add 8 std <$15,x Save new total ldd <$19,x Get monsters max hitpoints addd #$0008 Add 8 std <$19,x Save that as well inc <$13,x ??? * 6809/6309 - bra lbra L94D7 L94CA cmpa #10 Haste Self potion thrown? bne L94D7 No, do generic 'the flask shatters' * 6809/6309 - lda #$C,x / ora #$40 / sta $C,x ldd $C,x Get flags ora #$40 std $C,x * 6809/6309 - redundant, remove lbra lbra L94D7 L94D7 ldu #$4925 'the flask shatters' pshs u lbsr L68D8 leas 2,s puls pc,u,y,x,d L94E3 pshs u,y,x,d ldx #$493F 'put on' lda #$D1 Ring object lbsr L711A cmpx #$0000 beq L956E lda 4,x Get object type cmpa #$D1 Ring? beq L9504 Yes, put it on (if we can) ldu #$4946 'you can't put that on your finger' pshs u lbsr L68D8 leas 2,s bra L956E L9504 lbsr L571E tsta bne L956E ldu >$0DB3 Get ptr to object block for ring on left hand bne L951F Already something there, skip ahead * 6809/6309 - redundant since A has to be 0 to get here. Remove lda lda #$00 Offset for left hand ldu >$0DB5 Get ptr to object block for ring on right hand bne L9532 Already something there too, skip ahead lbsr L95CA cmpa #$FF beq L956E bra L9532 L951F lda #$01 Offset for right hand ldu >$0DB5 Get ptr to object block for ring on right hand beq L9532 It's empty, skip ahead ldu #$4968 'you already have a ring on each hand' pshs u lbsr L68D8 leas 2,s bra L956E L9532 lsla 2 bytes/entry ldu #$0DB3 Get ptr to object block for ring on left hand stx a,u Save ptr to either left hand or right hand lda $F,x Get Which type of ring cmpa #1 Add strength? bne L9546 No, try next lda <$12,x ??? vorpalized? lbsr L55F0 bra L9556 L9546 cmpa #4 See Invisible? bne L954F No, try next lbsr L9385 bra L9556 L954F cmpa #6 Aggravate Monster? bne L9556 No, try next lbsr L56C9 L9556 lbsr L723E pshs a lda #$01 lbsr L72B6 pshs u ldu #$498D 'you are now wearing %s (%c)' pshs u lbsr L68D8 leas 5,s puls pc,u,y,x,d L956E clr >$05FC puls pc,u,y,x,d * Remove ring L9573 pshs u,y,x,d ldu >$0DB3 Get ptr to object block of ring on left hand beq L958A Empty, skip ahead * 6809/6309 - CLRA lda #$00 ldu >$0DB5 Get ptr to object block of ring on right hand beq L959D Empty, skip ahead lbsr L95CA cmpa #$FF beq L95C5 bra L959D L958A lda #$01 ldu >$0DB5 Get ptr to object block of ring on right hand bne L959D ldu #$49A9 'you aren't wearing any rings' pshs u lbsr L68D8 leas 2,s puls pc,u,y,x,d * Entry: A=0 (left hand) or 1 (right hand) L959D lsla 2 bytes per hand entry ldu #$0DB3 Get ptr to object block of rings on hands ldx a,u get ptr to object block appropriate hand clra sta >$0D94 lbsr L77AC tsta beq L95C3 lbsr L723E pshs a lda #$01 lbsr L72B6 pshs u ldu #$49C6 'was wearing %s (%c)' pshs u lbsr L68D8 leas 5,s L95C3 puls pc,u,y,x,d L95C5 clr >$05FC puls pc,u,y,x,d L95CA ldu #$49DA 'left or right hand? ' pshs u lbsr L68D8 leas 2,s lbsr L61C2 cmpa #$1A bne L95E1 clr >$05FC lda #$FF rts L95E1 clrb stb >$0D94 cmpa #$6C 'l'? beq L95ED cmpa #$4C 'L' bne L95F0 * 6809/6309 - CLRA L95ED lda #$00 Left hand offset rts L95F0 cmpa #$72 'r'? beq L95F8 cmpa #$52 'R' bne L95FB Neither, clarify for idiot user L95F8 lda #$01 rts L95FB ldu #$49EF 'please type L or R' pshs u lbsr L68D8 leas 2,s bra L95CA * Subroutine to determine "class" of object? Returns 0, 1 or 2 depending on which sub-object type * Entry: A=0 (left hand) or 1 (right hand) * Exit: A=0 (nothing on hand, see invisible, searching) * A=1 (sustain strength, maintain armor, protection, add strenght, stealth) * A=2 (regeneration) L9607 pshs x ldx #$0DB3 Base left hand object ptr lsla *2 for 2 byte ptrs ldx a,x Get ptr to object block for appropriate hand cmpx #$0000 Nothing (no ring, skip ahead) bne L9617 clra puls pc,x L9617 lda $F,x Get which type of the object cmpa #9 Regeneration? bne L9621 no, try next lda #$02 puls pc,x L9621 cmpa #2 Sustain strength? beq L9635 Yes, A=1 cmpa #13 Maintain armor beq L9635 yes, A=1 * 6809/6309 - tsta cmpa #$00 Protection beq L9635 Yes cmpa #$01 Add strength beq L9635 cmpa #$0C Stealth? bne L9639 No, next broad ring type? L9635 lda #$01 puls pc,x L9639 cmpa #$04 See invisible? beq L9641 cmpa #$03 Searching? bne L964C No, skip ahead L9641 lda #$05 L9643 lbsr L63A9 tsta beq L9635 clra puls pc,x L964C cmpa #$07 Dexterity? beq L9654 cmpa #$08 Increase damage bne L9658 L9654 lda #$03 bra L9643 L9658 cmpa #$0A Slow digestion bne L9664 None of the above, exit with A=0 lda #$02 lbsr L63A9 deca puls pc,x L9664 clra puls pc,x L9667 pshs x,d lda <$13,y ? Get object flags? anda #$02 Is ??? set? beq L969C lda $0F,y Get sub-type of object * 6809/6309 - Redundant, remove cmpa cmpa #$00 beq L9682 cmpa #$01 beq L9682 cmpa #$08 beq L9682 cmpa #$07 bne L969C L9682 lda #$20 sta >$4939 lda <$12,y clrb ldu #$00D1 lbsr L899A ldx #$493A lbsr L3FF3 ldu #$4939 puls pc,x,d L969C ldu #$1470 puls pc,x,d * Set up players initial inventory on start L96A1 pshs u,y,x,d lda #$01 sta >$0D91 sta >$0DA6 clr >$0D90 ldx #$10E6 ldu #$10A7 lda #$0D lbsr L3C51 ldd #$0514 std >$0DA4 ldx #$5944 ldu #$04D8 clra lbsr L402B ldx #$5E1C ldu #$0028 clra lbsr L402B lbsr L6162 lda #$CF Weapon type sta 4,x * 6809/6309 - CLRA lda #$00 sta $F,x Mace sub-type lbsr L893F lda #$01 sta <$10,x +1 to hit sta <$11,x +1 damage sta $E,x 1 mace lda <$13,x ora #$02 sta <$13,x clr <$15,x lda #$01 lbsr L6DBF stx >$0DB7 Save ptr as weapon being wielded lbsr L6162 lda #$CF Weapon type sta 4,x Save lda #$02 Short Bow sub-type sta $0F,x lbsr L893F lda #$01 sta <$10,x +1 to hit sta $0E,x 1 bow clr <$11,x +0 damage clr <$15,x lda <$13,x ora #$02 sta <$13,x lda #$01 lbsr L6DBF lbsr L6162 lda #$CF Weapon type sta 4,x lda #$03 Arrows sub-type sta $0F,x lbsr L893F lda #$0F lbsr L63A9 adda #$19 25 arrow (base 0, so actually 26) sta $0E,x clr <$10,x +0 to hit clr <$11,x +0 damage lda <$13,x ora #$02 sta <$13,x lda #$01 lbsr L6DBF lbsr L6162 lda #$D0 Armor type sta 4,x Save as object type lda #$01 Ring Mail sta $F,x Save as sub-type lda >$014F deca sta <$12,x lda <$13,x ora #$02 sta <$13,x lda #$01 1 Ring mail sta $0E,x clr <$15,x lda #$01 lbsr L6DBF stx >$0DB1 Save ptr to armor being worn lbsr L6162 lda #$CC Food object sta 4,x Save it lda #$01 Quantity 1 sta $E,x clr $F,x Regular food clr <$15,x lda #1 lbsr L6DBF puls pc,u,y,x,d * The ptr tables to follow (4 of them) point to the strings of the various potions,etc. * types based on the address in RAM _while_ Rogue is running. So any code changes that * where these appear need to be changed as well, or the tables need to be changed to * allow them to be moved around. * Ptr table to possible potion names (original color versions) * Have to with Label+$5E4E offset so it points properly to where to loads in memory) * but this will move as we modify. Need to base on 'eom', since it is based on the * address we load into RAM at. L9790 fdb Amber+PrgOffst-$1B2 (Prgoffst is $6000 (where Rogue loads), but $1B2 is always added fdb Aquam+PrgOffst-$1B2 fdb Black+PrgOffst-$1B2 fdb Blue+PrgOffst-$1B2 fdb Brown+PrgOffst-$1B2 fdb Clear+PrgOffst-$1B2 fdb Crimson+PrgOffst-$1B2 fdb Cyan+PrgOffst-$1B2 fdb Gold+PrgOffst-$1B2 fdb Green+PrgOffst-$1B2 fdb Grey+PrgOffst-$1B2 fdb Magenta+PrgOffst-$1B2 fdb Orange+PrgOffst-$1B2 fdb Pink+PrgOffst-$1B2 fdb Plaid+PrgOffst-$1B2 fdb Purple+PrgOffst-$1B2 fdb Red+PrgOffst-$1B2 fdb Silver+PrgOffst-$1B2 fdb Tan+PrgOffst-$1B2 fdb Tanger+PrgOffst-$1B2 fdb Turquo+PrgOffst-$1B2 fdb Vermil+PrgOffst-$1B2 fdb Violet+PrgOffst-$1B2 fdb White+PrgOffst-$1B2 fdb Yellow+PrgOffst-$1B2 Amber fcc 'amber' fcb 0 Aquam fcc 'aquamarine' fcb 0 Black fcc 'black' fcb 0 Blue fcc 'blue' fcb 0 Brown fcc 'brown' fcb 0 Clear fcc 'clear' fcb 0 Crimson fcc 'crimson' fcb 0 Cyan fcc 'cyan' fcb 0 Gold fcc 'gold' fcb 0 Green fcc 'green' fcb 0 Grey fcc 'grey' fcb 0 Magenta fcc 'magenta' fcb 0 Orange fcc 'orange' fcb 0 Pink fcc 'pink' fcb 0 Plaid fcc 'plaid' fcb 0 Purple fcc 'purple' fcb 0 Red fcc 'red' fcb 0 Silver fcc 'silver' fcb 0 Tan fcc 'tan' fcb 0 Tanger fcc 'tangerine' fcb 0 Turquo fcc 'turquoise' fcb 0 Vermil fcc 'vermilion' fcb 0 Violet fcc 'violet' fcb 0 White fcc 'white' fcb 0 Yellow fcc 'yellow' fcb 0 * Ptr table to possible ring names (original versions) * May have to with Label+PrgOffst-$1B2 offset so it points properly to where to loads in memory) L9869 fdb Agate+PrgOffst-$1B2 fdb Alexan+PrgOffst-$1B2 fdb Amethy+PrgOffst-$1B2 fdb Carnel+PrgOffst-$1B2 fdb Diamon+PrgOffst-$1B2 fdb Emeral+PrgOffst-$1B2 fdb German+PrgOffst-$1B2 fdb Granit+PrgOffst-$1B2 fdb Garnet+PrgOffst-$1B2 fdb Jade+PrgOffst-$1B2 fdb Krypton+PrgOffst-$1B2 fdb Lazuli+PrgOffst-$1B2 fdb Moonst+PrgOffst-$1B2 fdb Obsid+PrgOffst-$1B2 fdb Onyx+PrgOffst-$1B2 fdb Opal+PrgOffst-$1B2 fdb Pearl+PrgOffst-$1B2 fdb Perid+PrgOffst-$1B2 fdb Ruby+PrgOffst-$1B2 fdb Sapph+PrgOffst-$1B2 fdb Stibot+PrgOffst-$1B2 fdb Tiger+PrgOffst-$1B2 fdb Topaz+PrgOffst-$1B2 fdb Turq+PrgOffst-$1B2 fdb Taaff+PrgOffst-$1B2 fdb Zircon+PrgOffst-$1B2 Agate fcc 'agate' fcb 0 Alexan fcc 'alexandrite' fcb 0 Amethy fcc 'amethyst' fcb 0 Carnel fcc 'carnelian' fcb 0 Diamon fcc 'diamond' fcb 0 Emeral fcc 'emerald' fcb 0 German fcc 'germanium' fcb 0 Granit fcc 'granite' fcb 0 Garnet fcc 'garnet' fcb 0 Jade fcc 'jade' fcb 0 Krypton fcc 'kryptonite' fcb 0 Lazuli fcc 'lapis lazuli' fcb 0 Moonst fcc 'moonstone' fcb 0 Obsid fcc 'obsidian' fcb 0 Onyx fcc 'onyx' fcb 0 Opal fcc 'opal' fcb 0 Pearl fcc 'pearl' fcb 0 Perid fcc 'peridot' fcb 0 Ruby fcc 'ruby' fcb 0 Sapph fcc 'sapphire' fcb 0 Stibot fcc 'stibotantalite' fcb 0 Tiger fcc 'tiger eye' fcb 0 Topaz fcc 'topaz' fcb 0 Turq fcc 'turquoise' fcb 0 Taaff fcc 'taaffeite' fcb 0 Zircon fcc 'zircon' fcb 0 * This might be a specific object table of some sort? Maybe not. There is a routine that at * least goes to $19,x based on this, though L997B fdb $1904 ?Ptr to tbl of 8 bit values (0,x) fcb $05,$04,$1E,$1E,$17,$01,$05,$0F,$1E,$05,$05,$02,$06,$14 (2,x - $F,x) fcb $16,$06,$23,$1D,$14,$05,$06,$07,$1e,$08 ($10,x - $19,x) * Ptr table to possible staff names (original versions) * May have to with Label+PrgOffst-$1B2 offset so it points properly to where to loads in memory) L9995 fdb Avocad+PrgOffst-$1B2 fdb Bamboo+PrgOffst-$1B2 fdb Birch+PrgOffst-$1B2 fdb Cedar+PrgOffst-$1B2 fdb Cypress+PrgOffst-$1B2 fdb Dogwood+PrgOffst-$1B2 fdb Drift+PrgOffst-$1B2 fdb Ebony+PrgOffst-$1B2 fdb Elm+PrgOffst-$1B2 fdb Eucal+PrgOffst-$1B2 fdb Hemlock+PrgOffst-$1B2 fdb Ironw+PrgOffst-$1B2 fdb Maple+PrgOffst-$1B2 fdb Oaken+PrgOffst-$1B2 fdb Pine+PrgOffst-$1B2 fdb Redw+PrgOffst-$1B2 fdb Spruce+PrgOffst-$1B2 fdb Teak+PrgOffst-$1B2 fdb Walnut+PrgOffst-$1B2 fdb Zebra+PrgOffst-$1B2 Avocad fcc 'avocado wood' fcb 0 Bamboo fcc 'bamboo' fcb 0 Birch fcc 'birch' fcb 0 Cedar fcc 'cedar' fcb 0 Cypress fcc 'cypress' fcb 0