;---------------------------------------------------------------------------------
"Ys IV: The Dawn of Ys" (for the PC Engine CD) Disassembly work by Neill Corlett.
For PC Engine CD fan translation work (fully complete in Ys IV's case), data
track 2 from the CD-ROM is ripped to a file for hacking and can be simply thought
of as one big NES ROM file (pretty close to what it is actually given similar
CPU with NES). There is no file system that organizes anything. Only a mix of
code and data (graphics/text/adpcm/psg/etc).


$2000-$20ff: zero page

YS4: $2001 = Total base bank # for RAM

zeo:
	$02 - $03 : a routine address than can be called from IRQ1
	$04 - $05 : a routine address that can be called in Timer proc
	$06 - $07 : another routine address


YS4: $2022 = fake system bank (to put in $E000-$FFFF)


	$d9: unknown

	$de-$df: unknown, GRP related
		pointer cache ?


	$e4-$e5: unknown, GRP related, word to keep the value of (_BX)
		set in GRP_FUNC0
		restored in GRP_FUNC2
		GRP paint stack ?

	$e6: unknown (zeo: default $8000 in system 2.0 us)
	$e7: unknown (zeo: could be sound related, 
			   upper bit related to "sound off?" [set to 0 by PSG_PLAY]
			   and lower one related to "timer launched?")
	$e8-$e9: unknown (zeo: could be sound related)
		could even be the adress in mem of the sound stuff to play
		created from ($ea-$eb) and the current played 'frame'

	$ea-$eb: unknown (zeo: could be sound related)
		could even be the base adress in mem of the sound 
		stuff to play (base address of the song, we add the offset of the current
		played 'frame' to know where is the actual data to read for the current note)


	$ec-$ed: unknown (VRAM address?)
		 also used in DIV16S
		 could be a temporary value

	$ef: unknown, PSG related (upper bit cleared in PSG_FUNC12)

	$f0-$f1 : appears to be sort of temporary values

	$f2: something to do with CD/ADPCM and interrupts (IRQ2)?

	$f3: VDP control low?
	$f4: VDP control high?

	$f5: some sort of IRQ flags


	$f6: unknown (VDP status?)
	$f7: unknown (cur VDP reg? [zeo : looks like])

	$f8: _al
	$f9: _ah
	$fa: _bl
	$fb: _bh
	$fc: _cl
	$fd: _ch
	$fe: _dl
	$ff: _dh

$2100-$21ff: stack page

$2200-$3fff: ram

	$2200: a vector address (defaults to $e8e2)
				( zeo : $e8f7 in system 2.0 us)
	$2202: a vector address
	$2204: a vector address
	$2206: a vector address
	$2208: a vector address
	$220a: a vector address
		; there may be another vector at $220c

	$2215: unknown

	$2220: unknown
	$2221: unknown
	$2222: unknown
	$2223: unknown
	$2224: unknown
	$2225: unknown

	$2226: unknown
	$2227: unknown

zeo:    $2228-$222C: array of 5 values
		=> current value of each joystick value
	$222D-$2231: array of 5 values
		=> new dir or button pressed since last poll
	$2232-$2236: array of 5 values
		=> last polled value of each joystick

	$2241: unknown (used in loop to wait for synchronisation, must be
		volatile and modified by IRQ [zeo])
	$2242: unknown (VCE related ? zeo) : is used as scratch value for 
		setting screen size and dotmod
	$2244: unknown (VCE related?)
	$2245: unknown
	$2246: unknown

	$2248: unknown

	$224c: CD command ID

	$224d-$2254: CD command buffer

	$2255: unknown (zeo: keep the value of _bh in CD_PLAY)

	$2247: unknown

	$2248: unknown	(zeo: keep the value of _bh & 1 in CD_SEARCH)

	$224c: unknown

//------------------

zeo:    $224d-2254: command value, local variable since often set to zero ?
   $224d : saved place for al
	$224e : saved place for ah
	$224f : saved place for bl
	$2250 : saved place for bh

zeo:    $2250 : in mode 2-5 of reading, number of block to read

	$2251 : saved place for cl
	$2252 : saved place for ch
	$2253 : saved place for dl
	$2254 : saved place for dh

	$2250 (zeo: in cd_read, mode1, number of sector to read)

							   ---------------//
all of this stuff agree with the CD argument buffer hypothesis


	$2256-$225f: unknown (zeo : often used as temporary buffer)

	$225f: unknown (result code?)

	$2260-$2267: saved command registers? (zeo: yes)

zeo:    $2268: in reading function mode 2-5, number of the bank pointed before reading

	$2269: main code track (first found) (zeo)

	$226a: number of first CD track (zeo)
	$226b: number of last CD track (zeo)

	$226c: unknown
	$226d: unknown
	$226e: unknown

	$226f: unknown \ 
	$2270: unknown  > => ($226c-$226e) is copied here in CD_PLAY
	$2271: unknown /

	$2272: unknown (VDP mutex?)

	$2273: unknown (some sort of buffer index?) (gets multiplied by 3 in at least one routine)
			zeo: set to 0 if entering the reading routine at $ec05 for the first time for this reading
			else set to 1 if entering again for the same reading due to an error (maybe not error?), (system 3.0)
			cleared at the beginning of CD_READ and CD_SEEK (system 2.0)

	$2274: unknown (some sort of buffer?)   \
	$2275: unknown (some sort of buffer?)    => number of the first sector of track 2
	$2276: unknown (some sort of buffer?)   /

	$2277:          \
	$2278:           => could be the first sector of backup code track (zeo)
	$2279:          /   is initialized the same way as ($2274) value

	$227a: unknown (last CD status?) (zeo: almost, with 3 lesser bits off)

	$227b: unknown (zeo: seems to be the source of trouble in AD_TRANS )

	$227c: unknown (zeo: store data from info_buf[2] in $f053 function)
	$227d: unknown (zeo: store data from info_buf[9] in $f053 function)

	$227e: subchannel data?

	$2280: unknown (zeo: in cd_read, mode1, nb of sector to read)
		       (zeo: in cd_read, mode2-5,nb of bank to fill = nb of sector / 4   )
	$2281: unknown

	$2282-$2283: in cd_exec of system 2.0, address to store sectors
	and to execute if successful reading. (zeo)

	$2284: soft reset vector


zeo :   $228f: in reading mode 2-5, mask of the MMR to fill
	if fact, $228e-$2290 is a self modified code
	set with 43 XX 60 (where XX is set on the fly)
	it loads A with the value of a MMR
	'coz 43 XX is the TMAi function and 60 a RTS
	launch with a classic jsr $228e
	Very 'subtle' piece of code.

	later, it's filled with TAMi code
	and finally with TAMi again (!?)

	$2291-$229a: unknown (backup command buffer?)

	$229b: unknown (zeo: may be error related,
			if set, it obliges the error test function ($e9c5) 
			to reset the drive and launch the calling function again)

	$229c: unknown

	$229d: unknown (AD_xxx0?)
	$229e: unknown (AD_xxx1?)
	$229f: unknown (AD_xxx2?)
	$22a0: unknown (AD_xxx3?)

	$22a4: unknown (some sort of mutex on the cd system code?)

	$22a5: ADPCM repeat flag
	$22a6: ADPCM length
	$22a7: ADPCM length
	$22a8: ADPCM start
	$22a9: ADPCM start
	$22aa: ADPCM sampling rate

	$22b5: save location for mmu reg 0 ($01)
	$22b6: save location for mmu reg 1 ($02)
	$22b7: save location for mmu reg 2 ($04)
	$22b8: save location for mmu reg 3 ($08)
	$22b9: save location for mmu reg 4 ($10)
	$22ba: save location for mmu reg 5 ($20)
	$22bb: save location for mmu reg 6 ($40)
	$22bc: save location for mmu reg 7 ($80)

zeo:
	$22d0-dc: array of 13 bytes, sound related (not really, rather bunch of separate variables)

	  $22d0-$22d1 : track ? ('coz set in PSG_TRACK)
	  $22d2-$22d3 : unknown... (set by PSG_FUNC5)
	  $22d4: unknown, set with some strange tables
		upper bit can avoid timer counter reloading
		else seems to be the counter reloading value...

	  $22d5-$22d6 : unknown... (set by PSG_FUNC6)
	  $22d7-$22d8 : unknown... (set by PSG_FUNC7)
	  $22d9-$22da : unknown... (set by PSG_FUNC8)
	  $22db-$22dc : unknown... (set by PSG_FUNC9)

	$22dd: unknown, sound related

	$22de: unknown, sound related
		PSG_FUNCE set the upper bit in some case
		PSG_FUNCA set 6th bit

	$22df: unknown, receive the arg of PSG_INIT
	       if set to 1, PSG_MSTAT exits immediately and returns a special (error ?) code (0x80)
	       if set to 1, PSG_FUNCE exits immediately
	       if set to 1, PSG_FDOUT exits immediately
	       if set to 1, PSG_FUNC11 exits immediately
	       if set to 0, PSG_STAT2 exist immediately and returns a special (error ?) code (0x80)
	       if set to 0, PSG_FUNCA exits immediately

	$22de: sound related, initialised with 0xC0
		upper bit cleared in PSG_FUNC12

	$22df: sound related, could be "all chan on", PSG_FUNCE kills all chan if zero

	$22e0: used as a local counter for chan number in $c2ef (bank 2) function
		as weel as in $cd12 (bank 2) function

	$22e1: sound related, initialised with 0x80
	       keep the arg of the PSG_PLAY function


	$22e2: sound related, keep the value of _AH when PSG_PLAY is called

	$22e3-ea: array of 8 bytes, sound related
		initialised with d3 00 00 06-08 20 00 60          

	$22eb-$22ec: a bank number used in $e6cf routine (set in PSG_BANK)
		     maybe the bank were the song data dwells ?
		     these bank are mapped to $8000 and $A000 in the timer routine ...
		     I think we have then 16 Kb that need to be prepared to be put at $8000 for all song data

	$22ed: maybe the current audio channel (i.e. last arg to $0800)

	$22ee-$248a : 0x19d (413d) bytes sound releated

	  $247c-$2481 : array of 6 bytes, one for each sound channel
			used to create the return value of PSG_MSTAT
			certainly an array of boolean since it's sometime normalized to an array of 0 and 1 
				(whenever there were a non zero value..)
			if current val is null, avoid killing corresponding chan in PSG_FUNC11 function
			

	  $2488 : unknown, set to absolute value of the arg in PSG_FDOUT
	  $2489-$248a : set to zero in PSG_FDOUT

	$248b-$2615 : 0x18b (395d) bytes sound related

	  $25ff-$2604 : array of bytes, upper bit is cleared in some conditions in PSG_FUNC12

	  $2607-$260B : array of bytes, one for each sound channel
			used to create the return value of PSG_STAT2
			if different from 1, PSG_FUNCE toggle the chan off
			(could it be "chan on?")
			if set to 1, avoid toggling chan off in PSG_FUNC11
			set to 0 when PSG_ASTOP stop a chan
			if different from 0, PSG_FUNCA don't toggle the chan off
			if set to 0, timer routines don't perform actions for the current chan
			

	$2616-$2617 : Vram pointer to the tiles map (zeo: I bet there's a better
		name for that, anyway I meant it's the position in vram where we
		put the offset of the tiles in order to have them drawn)

	$2619-$2638 : unknown, set to 0 in a routine...
		seems to be then set this the expanded boolean value if ($fa-$fb)
		I mean that the value of each bit in (_BX) will be translated
		into a 0 or 1 in each of these bytes
		of course, only the 16 first are set and (_BX) is reset during
		the computation

;*********************************************************************************
;
; Misc. variables
;

0267D:
; this block of data is loaded
01 0F 01 04 00 00 00 00 00 00 00 00 00 00 13 1E
0E 0E 0F 00 3D 00 00 00 00 00 00 00 00 00 00 00
3C 1B 1E 00 00 10 06 0D 00 00 00 00 00 00 0D 0E
0F 09 36 39 31 00 30 00 2B 09 1A 00 20 22 31 18
1E 2D 3D 0A 22 00 2B 3B 00 2C 0A 00 00 00 00 00
35 36 1C 2A 2E 2F 00 00 34 00 36 3A 40 3A 3E 04
3A 00 00 00 38 39 00 00 00 00 00 00 00 00 27 3D
3B 32 29 3A 00 00 00 00 2E 17 14 30 2B 00 00 00
00 00 32 36 3D 00 00 00 00 00 00 00 2B 2F 31 00
00 00 00 00 00 00 39 37 13 2E 31 37 2C 3A 40 17
20 1C 20 00 00 15 19 08 00 00 20 1B 1F 00 00 15
1B 1E 15 18 06 00 00 00 00 1D 16 1E 00 00 15 02
02 00 00 00 00 00 00 00 2B 00 00 00 00 25 00 00
00 00 2A 00 00 00 00 1E 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

;*********************************************************************************
;
; Boot loader
; CD extent 00000000-00000FFF
; Logical address 2800-37FF
; Permanent logical address 2800-2FFF (last 2K discarded)
;
;*********************************************************************************

;
; ASCII/SJIS credits and bullshit
;
02800: 82 B1 82 CC 83 76 83 8D 83 4F 83 89 83 80 82 CC  é¦é¦âvâìâOâëâÇé¦
02810: 92 98 8D EC 8C A0 82 CD 8A 94 8E AE 89 EF 8E D0  Æÿì8îáé-èöÄ«ënÄ-
02820: 00 83 6E 83 68 83 5C 83 93 82 AA 8F 8A 97 4C 82   ânâhâ\âôé¬ÅèùLé
02830: B5 82 C4 82 A8 82 E8 82 DC 82 B7 81 42 82 B1 82  ¦é-é¿éFé_é+üBé¦é
02840: CC 00 83 76 83 8D 83 4F 83 89 83 80 82 CC 88 EA  ¦ âvâìâOâëâÇé¦êO
02850: 95 94 82 DC 82 BD 82 CD 91 53 95 94 82 F0 8A 94  òöé_é+é-æSòöé=èö
02860: 8E AE 00 89 EF 8E D0 83 6E 83 68 83 5C 83 93 82  Ä« ënÄ-ânâhâ\âôé
02870: CC 8F 91 96 CA 82 C9 82 E6 82 E9 8B 96 89 C2 82  ¦Åæû-é+éµéTïûë-é
02880: C8 82 AD 00 95 A1 8E CA 81 45 95 A1 90 BB 81 45  +é¡ òíÄ-üEòíÉ+üE
02890: 93 5D 97 70 82 B7 82 E9 82 B1 82 C6 82 CD 92 98  ô]ùpé+éTé¦é¦é-Æÿ
028A0: 8D EC 8C A0 00 96 40 82 C9 82 E6 82 E8 8B D6 82  ì8îá û@é+éµéFï+é
028B0: B6 82 E7 82 EA 82 C4 82 A8 82 E8 82 DC 82 B7 81  ¦étéOé-é¿éFé_é+ü
028C0: 42 00 FF 50 52 4F 44 55 43 45 52 00 92 86 96 7B  B  PRODUCER Æåû{
028D0: 90 4C 88 EA 00 44 49 52 45 43 54 4F 52 00 96 EC  ÉLêO DIRECTOR û8
028E0: 91 F2 8F 9F 8D 4C 00 43 44 2D 52 4F 4D 20 53 49  æ=ŃìL CD-ROM SI
028F0: 4D 55 4C 41 54 4F 52 00 96 7B 94 97 96 46 95 76  MULATOR û{öùûFòv
02900: 00 42 49 4F 53 20 4D 41 49 4E 20 43 4F 44 45 2C   BIOS MAIN CODE,
02910: 20 43 44 2D 50 4C 41 59 45 52 00 8F AC 97 D1 8C   CD-PLAYER żù-î
02920: 68 8E F7 00 42 49 4F 53 20 43 48 45 43 4B 20 4D  hĘ BIOS CHECK M
02930: 4F 4E 49 54 4F 52 2C 20 53 52 41 4D 20 4D 41 4E  ONITOR, SRAM MAN
02940: 41 47 45 52 00 94 F2 93 63 89 EB 8D 47 00 42 41  AGER ö=ôcëdìG BA
02950: 43 4B 55 50 20 4D 45 4D 4F 52 59 20 4D 41 49 4E  CKUP MEMORY MAIN
02960: 54 45 4E 41 4E 43 45 00 8B E0 93 63 8D 46 8E 69  TENANCE ïaôcìFÄi
02970: 00 43 44 2D 50 4C 41 59 45 52 20 53 55 42 00 8E   CD-PLAYER SUB Ä
02980: 4F 8F E3 81 40 93 4E 00 50 53 47 20 44 52 49 56  OÅpü@ôN PSG DRIV
02990: 45 52 00 8A E2 95 A3 8B 4D 8D 4B 00 47 52 41 50  ER èGòúïMìK GRAP
029A0: 48 49 43 20 44 52 49 56 45 52 00 8A E2 8D E8 8C  HIC DRIVER èGìFî
029B0: 5B 90 5E 00 47 52 41 50 48 49 43 20 44 52 49 56  [É^ GRAPHIC DRIV
029C0: 45 52 20 53 55 42 00 8B 79 90 EC 8D 8E 94 56 00  ER SUB ïyÉ8ìÄöV
029D0: 38 78 38 20 41 4E 4B 20 46 4F 4E 54 00 8F BC 89  8x8 ANK FONT Å+ë
029E0: 59 8D 5F 8E 69 00 43 44 2D 50 4C 41 59 45 52 20  Yì_Äi CD-PLAYER
029F0: 44 45 53 49 47 4E 00 88 C9 93 A1 90 5E 8E F7 00  DESIGN ê+ôíÉ^Ę
02A00: 54 49 54 4C 45 20 44 45 53 49 47 4E 00 95 90 93  TITLE DESIGN òÉô
02A10: 63 90 5E 97 9D 00 31 32 78 31 32 20 4B 41 4E 4A  cÉ^ù¥ 12x12 KANJ
02A20: 49 20 46 4F 4E 54 00 8A 70 92 4A 81 40 93 C4 00  I FONT èpÆJü@ô-
02A30: 31 32 78 31 32 20 4B 41 4E 4A 49 20 46 4F 4E 54  12x12 KANJI FONT
02A40: 00 8E 52 8C FB 82 E0 82 C6 00 31 32 78 31 32 20   ÄRîvéaé¦ 12x12
02A50: 4B 41 4E 4A 49 20 46 4F 4E 54 00 89 AA 93 63 8E  KANJI FONT ë¬ôcÄ
02A60: F5 95 76 00 4E 45 43 20 48 6F 6D 65 20 45 6C 65  )òv NEC Home Ele
02A70: 63 74 6F 72 6F 6E 69 63 73 00 97 E9 96 D8 8D 46  ctoronics ùTû+ìF
02A80: 8E A1 00 4E 45 43 20 48 6F 6D 65 20 45 6C 65 63  Äí NEC Home Elec
02A90: 74 6F 72 6F 6E 69 63 73 00 96 71 96 EC 81 40 8D  toronics ûqû8ü@ì
02AA0: 46 00 4E 45 43 20 48 6F 6D 65 20 45 6C 65 63 74  F NEC Home Elect
02AB0: 6F 72 6F 6E 69 63 73 00 89 76 8E 71 91 D7 8F AE  oronics ëvÄqæ+Å«
02AC0: 00 4E 45 43 20 48 6F 6D 65 20 45 6C 65 63 74 6F   NEC Home Electo
02AD0: 72 6F 6E 69 63 73 00 96 EC 8D E2 98 61 95 46 00  ronics û8ìGÿaòF
02AE0: 4E 45 43 20 48 6F 6D 65 20 45 6C 65 63 74 6F 72  NEC Home Elector
02AF0: 6F 6E 69 63 73 00 90 56 88 E4 8D 47 8F BA 00 FF  onics ÉVêSìGŦ  
02B00: 31 39 38 38 20 53 65 70 2E 20 57 72 69 74 74 65  1988 Sep. Writte
02B10: 6E 20 62 79 20 54 41 4B 41 4B 49 20 4B 4F 42 41  n by TAKAKI KOBA
02B20: 59 41 53 48 49 00                                YASHI

;--------------------------------------------------------------------------------------
;
; START HERE
;
; System Card BIOS transfers control here.
;
02B26: C2            CLY 
02B27: A2 4A         LDX   #$4A ; compare $4A bytes
02B29: A9 20         LDA   #$20
02B2B: 85 FA         STA   $FA
02B2D: A9 30         LDA   #$30 ; from $3020
02B2F: 85 FB         STA   $FB
02B31: A9 B6         LDA   #$B6
02B33: 85 FC         STA   $FC
02B35: A9 DF         LDA   #$DF ; to $DFB6
02B37: 85 FD         STA   $FD

02B39: B1 FA       - LDA   ($FA),Y
02B3B: D1 FC         CMP   ($FC),Y
02B3D: F0 01         BEQ   $2B40 +
02B3F: 60            RTS        ; return if not bootable.
02B40: C8          + INY 
02B41: CA            DEX 
02B42: D0 F5         BNE   $2B39 -

02B44: AD 0D 30      LDA   $300D
02B47: D0 02         BNE   $2B4B +
02B49: A9 60         LDA   #$60
02B4B: 85 00       + STA   $00
02B4D: 8F 00 02      BBS0  $00, $2B52
02B50: 80 76         BRA   $2BC8
02B52: 20 99 E0      JSR   $E099 ; EX_DSPOFF
02B55: AD 11 30      LDA   $3011
02B58: F0 04         BEQ   $2B5E
02B5A: C9 22         CMP   #$22
02B5C: 90 02         BCC   $2B60 +
02B5E: 80 1C         BRA   $2B7C ++
02B60: 73 0E 30 FC 20 03 00  TII   $300E, $20FC, $0003
02B67: 64 FF       + STZ   $FF
02B69: 64 FA         STZ   $FA
02B6B: A9 38         LDA   #$38
02B6D: 85 FB         STA   $FB
02B6F: 64 F8         STZ   $F8
02B71: A9 02         LDA   #$02
02B73: 85 F9         STA   $F9
02B75: 20 09 E0      JSR   $E009 ; CD_READ
02B78: C9 00         CMP   #$00
02B7A: F0 02         BEQ   $2B7E +
02B7C: 80 7C      ++ BRA   $2BFA
02B7E: A9 10       + LDA   #$10
02B80: 8D 22 22      STA   $2222
02B83: 8D 25 22      STA   $2225
02B86: A9 00         LDA   #$00
02B88: 8D 20 22      STA   $2220
02B8B: A9 38         LDA   #$38
02B8D: 8D 21 22      STA   $2221
02B90: A9 00         LDA   #$00
02B92: 8D 23 22      STA   $2223
02B95: A9 39         LDA   #$39
02B97: 8D 24 22      STA   $2224
02B9A: A9 02         LDA   #$02
02B9C: 8D 1F 22      STA   $221F
02B9F: AD 10 30      LDA   $3010
02BA2: 18            CLC 
02BA3: 69 01         ADC   #$01
02BA5: 85 FE         STA   $FE
02BA7: AD 0F 30      LDA   $300F
02BAA: 69 00         ADC   #$00
02BAC: 85 FD         STA   $FD
02BAE: AD 0E 30      LDA   $300E
02BB1: 69 00         ADC   #$00
02BB3: 85 FC         STA   $FC
02BB5: A9 FF         LDA   #$FF
02BB7: 85 FF         STA   $FF
02BB9: A9 01         LDA   #$01
02BBB: 85 F8         STA   $F8
02BBD: 64 FA         STZ   $FA
02BBF: 64 FB         STZ   $FB
02BC1: 20 09 E0      JSR   $E009 ; CD_READ
02BC4: C9 00         CMP   #$00
02BC6: F0 02         BEQ   $2BCA

02BC8: 80 32         BRA   $2BFC

02BCA: AD 10 30      LDA   $3010
02BCD: 18            CLC 
02BCE: 69 02         ADC   #$02
02BD0: 85 FE         STA   $FE
02BD2: AD 0F 30      LDA   $300F
02BD5: 69 00         ADC   #$00
02BD7: 85 FD         STA   $FD
02BD9: AD 0E 30      LDA   $300E
02BDC: 69 00         ADC   #$00
02BDE: 85 FC         STA   $FC
02BE0: A9 FF         LDA   #$FF
02BE2: 85 FF         STA   $FF
02BE4: AD 11 30      LDA   $3011
02BE7: 85 F8         STA   $F8
02BE9: AD 12 30      LDA   $3012
02BEC: 85 FA         STA   $FA
02BEE: AD 13 30      LDA   $3013
02BF1: 85 FB         STA   $FB
02BF3: 20 09 E0      JSR   $E009 ; CD_READ
02BF6: C9 00         CMP   #$00
02BF8: F0 02         BEQ   $2BFC
02BFA: 07 00         RMB0  $00
02BFC: 1F 00 44      BBR1  $00, $2C43
02BFF: 73 14 30 FC 20 03 00  TII   $3014, $20FC, $0003
02C06: AD 17 30      LDA   $3017
02C09: F0 38         BEQ   $2C43
02C0B: C9 21         CMP   #$21
02C0D: B0 34         BCS   $2C43
02C0F: 85 F8         STA   $F8
02C11: 64 FF         STZ   $FF
02C13: 64 FA         STZ   $FA
02C15: 64 FB         STZ   $FB
02C17: 20 33 E0      JSR   $E033
02C1A: C9 00         CMP   #$00
02C1C: D0 25         BNE   $2C43
02C1E: EF 00 22      BBS6  $00, $2C43
02C21: 64 FA         STZ   $FA
02C23: 64 FB         STZ   $FB
02C25: 64 F8         STZ   $F8
02C27: AD 17 30      LDA   $3017
02C2A: 0A            ASL 
02C2B: 0A            ASL 
02C2C: 0A            ASL 
02C2D: D0 04         BNE   $2C33
02C2F: A9 FF         LDA   #$FF
02C31: 85 F8         STA   $F8
02C33: 85 F9         STA   $F9
02C35: AD 18 30      LDA   $3018
02C38: 85 FF         STA   $FF
02C3A: A5 00         LDA   $00
02C3C: 29 80         AND   #$80
02C3E: 85 FE         STA   $FE
02C40: 20 3C E0      JSR   $E03C
02C43: DF 00 06      BBS5  $00, $2C4C +
02C46: 0F 00 03      BBR0  $00, $2C4C +
02C49: 20 8A E0      JSR   $E08A ; EX_BGON
;
; Set up banks
;
02C4C: A9 FF       + LDA   #$FF
02C4E: 53 01         TAM   #$01 ; bank at 0000
02C50: A9 F8         LDA   #$F8
02C52: 53 02         TAM   #$02 ; bank at 2000 (should be the same ;)
02C54: AD 08 30      LDA   $3008
02C57: 18            CLC 
02C58: 6D F5 FF      ADC   $FFF5 ; init mapping bank
02C5B: 53 04         TAM   #$04 ; bank at 4000
02C5D: AD 09 30      LDA   $3009
02C60: 18            CLC 
02C61: 6D F5 FF      ADC   $FFF5 ; init mapping bank
02C64: 53 08         TAM   #$08 ; bank at 6000
02C66: AD 0A 30      LDA   $300A
02C69: 18            CLC 
02C6A: 6D F5 FF      ADC   $FFF5 ; init mapping bank
02C6D: 53 10         TAM   #$10 ; bank at 8000
02C6F: AD 0B 30      LDA   $300B
02C72: 18            CLC 
02C73: 6D F5 FF      ADC   $FFF5 ; init mapping bank
02C76: 53 20         TAM   #$20 ; bank at A000
02C78: AD 0C 30      LDA   $300C
02C7B: 18            CLC 
02C7C: 6D F5 FF      ADC   $FFF5 ; init mapping bank
02C7F: 53 40         TAM   #$40 ; bank at C000
;
; Copy kernel info from PCE-primary-descriptor
;
02C81: 73 00 30 01 20 08 00  TII   $3000, $2001, $0008
02C88: A5 04         LDA   $04
02C8A: D0 0F         BNE   $2C9B
02C8C: 18            CLC 
02C8D: A5 07         LDA   $07
02C8F: 69 00         ADC   #$00
02C91: 85 07         STA   $07
02C93: A5 08         LDA   $08
02C95: 69 30         ADC   #$30
02C97: 85 08         STA   $08
02C99: 80 33         BRA   $2CCE
02C9B: 73 01 20 FC 20 03 00  TII   $2001, $20FC, $0003
02CA2: A9 01         LDA   #$01
02CA4: 85 FF         STA   $FF
02CA6: A5 04         LDA   $04
02CA8: 85 F8         STA   $F8
02CAA: 64 F9         STZ   $F9
;
; copy/execute the following code from $DFE0 if necessary
;
02CAC: A9 FF         LDA   #$FF
02CAE: C5 05         CMP   $05
02CB0: A9 2F         LDA   #$2F
02CB2: E5 06         SBC   $06
02CB4: 90 0A         BCC   $2CC0
02CB6: 73 C0 2C E0 DF 15 00  TII   $2CC0, $DFE0, $0015
02CBD: 4C E0 DF      JMP   $DFE0
;
; Read game kernel and transfer control to it
;
02CC0: 73 05 20 FA 20 02 00  TII   $2005, $20FA, $0002 ; copy dest address
02CC7: 20 09 E0      JSR   $E009 ; CD_READ
02CCA: C9 00         CMP   #$00
02CCC: D0 06         BNE   $2CD4 +
02CCE: A2 FF         LDX   #$FF
02CD0: 9A            TXS 
02CD1: 6C 07 20      JMP   ($2007)
02CD4: 60          + RTS      ; return to bios on failure

02CD5: 00 ...
02FFF: ... 00

;-----------------------------------------
;
; the kernel overwrites the above bytes thusly:
;

;
; This data MUST have something to do with memory allocation.
;
02C90: 00 ; base bank #
02C91: 00 ; max # banks available
;
; Allocatable memory map, bit 7 = in use
;
02C92: 00 01 56 57 C4 5E 06 26 8A 47 04 98 8B F0 8B C6
02CA2: BA 0A 00 F7 E2 8B D8 81 C3 F8 52 1E 07 26 83 7F

02CB2: 08 00 75 06 B8 FF FF E9 F3 00 8B C6 BA 0A 00 F7
02CC2: E2 8B D8 81 C3 F8 52 1E 07 26 83 7F 08 01 75 11

02CD2: FF

02CD3: ?? ?? ??

02CD6: 4C 36 E0      JMP   $E036 ; AD_READ
02CD9: 4C F8 38      JMP   $38F8

;-----------------------------------------
;
; CD extent 00000800
; might be some kind of directory data?
;
boot 03000: 00 00 02 ; CD extent of kernel
boot 03003: 04       ; CD sectors of kernel (4 sectors = 8KB)
boot 03004: 3000  ; Kernel logical load address
boot 03006: 3800  ; Kernel code start address

boot 03008: 00 ; Initial bank at 4000
boot 03009: 01 ; Initial bank at 6000
boot 0300A: 02 ; Initial bank at 8000
boot 0300B: 03 ; Initial bank at A000
boot 0300C: 04 ; Initial bank at C000

boot 0300D: 60
boot 0300E: 00 00
boot 03010: 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00
;
; Compared with $DFB6 (from last page of syscard bios)
;
boot 03020: 50 43 20 45 6E 67 69 6E 65 20 43 44 2D 52 4F 4D  PC Engine CD-ROM
boot 03030: 20 53 59 53 54 45 4D 00 43 6F 70 79 72 69 67 68   SYSTEM Copyrigh
boot 03040: 74 20 48 55 44 53 4F 4E 20 53 4F 46 54 20 2F 20  t HUDSON SOFT /
boot 03050: 4E 45 43 20 48 6F 6D 65 20 45 6C 65 63 74 72 6F  NEC Home Electro
boot 03060: 6E 69 63 73 2C 4C 74 64 2E 00 59 73 34 20 20 20  nics,Ltd. Ys4
boot 03070: 20 20 20 20 20 20 20 20 20 20 48 75 64 73 6F 6E            Hudson

boot 03080: 05 
; rest of this does not seem to be code.
boot 037FF: 3F

;*********************************************************************************
;
; Game kernel
; CD extent 00001000-00002FFF
; Logical address 3000-4FFF
;
; Game startup code, decompression library, among other things
;
;*********************************************************************************

03000: something...
037FF: ...something

;---------------------------------------------------------------------------------
;
; Ordinal table
; (also 3800 is the start code address)
;
03800: 4C 48 38      JMP   $3848 ; START HERE
03803: 4C 73 39      JMP   $3973 ; CD System Call (BIT instruction follows)
03806: 4C 6F 39      JMP   $396F ; CD System Call ALTERNATE (BIT instruction follows)
03809: 4C D0 39      JMP   $39D0
0380C: 4C B2 39      JMP   $39B2
0380F: 4C BD 39      JMP   $39BD
03812: 4C F2 39      JMP   $39F2 ; Allocate a bank (returns # in A)
03815: 4C DF 39      JMP   $39DF
03818: 4C A7 3A      JMP   $3AA7 ; Free bank # A
0381B: 4C B5 3A      JMP   $3AB5
0381E: 4C C3 3A      JMP   $3AC3
03821: 4C FA 3A      JMP   $3AFA ; Seek to a compressed block (A=bank,X=block#)
03824: 4C DE 3B      JMP   $3BDE ; Begin decompression of block at AXY
03827: 4C AD 3B      JMP   $3BAD ; adjust $A000-$DFFF double buffer bank
0382A: 4C 0D 3C      JMP   $3C0D ; decompress a byte
0382D: 4C F2 3C      JMP   $3CF2
03830: 4C 3A 3D      JMP   $3D3A
03833: 4C 51 3D      JMP   $3D51
03836: 4C 36 38      JMP   $3836 ; ---
03839: 4C 39 38      JMP   $3839 ; ---
0383C: 4C 3C 38      JMP   $383C ; ---
0383F: 4C 3F 38      JMP   $383F ; ---
03842: 4C 3F 38      JMP   $383F ; ---
03845: 4C FB 38      JMP   $38FB ; BRK

;---------------------------------------------------------------------------------
;
; START HERE
;
03848: 9C D3 2C      STZ   $2CD3 ; the $20 from JMP ($2007)?
0384B: 20 63 E0      JSR   $E063 ; EX_JOYSNS
0384E: AD 28 22      LDA   $2228 ; joystick related data
03851: 89 09         BIT   #$09
03853: F0 03         BEQ   $3858 +
03855: EE D3 2C      INC   $2CD3
03858: 20 87 E0    + JSR   $E087 ; EX_IRQOFF
0385B: A9 20         LDA   #$20
0385D: 20 B4 E0      JSR   $E0B4 ; EX_BINBCD
03860: 85 F8         STA   $F8
03862: A9 82         LDA   #$82
03864: 85 FB         STA   $FB
03866: 85 FC         STA   $FC
03868: 20 06 E0      JSR   $E006 ; CD_BASE
0386B: 73 00 30 7D 26 00 01  TII   $3000, $267D, $0100
03872: 20 5A E0      JSR   $E05A ; EX_GETVER
03875: E0 03         CPX   #$03
03877: 90 70         BCC   $38E9
03879: C0 00         CPY   #$00
0387B: 90 6C         BCC   $38E9
0387D: 20 DE E0      JSR   $E0DE ; EX_MEMOPEN
03880: B0 67         BCS   $38E9
03882: 85 01         STA   $01   ; Memory starting bank #
03884: A9 20         LDA   #$20  ; 32 banks = 256KB
03886: 20 97 3E      JSR   $3E97 ; Initialize memory allocation scheme with A banks
03889: 73 DA 38 D6 2C 06 00  TII   $38DA, $2CD6, $0006 ; copy some jump destinations
03890: A9 01         LDA   #$01
03892: 20 F2 39      JSR   $39F2 ; Allocate a bank (returns # in A)
03895: 20 00 3E      JSR   $3E00 ; Set up fake interrupt vectors
03898: 73 00 40 00 E0 00 0C  TII   $4000, $E000, $0C00 ; copy $4000-$4BFF to fake system
0389F: 20 73 39      JSR   $3973 ; CD System Call
038A2: 2C 63 E0      BIT   $E063 ; EX_JOYSNS

038A5: A0 00         LDY   #$00

038A7: B9 E1 38    - LDA   $38E1,Y
038AA: 8D 8D 2C      STA   $2C8D
038AD: B9 E0 38      LDA   $38E0,Y
038B0: F0 0A         BEQ   $38BC +
038B2: CD 28 22      CMP   $2228 ; joystick related data
038B5: F0 05         BEQ   $38BC +
038B7: C8            INY 
038B8: C8            INY 
038B9: C8            INY 
038BA: 80 EB         BRA   $38A7 -

038BC: 64 2C       + STZ   $2C
038BE: B9 E2 38      LDA   $38E2,Y
038C1: 8D 89 2C      STA   $2C89
038C4: AD 89 2C    - LDA   $2C89
038C7: 20 3A 3D      JSR   $3D3A
038CA: AD 8B 2C      LDA   $2C8B
038CD: 20 A7 3A      JSR   $3AA7 ; Free bank # A
038D0: A9 1F         LDA   #$1F
038D2: 20 F2 39      JSR   $39F2 ; Allocate a bank (returns # in A)
038D5: 20 A7 3A      JSR   $3AA7 ; Free bank # A
038D8: 80 EA         BRA   $38C4 -

;
; Jump destination code for 2CD6
;
038DA: 4C 36 E0      JMP   $E036 ; AD_READ
038DD: 4C F8 38      JMP   $38F8

038E0: 09 03 01
038E3: 0A 00 01
038E6: 00 00 A0

;---------------------------
;
; OH NO MR. BILL
; WE DON'T HAVE SYSTEM CARD 3 OR HIGHER
;
038E9: AD F5 FF      LDA   $FFF5 ; grab syscard version from there anyway
038EC: 85 01         STA   $01
038EE: A9 08         LDA   #$08  ; 8 banks = 64KB memory available :P
038F0: 20 97 3E      JSR   $3E97 ; Initialize memory allocation scheme with A banks
038F3: A9 0F         LDA   #$0F
038F5: 4C 3A 3D      JMP   $3D3A

;---------------------------
;
;
;
038F8: 78            SEI 
038F9: 80 FE         BRA   $38F9
038FB: 00            BRK 
038FC: 68            PLA 
038FD: 53 80         TAM   #$80
038FF: 68            PLA 
03900: 40            RTI 

;---------------------------------
;
; IRQ2/BRK replacement handler
;
03901: DA            PHX 
03902: BA            TSX 
03903: B3 10 02 21   TST   $10, $2102
03907: F0 0A         BEQ   $3913
03909: FA            PLX 

0390A: 1F 00 03      BBR1  $00, $3910
0390D: 4C E0 FF      JMP   $FFE0

03910: 4C D9 2C      JMP   $2CD9

03913: FA            PLX 
03914: 48            PHA 
03915: 43 80         TMA   #$80
03917: 48            PHA 
03918: 62            CLA 
03919: 53 80         TAM   #$80
0391B: A9 38         LDA   #$38
0391D: 48            PHA 
0391E: A9 FC         LDA   #$FC
03920: 48            PHA 
03921: 08            PHP 
03922: 4C 00 00      JMP   $xxxx ; IRQ2/BRK vector filled here

;---------------------------------
;
; IRQ1 replacement handler
;
03925: 48            PHA 
03926: 43 80         TMA   #$80
03928: 48            PHA 
03929: 62            CLA 
0392A: 53 80         TAM   #$80
0392C: A9 38         LDA   #$38
0392E: 48            PHA 
0392F: A9 FC         LDA   #$FC
03931: 48            PHA 
03932: 08            PHP 
03933: 4C 00 00      JMP   $xxxx ; IRQ1 vector filled here

;---------------------------------
;
; TIMER replacement handler
;
03936: 48            PHA 
03937: 43 80         TMA   #$80
03939: 48            PHA 
0393A: 62            CLA 
0393B: 53 80         TAM   #$80
0393D: A9 38         LDA   #$38
0393F: 48            PHA 
03940: A9 FC         LDA   #$FC
03942: 48            PHA 
03943: 08            PHP 
03944: 4C 00 00      JMP   $xxxx ; TIMER vector filled here

;---------------------------------
;
; NMI replacement handler
;
03947: 1F 00 C6      BBR1  $00, $3910
0394A: 4C E0 FF      JMP   $FFE0

0394D: 48            PHA 
0394E: 43 80         TMA   #$80
03950: 48            PHA 
03951: 62            CLA 
03952: 53 80         TAM   #$80
03954: A9 38         LDA   #$38
03956: 48            PHA 
03957: A9 FC         LDA   #$FC
03959: 48            PHA 
0395A: 08            PHP 
0395B: 4C 00 00      JMP   $xxxx ; NMI vector filled here

;---------------------------------
;
; RESET replacement handler
;
0395E: 48            PHA 
0395F: 43 80         TMA   #$80
03961: 48            PHA 
03962: 62            CLA 
03963: 53 80         TAM   #$80
03965: A9 38         LDA   #$38
03967: 48            PHA 
03968: A9 FC         LDA   #$FC
0396A: 48            PHA 
0396B: 08            PHP 
0396C: 4C 00 00      JMP   $xxxx ; RESET vector filled here

;----------------------
;
; Ordinal fom 3806
;
; CD System Call ALTERNATE (BIT instruction follows)
;
0396F: A7 00         SMB2  $00
03971: 80 02         BRA   $3975

;---------------------
;
; Ordinal fom 3803
;
; CD System Call (BIT instruction follows)
;
03973: 27 00         RMB2  $00
03975: 48            PHA 
03976: DA            PHX 
03977: 5A            PHY 
03978: BA            TSX 
03979: BD 04 21      LDA   $2104,X
0397C: 85 20         STA   $20
0397E: BD 05 21      LDA   $2105,X
03981: 85 21         STA   $21
03983: A0 02         LDY   #$02
03985: B1 20         LDA   ($20),Y
03987: 8D 9A 39      STA   $399A
0398A: C8            INY 
0398B: B1 20         LDA   ($20),Y
0398D: 8D 9B 39      STA   $399B
03990: 62            CLA 
03991: 53 80         TAM   #$80
03993: AF 00 10      BBS2  $00, $39A6
03996: 7A            PLY 
03997: FA            PLX 
03998: 68            PLA 
03999: 20 00 00      JSR   $0000
0399C: AF 00 0B      BBS2  $00, $39AA
0399F: 48            PHA 
039A0: A5 22         LDA   $22
039A2: 53 80         TAM   #$80
039A4: 68            PLA 
039A5: 60            RTS 

039A6: 44 0A         BSR   $39B2
039A8: 80 EC         BRA   $3996

039AA: C9 00         CMP   #$00
039AC: F0 F1         BEQ   $399F
039AE: 44 0D         BSR   $39BD
039B0: 80 E7         BRA   $3999

039B2: A2 07         LDX   #$07
039B4: B5 F8         LDA   $F8,X
039B6: 9D C8 39      STA   $39C8,X
039B9: CA            DEX 
039BA: 10 F8         BPL   $39B4
039BC: 60            RTS 

039BD: A2 07         LDX   #$07
039BF: BD C8 39      LDA   $39C8,X
039C2: 95 F8         STA   $F8,X
039C4: CA            DEX 
039C5: 10 F8         BPL   $39BF
039C7: 60            RTS 

039C8: 00 00 00 00 00 00 00 00

039D0: 85 FF         STA   $FF
039D2: 62            CLA 
039D3: 53 80         TAM   #$80
039D5: 20 D8 E0      JSR   $E0D8 ; PSG_BIOS
039D8: 48            PHA 
039D9: A5 22         LDA   $22
039DB: 53 80         TAM   #$80
039DD: 68            PLA 
039DE: 60            RTS 


039DF: DA            PHX 
039E0: 48            PHA 
039E1: 8A            TXA 
039E2: 20 C3 3A      JSR   $3AC3
039E5: 90 05         BCC   $39EC
039E7: 68            PLA 
039E8: 44 08         BSR   $39F2 ; Allocate a bank (returns # in A)
039EA: 80 01         BRA   $39ED
039EC: FA            PLX 
039ED: FA            PLX 
039EE: 20 B5 3A      JSR   $3AB5
039F1: 60            RTS 

;---------------------
;
; Ordinal from 3812
;
; Allocate a bank
;
039F2: 85 18         STA   $18
039F4: 64 1A         STZ   $1A
039F6: AE D2 2C      LDX   $2CD2

039F9: EC 91 2C    - CPX   $2C91 ; max # banks available
039FC: 90 01         BCC   $39FF +
039FE: 82            CLX 
039FF: 3C 92 2C    + BIT   $2C92,X
03A02: 30 0B         BMI   $3A0F +
03A04: 50 09         BVC   $3A0F +
03A06: BD 92 2C      LDA   $2C92,X
03A09: 29 3F         AND   #$3F
03A0B: C5 18         CMP   $18
03A0D: B0 14         BCS   $3A23 ++
03A0F: E8          + INX 
03A10: EC D2 2C      CPX   $2CD2
03A13: D0 E4         BNE   $39F9 -
03A15: A5 1A         LDA   $1A
03A17: D0 43         BNE   $3A5C
03A19: E6 1A         INC   $1A
03A1B: 44 4F         BSR   $3A6C
03A1D: 82            CLX 
03A1E: 8E D2 2C      STX   $2CD2
03A21: 80 D6         BRA   $39F9 -

03A23: 9E B2 2C   ++ STZ   $2CB2,X
03A26: 86 19         STX   $19
03A28: D0 09         BNE   $3A33
03A2A: 8A            TXA 
03A2B: 18            CLC 
03A2C: 65 18         ADC   $18
03A2E: 8D D2 2C      STA   $2CD2
03A31: 80 19         BRA   $3A4C
03A33: 48            PHA 
03A34: A5 18         LDA   $18
03A36: 09 40         ORA   #$40
03A38: 9D 92 2C      STA   $2C92,X
03A3B: 8A            TXA 
03A3C: 18            CLC 
03A3D: 65 18         ADC   $18
03A3F: AA            TAX 
03A40: 68            PLA 
03A41: 38            SEC 
03A42: E5 18         SBC   $18
03A44: 09 40         ORA   #$40
03A46: 9D 92 2C      STA   $2C92,X
03A49: 8E D2 2C      STX   $2CD2
03A4C: A6 19         LDX   $19
03A4E: BD 92 2C      LDA   $2C92,X
03A51: 09 80         ORA   #$80
03A53: 9D 92 2C      STA   $2C92,X
03A56: 8A            TXA 
03A57: 18            CLC 
03A58: 6D 90 2C      ADC   $2C90 ; base bank #
03A5B: 60            RTS 


03A5C: 00            BRK 

03A5D: 6F 75 74      BBR6  $75, $3AD4
03A60: 5F 6F 66      BBR5  $6F, $3AC9
03A63: 5F 6D 65      BBR5  $6D, $3ACB
03A66: 6D 6F 72      ADC   $726F
03A69: 79 00 60      ADC   $6000,Y

03A6C: 82            CLX 
03A6D: 3C 92 2C    - BIT   $2C92,X
03A70: 50 02         BVC   $3A74 +
03A72: 10 07         BPL   $3A7B ++
03A74: E8       -- + INX 
03A75: EC 91 2C      CPX   $2C91 ; max # banks available
03A78: 90 F3         BCC   $3A6D -
03A7A: 60            RTS 

03A7B: 8A         ++ TXA 
03A7C: A8            TAY 
03A7D: 80 07         BRA   $3A86 +
03A7F: 3C 92 2C    - BIT   $2C92,X
03A82: 30 F0         BMI   $3A74 --
03A84: 70 07         BVS   $3A8D ++
03A86: E8       -- + INX 
03A87: EC 91 2C      CPX   $2C91 ; max # banks available
03A8A: 90 F3         BCC   $3A7F -
03A8C: 60            RTS 

03A8D: 62         ++ CLA 
03A8E: 99 B2 2C      STA   $2CB2,Y
03A91: 9E B2 2C      STZ   $2CB2,X
03A94: B9 92 2C      LDA   $2C92,Y
03A97: 18            CLC 
03A98: 7D 92 2C      ADC   $2C92,X
03A9B: 29 3F         AND   #$3F
03A9D: 09 40         ORA   #$40
03A9F: 99 92 2C      STA   $2C92,Y
03AA2: 9E 92 2C      STZ   $2C92,X
03AA5: 80 DF         BRA   $3A86 --

;---------------------------------------
;
; Ordinal from 3818
;
; Free bank # A
;
03AA7: 38            SEC 
03AA8: ED 90 2C      SBC   $2C90 ; base bank #
03AAB: AA            TAX 
03AAC: BD 92 2C      LDA   $2C92,X
03AAF: 29 7F         AND   #$7F
03AB1: 9D 92 2C      STA   $2C92,X
03AB4: 60            RTS 

;-----------------------------------------------------------
;
;
;
03AB5: 38            SEC 
03AB6: ED 90 2C      SBC   $2C90 ; base bank #
03AB9: 22            SAX 
03ABA: 9D B2 2C      STA   $2CB2,X
03ABD: 22            SAX 
03ABE: 18            CLC 
03ABF: 6D 90 2C      ADC   $2C90 ; base bank #
03AC2: 60            RTS 

;-----------------------------------------------------------
;
;
;
03AC3: 85 18         STA   $18
03AC5: 20 DB 3A      JSR   $3ADB
03AC8: B0 0B         BCS   $3AD5
03ACA: BD 92 2C      LDA   $2C92,X
03ACD: 09 80         ORA   #$80
03ACF: 9D 92 2C      STA   $2C92,X
03AD2: 8A            TXA 
03AD3: 18            CLC 
03AD4: 60            RTS 
03AD5: 18            CLC 
03AD6: 6D 90 2C      ADC   $2C90 ; base bank #
03AD9: 38            SEC 
03ADA: 60            RTS 

;-----------------------------------------------------------
;
;
;
03ADB: 82            CLX 
03ADC: 3C 92 2C    - BIT   $2C92,X
03ADF: 30 09         BMI   $3AEA +
03AE1: 50 07         BVC   $3AEA +
03AE3: BD B2 2C      LDA   $2CB2,X
03AE6: C5 18         CMP   $18
03AE8: F0 0E         BEQ   $3AF8 ++
03AEA: 8A          + TXA 
03AEB: 18            CLC 
03AEC: 7D 92 2C      ADC   $2C92,X
03AEF: 29 3F         AND   #$3F
03AF1: AA            TAX 
03AF2: EC 91 2C      CPX   $2C91 ; max # banks available
03AF5: 90 E5         BCC   $3ADC -
03AF7: 60            RTS 
03AF8: 18         ++ CLC 
03AF9: 60            RTS 

;---------------------------------
;
; Ordinal from 3821
;
; Seek to a compressed block (A=bank,X=block#)
;
; Called before decompression begins
;
03AFA: 18            CLC 
03AFB: 65 01         ADC   $01   ; total base RAM bank #
03AFD: 85 18         STA   $18
03AFF: 53 20         TAM   #$20  ; put this bank at A000-BFFF
03B01: 1A            INC 
03B02: 53 40         TAM   #$40  ; ... and the next one at C000-DFFF
;
; starting pointer offset $A000
;
03B04: 64 1A         STZ   $1A
03B06: A9 A0         LDA   #$A0
03B08: 85 1B         STA   $1B

03B0A: 8A            TXA 
03B0B: F0 3C         BEQ   $3B49 ixz ; check if index is 0
03B0D: CA            DEX         ; 'cause the indexes are really based at 1

03B0E: A5 1A         LDA   $1A
03B10: 18            CLC 
03B11: 72 1A         ADC   ($1A)
03B13: 48            PHA 
03B14: A0 01         LDY   #$01
03B16: A5 1B         LDA   $1B
03B18: 71 1A         ADC   ($1A),Y
03B1A: A8            TAY 
03B1B: 68            PLA 
03B1C: 18            CLC 
03B1D: 69 02         ADC   #$02
03B1F: 85 1A         STA   $1A
03B21: 98            TYA 
03B22: 69 00         ADC   #$00
03B24: 85 1B         STA   $1B


03B26: A5 1B         LDA   $1B
03B28: 38            SEC 
03B29: E9 A0         SBC   #$A0
03B2B: C9 20         CMP   #$20
03B2D: 90 DB         BCC   $3B0A
03B2F: A8            TAY 
03B30: 29 1F         AND   #$1F
03B32: 09 A0         ORA   #$A0
03B34: 85 1B         STA   $1B
03B36: 98            TYA 
03B37: 0A            ASL 
03B38: 2A            ROL 
03B39: 2A            ROL 
03B3A: 2A            ROL 
03B3B: 29 07         AND   #$07
03B3D: 18            CLC 
03B3E: 65 18         ADC   $18
03B40: 85 18         STA   $18
03B42: 53 20         TAM   #$20
03B44: 1A            INC 
03B45: 53 40         TAM   #$40
03B47: 80 C1         BRA   $3B0A
;
; index was 0! whatever shall we do
;
03B49: A5 1A    ixz: LDA   $1A
03B4B: 18            CLC 
03B4C: 69 02         ADC   #$02
03B4E: AA            TAX 
03B4F: A5 1B         LDA   $1B
03B51: 29 1F         AND   #$1F
03B53: 69 00         ADC   #$00
03B55: A8            TAY 
03B56: C0 20         CPY   #$20
03B58: 90 03         BCC   $3B5D +
03B5A: C2            CLY 
03B5B: E6 18         INC   $18
03B5D: A5 18       + LDA   $18
03B5F: 53 20         TAM   #$20
03B61: 1A            INC 
03B62: 53 40         TAM   #$40
03B64: 3A            DEC 
03B65: 38            SEC 
03B66: E5 01         SBC   $01
03B68: 60            RTS 

;---------------------------------------
;
; Prepare AXY address at $23-$25
;
03B69: 85 23         STA   $23
03B6B: 86 24         STX   $24
03B6D: 84 25         STY   $25
03B6F: 1A            INC 
03B70: D0 0E         BNE   $3B80 +
;
; Bank is = $FF, so ignore bank switching junk
;
03B72: 64 2A         STZ   $2A
03B74: A9 80         LDA   #$80  ; skip usual $24 loader thingy
03B76: 8D C6 3B      STA   $3BC6
03B79: A9 07         LDA   #$07
03B7B: 8D C7 3B      STA   $3BC7
03B7E: 80 26         BRA   $3BA6 done
;
; Bank is < $FF, so prepare bank switching junk
;
03B80: A9 B2       + LDA   #$B2  ; prepare usual $24 loader thingy
03B82: 8D C6 3B      STA   $3BC6
03B85: A9 24         LDA   #$24
03B87: 8D C7 3B      STA   $3BC7
03B8A: 98            TYA         ; convert address upper into bank #
03B8B: 29 E0         AND   #$E0
03B8D: 0A            ASL 
03B8E: 2A            ROL 
03B8F: 2A            ROL 
03B90: 2A            ROL 
03B91: 29 07         AND   #$07
03B93: 18            CLC 
03B94: 65 23         ADC   $23
03B96: 65 01         ADC   $01
03B98: 85 23         STA   $23
03B9A: 98            TYA 
03B9B: 29 1F         AND   #$1F
03B9D: 09 A0         ORA   #$A0  ; chop upper address bits and add $A000
03B9F: A8            TAY 
03BA0: 86 24         STX   $24
03BA2: 84 25         STY   $25
03BA4: 44 07         BSR   $3BAD ; adjust double buffer bank
03BA6: A9 80   done: LDA   #$80
03BA8: 85 27         STA   $27
03BAA: 64 29         STZ   $29
03BAC: 60            RTS 

;---------------------------------
;
; Ordinal from 3827
;
; Adjust $23($24) bank/address
; so it stays within $A000-$DFFF
; If $23 is $FF (banks not used?) then forget it
;
03BAD: A5 23         LDA   $23
03BAF: 1A            INC 
03BB0: F0 13         BEQ   $3BC5 exit
03BB2: A5 25         LDA   $25
03BB4: C9 C0         CMP   #$C0
03BB6: 90 06         BCC   $3BBE +
03BB8: E9 20         SBC   #$20
03BBA: 85 25         STA   $25
03BBC: E6 23         INC   $23
03BBE: A5 23       + LDA   $23
03BC0: 53 20         TAM   #$20
03BC2: 1A            INC 
03BC3: 53 40         TAM   #$40
03BC5: 60      exit: RTS 

;----------------------------------
;
; Load next source byte
;
; normal bank routine
;
03BC6: B2 24         LDA   ($24)
03BC8: E6 24         INC   $24
03BCA: D0 02         BNE   $3BCE +
03BCC: E6 25         INC   $25
03BCE: 60          + RTS 
;
; Bank $FF routine
;
03BCF: DA            PHX 
03BD0: A6 2A         LDX   $2A
03BD2: D0 03         BNE   $3BD7 +
03BD4: 20 AF 3C      JSR   $3CAF ; Play ADPCM?
03BD7: BD 7D 27    + LDA   $277D,X
03BDA: E6 2A         INC   $2A
03BDC: FA            PLX 
03BDD: 60            RTS 

;----------------------------------------------
;
; Ordinal from 3824
;
; Begin decompression of block at AXY
;
03BDE: 20 69 3B      JSR   $3B69 ; Prepare AXY address at $23-$25
03BE1: 20 C6 3B      JSR   $3BC6 ; Load next source byte
03BE4: C9 02         CMP   #$02
03BE6: 90 01         BCC   $3BE9 +
03BE8: 00            BRK         ; trap if not $00 or $01
03BE9: 0A          + ASL 
03BEA: AA            TAX 
03BEB: BD 09 3C      LDA   $3C09,X
03BEE: 8D 0F 3C      STA   $3C0F
03BF1: BD 0A 3C      LDA   $3C0A,X
03BF4: 8D 10 3C      STA   $3C10
03BF7: A9 2C         LDA   #$2C    ; BIT
03BF9: 8D 0E 3C      STA   $3C0E   ; always skip decomphi at first.
03BFC: 9C 5A 3C      STZ   $3C5A   ; zero destination for lo
03BFF: 9C A9 3C      STZ   $3CA9   ; zero destination for hi
03C02: 9C 17 3C      STZ   $3C17   ; no matches in lo routine
03C05: 9C 66 3C      STZ   $3C66   ; no matches in hi routine
03C08: 60            RTS 

03C09: 3C11 ; decomplo    ; block type $00 means "normal decompression"
03C0B: 3C60 ; decomphi    ; block type $01 means "hi/lo decompression for graphics"

;----------------------------------------
;
; Ordinal from 382A
;
; Decompress a single byte
;
03C0D: EA            NOP
03C0E: 4C 60 3C      JMP   $3C60   ; can be modified to 2C (BIT)

;
; decomplo
; decompress low byte ($3E00-$3EFF)
;
03C11: A9 4C         LDA   #$4C
03C13: 8D 0E 3C      STA   $3C0E
03C16: A9 00         LDA   #$00 ; modified
03C18: D0 36         BNE   $3C50
03C1A: 06 27         ASL   $27
03C1C: 90 07         BCC   $3C25
03C1E: 26 27         ROL   $27
03C20: 20 C6 3B      JSR   $3BC6 ; load from ($24)++ ?
03C23: 85 26         STA   $26
03C25: 26 26         ROL   $26
03C27: 90 05         BCC   $3C2E
03C29: 20 C6 3B      JSR   $3BC6 ; load from ($24)++ ?
03C2C: 80 2B         BRA   $3C59
03C2E: 20 C6 3B      JSR   $3BC6 ; load from ($24)++ ?
03C31: 8D 51 3C      STA   $3C51 ; match source
03C34: 62            CLA 
03C35: 8F 29 0D      BBS0  $29, $3C45 +
03C38: 87 29         SMB0  $29
03C3A: 20 C6 3B      JSR   $3BC6 ; load from ($24)++ ?
03C3D: 85 28         STA   $28
03C3F: 4A            LSR 
03C40: 4A            LSR 
03C41: 4A            LSR 
03C42: 4A            LSR 
03C43: 80 06         BRA   $3C4B ++
03C45: 07 29       + RMB0  $29
03C47: A5 28         LDA   $28
03C49: 29 0F         AND   #$0F
03C4B: 1A         ++ INC 
03C4C: 1A            INC 
03C4D: 8D 17 3C      STA   $3C17
03C50: AD 00 3E      LDA   $3E00 ; modified
03C53: EE 51 3C      INC   $3C51
03C56: CE 17 3C      DEC   $3C17
03C59: 8D 00 3E      STA   $3E00 ; modified
03C5C: EE 5A 3C      INC   $3C5A
03C5F: 60            RTS 
;
; decomphi
; decompress high byte ($3E00-$3EFF)
;
03C60: A9 2C         LDA   #$2C
03C62: 8D 0E 3C      STA   $3C0E
03C65: A9 00         LDA   #$00  <- SMC; number of leftover match bytes!
03C67: D0 36         BNE   $3C9F
03C69: 06 27         ASL   $27
03C6B: 90 07         BCC   $3C74 +
03C6D: 26 27         ROL   $27
03C6F: 20 C6 3B      JSR   $3BC6
03C72: 85 26         STA   $26
03C74: 26 26       + ROL   $26
03C76: 90 05         BCC   $3C7D +
03C78: 20 C6 3B      JSR   $3BC6 ; load literal! yay!
03C7B: 80 2B         BRA   $3CA8 stb
03C7D: 20 C6 3B    + JSR   $3BC6 ; load first part of a match.
03C80: 8D A0 3C      STA   $3CA0
03C83: 62            CLA 
03C84: 8F 29 0D      BBS0  $29, $3C94 +
03C87: 87 29         SMB0  $29
03C89: 20 C6 3B      JSR   $3BC6 ; load another byte in this situation only
03C8C: 85 28         STA   $28
03C8E: 4A            LSR 
03C8F: 4A            LSR 
03C90: 4A            LSR 
03C91: 4A            LSR 
03C92: 80 06         BRA   $3C9A ++
03C94: 07 29       + RMB0  $29
03C96: A5 28         LDA   $28
03C98: 29 0F         AND   #$0F
03C9A: 1A         ++ INC 
03C9B: 1A            INC 
03C9C: 8D 66 3C      STA   $3C66 ; # leftover match bytes

03C9F: AD 00 3F      LDA   $3F00 ; load match
03CA2: EE A0 3C      INC   $3CA0
03CA5: CE 66 3C      DEC   $3C66 ; decrease leftover match bytes
03CA8: 8D 00 3F stb: STA   $3F00
03CAB: EE A9 3C      INC   $3CA9
03CAE: 60            RTS 

;------------------------------------------------------------------
;
; Play ADPCM?
;
03CAF: DA            PHX 
03CB0: 5A            PHY 
03CB1: 73 F8 20 7D 28 08 00  TII   $20F8, $287D, $0008
03CB8: 20 73 39      JSR   $3973 ; CD System Call
03CBB: 2C 42 E0      BIT   $E042 ; AD_STOP
03CBE: 20 73 39    - JSR   $3973 ; CD System Call
03CC1: 2C 45 E0      BIT   $E045 ; AD_STAT
03CC4: C9 00         CMP   #$00
03CC6: D0 F6         BNE   $3CBE -
03CC8: A5 24         LDA   $24
03CCA: 85 FC         STA   $FC
03CCC: A5 25         LDA   $25
03CCE: 85 FD         STA   $FD
03CD0: 64 FF         STZ   $FF
03CD2: A9 7D         LDA   #$7D
03CD4: 85 FA         STA   $FA
03CD6: A9 27         LDA   #$27
03CD8: 85 FB         STA   $FB
03CDA: 64 F8         STZ   $F8
03CDC: A9 01         LDA   #$01
03CDE: 85 F9         STA   $F9
03CE0: 20 73 39      JSR   $3973 ; CD System Call
03CE3: 2C D6 2C      BIT   $2CD6 ; j_AD_READ
03CE6: E6 25         INC   $25
03CE8: 73 7D 28 F8 20 08 00  TII   $287D, $20F8, $0008
03CEF: 7A            PLY 
03CF0: FA            PLX 
03CF1: 60            RTS 

;------------------------------------------------------------------
;
;
;
03CF2: 8D 85 2C      STA   $2C85
03CF5: AA            TAX 
03CF6: BD 7D 26      LDA   $267D,X
03CF9: 85 F9         STA   $F9
03CFB: 8A            TXA 
03CFC: 20 C3 3A      JSR   $3AC3
03CFF: 90 38         BCC   $3D39
03D01: A5 F9         LDA   $F9
03D03: 3A            DEC 
03D04: 4A            LSR 
03D05: 4A            LSR 
03D06: 1A            INC 
03D07: 20 F2 39      JSR   $39F2 ; Allocate a bank (returns # in A)
03D0A: 8D 86 2C      STA   $2C86
03D0D: AE 85 2C      LDX   $2C85
03D10: 20 B5 3A      JSR   $3AB5
03D13: 43 40         TMA   #$40
03D15: 48            PHA 
03D16: AD 85 2C      LDA   $2C85
03D19: 20 51 3D      JSR   $3D51
03D1C: A9 06         LDA   #$06
03D1E: 85 FF         STA   $FF
03D20: AD 86 2C      LDA   $2C86
03D23: 18            CLC 
03D24: 65 01         ADC   $01
03D26: 85 FA         STA   $FA
03D28: 20 73 39      JSR   $3973 ; CD System Call
03D2B: 2C 09 E0      BIT   $E009 ; CD_READ
03D2E: C9 00         CMP   #$00
03D30: D0 E4         BNE   $3D16
03D32: 68            PLA 
03D33: 53 40         TAM   #$40
03D35: AD 86 2C      LDA   $2C86
03D38: 18            CLC 
03D39: 60            RTS 
03D3A: AE 8A 2C      LDX   $2C8A
03D3D: 8E 8C 2C      STX   $2C8C
03D40: 8D 8A 2C      STA   $2C8A
03D43: 20 F2 3C      JSR   $3CF2
03D46: 8D 8B 2C      STA   $2C8B
03D49: 18            CLC 
03D4A: 65 01         ADC   $01
03D4C: 53 10         TAM   #$10
03D4E: 4C 02 80      JMP   $8002
03D51: AA            TAX 
03D52: BD 7D 26      LDA   $267D,X
03D55: 85 F8         STA   $F8
03D57: 8A            TXA 
03D58: 64 FD         STZ   $FD
03D5A: A2 06         LDX   #$06
03D5C: 0A            ASL 
03D5D: 26 FD         ROL   $FD
03D5F: CA            DEX 
03D60: D0 FA         BNE   $3D5C
03D62: 18            CLC 
03D63: 69 02         ADC   #$02
03D65: 85 FE         STA   $FE
03D67: A5 FD         LDA   $FD
03D69: 69 00         ADC   #$00
03D6B: 85 FD         STA   $FD
03D6D: 62            CLA 
03D6E: 69 00         ADC   #$00
03D70: 85 FC         STA   $FC
03D72: 60            RTS 

03D73: 00 ...
03DFF: ... 00

;--------------------------------------------
;
; Set up fake interrupt vectors
; Also hooks some sort of "DB rom" thing
;
; (this is overwritten by the decomp buffer)
;
03E00: 18            CLC 
03E01: 65 01         ADC   $01
03E03: 85 22         STA   $22
03E05: 53 40         TAM   #$40
03E07: 62            CLA 
03E08: 53 80         TAM   #$80
03E0A: 73 E0 FF E0 DF 20 00  TII   $FFE0, $DFE0, $0020 ; copy of entire vector table
03E11: 73 F6 FF 23 39 02 00  TII   $FFF6, $3923, $0002 ; IRQ2/BRK
03E18: 73 F8 FF 34 39 02 00  TII   $FFF8, $3934, $0002 ; IRQ1
03E1F: 73 FA FF 45 39 02 00  TII   $FFFA, $3945, $0002 ; TIMER
03E26: 73 FC FF 5C 39 02 00  TII   $FFFC, $395C, $0002 ; NMI
03E2D: 73 FE FF 6D 39 02 00  TII   $FFFE, $396D, $0002 ; RESET
03E34: 73 8D 3E F6 DF 0A 00  TII   $3E8D, $DFF6, $000A
03E3B: 17 00         RMB1  $00
03E3D: A9 FC         LDA   #$FC
03E3F: 53 80         TAM   #$80
03E41: 44 35         BSR   $3E78 ; Check for presence of "DB rom" at $F200
03E43: D0 2E         BNE   $3E73 done
03E45: 97 00         SMB1  $00
03E47: AE 11 E0      LDX   $E011
03E4A: AD 12 E0      LDA   $E012
03E4D: C9 FF         CMP   #$FF
03E4F: F0 0C         BEQ   $3E5D +
03E51: C9 39         CMP   #$39
03E53: F0 08         BEQ   $3E5D +
03E55: 8E 06 F2      STX   $F206
03E58: 8D 07 F2      STA   $F207
03E5B: 80 06         BRA   $3E63
03E5D: AE 06 F2    + LDX   $F206
03E60: AD 07 F2      LDA   $F207
03E63: 8E 23 39      STX   $3923
03E66: 8D 24 39      STA   $3924
03E69: A9 01         LDA   #$01
03E6B: 8D 11 E0      STA   $E011
03E6E: A9 39         LDA   #$39
03E70: 8D 12 E0      STA   $E012

03E73: A5 22   done: LDA   $22   ; fake interrupt vector bank
03E75: 53 80         TAM   #$80  ; store it there
03E77: 60            RTS 

;
; Check for presence of "DB rom" at $F200
;
03E78: C2            CLY 
03E79: B9 87 3E      LDA   $3E87,Y
03E7C: D9 00 F2      CMP   $F200,Y
03E7F: D0 05         BNE   $3E86 +
03E81: C8            INY 
03E82: C0 06         CPY   #$06
03E84: D0 F3         BNE   $3E79
03E86: 60          + RTS 
03E87: ASCII "DB rom"

;
; Replacement vectors
;
03E8D: 3901 ; IRQ2/BRK
03E8F: 3925 ; IRQ1
03E91: 3936 ; TIMER
03E93: 3947 ; NMI
03E95: 395E ; RESET

;------------------------------------------------------------
;
; Initialize memory allocation scheme with A banks
; Input: A = # banks available
;
03E97: F3 AD 3E 90 2C 43 00 TAI $3EAD, $2C90, $0043
03E9E: 9C 90 2C      STZ   $2C90 ; base bank #
03EA1: 8D 91 2C      STA   $2C91 ; max # banks available
03EA4: 09 40         ORA   #$40
03EA6: 8D 92 2C      STA   $2C92
03EA9: 9C D2 2C      STZ   $2CD2
03EAC: 60            RTS 

;
; data of some kind?
;
03EAD: 00 00 00 01 56 
03EB2: 57 C4    
03EB4: 5E 06 26 
03EB7: 8A       
03EB8: 47 04    
03EBA: 98       
03EBB: 8B       
03EBC: F0 8B    
03EBE: C6 BA    
03EC0: 0A       
03EC1: 00       
03EC2: F7 E2    
03EC4: 8B       
03EC5: D8       
03EC6: 81 C3    
03EC8: F8       
03EC9: 52 1E    
03ECB: 07 26    
03ECD: 83 7F 08 
03ED0: 00       
03ED1: 75 06    
03ED3: B8       
03ED4: FF FF E9 
03ED7: F3 00 8B C6 BA 0A 00  
03EDE: F7 E2       
03EE0: 8B          
03EE1: D8          
03EE2: 81 C3       
03EE4: F8          
03EE5: 52 1E       
03EE7: 07 26       
03EE9: 83 7F 08    
03EEC: 01 75       
03EEE: 11 FF       

;
;
;
03EF0: 76 08         ROR   $08,X
03EF2: FF 76 06      BBS7  $76, $3EFB
03EF5: 9A            TXS 
03EF6: 02            SXY 
03EF7: 00            BRK 
03EF8: 7F 43 59      BBR7  $43, $3F54
03EFB: 59 8B F8      EOR   $F88B,Y
03EFE: EB            ??? 
03EFF: 5C            ??? 
03F00: FF 76 08      BBS7  $76, $3F0B
03F03: FF 76 06      BBS7  $76, $3F0C
03F06: 9A            TXS 
03F07: 02            SXY 
03F08: 00            BRK 
03F09: 7F 43 59      BBR7  $43, $3F65
03F0C: 59 8B C6      EOR   $C68B,Y
03F0F: BA            TSX 
03F10: 0A            ASL 
03F11: 00            BRK 
03F12: F7 E2         SMB7  $E2
03F14: 8B            ??? 
03F15: D8            CLD 
03F16: 81 C3         STA   ($C3,X)
03F18: F8            SED 
03F19: 52 1E         EOR   ($1E)
03F1B: 07 26         RMB0  $26
03F1D: FF 77 06      BBS7  $77, $3F26
03F20: 26 FF         ROL   $FF
03F22: 77 04         RMB7  $04
03F24: 8B            ??? 
03F25: C6 BA         DEC   $BA
03F27: 0A            ASL 
03F28: 00            BRK 
03F29: F7 E2         SMB7  $E2
03F2B: 8B            ??? 
03F2C: D8            CLD 
03F2D: 81 C3         STA   ($C3,X)
03F2F: F8            SED 
03F30: 52 1E         EOR   ($1E)
03F32: 07 26         RMB0  $26
03F34: FF 77 02      BBS7  $77, $3F39
03F37: 26 FF         ROL   $FF
03F39: 37 1E         RMB3  $1E
03F3B: B8            CLV 
03F3C: B6 11         LDX   $11,Y
03F3E: 50 16         BVC   $3F56
03F40: 8D 86 00      STA   $0086
03F43: FF 50 9A      BBS7  $50, $3EE0
03F46: 3D 00 14      AND   $1400,X
03F49: 46 83         LSR   $83
03F4B: C4 10         CPY   $10
03F4D: 16 8D         ASL   $8D,X
03F4F: 86 00         STX   $00
03F51: FF 50 9A      BBS7  $50, $3EEE
03F54: 07 00         RMB0  $00
03F56: 30 47         BMI   $3F9F
03F58: 59 59 8B      EOR   $8B59,Y
03F5B: F8            SED 
03F5C: 8B            ??? 
03F5D: C6 BA         DEC   $BA
03F5F: 0A            ASL 
03F60: 00            BRK 
03F61: F7 E2         SMB7  $E2
03F63: 8B            ??? 
03F64: D8            CLD 
03F65: 81 C3         STA   ($C3,X)
03F67: F8            SED 
03F68: 52 1E         EOR   ($1E)
03F6A: 07 26         RMB0  $26
03F6C: FF 77 06      BBS7  $77, $3F75
03F6F: 26 FF         ROL   $FF
03F71: 77 04         RMB7  $04
03F73: 9A            TXS 
03F74: 0B            ??? 
03F75: 00            BRK 
03F76: DE 43 59      DEC   $5943,X
03F79: 59 8B C6      EOR   $C68B,Y
03F7C: BA            TSX 
03F7D: 0A            ASL 
03F7E: 00            BRK 
03F7F: F7 E2         SMB7  $E2
03F81: 8B            ??? 
03F82: D8            CLD 
03F83: 81 C3         STA   ($C3,X)
03F85: F8            SED 
03F86: 52 1E         EOR   ($1E)
03F88: 07 26         RMB0  $26
03F8A: C7 47         SMB4  $47
03F8C: 08            PHP 
03F8D: 00            BRK 
03F8E: 00            BRK 
03F8F: 8B            ??? 
03F90: C6 BA         DEC   $BA
03F92: 0A            ASL 
03F93: 00            BRK 
03F94: F7 E2         SMB7  $E2
03F96: 8B            ??? 
03F97: D8            CLD 
03F98: 81 C3         STA   ($C3,X)
03F9A: F8            SED 
03F9B: 52 1E         EOR   ($1E)
03F9D: 07 26         RMB0  $26
03F9F: FF 77 06      BBS7  $77, $3FA8
03FA2: 26 FF         ROL   $FF
03FA4: 77 04         RMB7  $04
03FA6: 9A            TXS 
03FA7: 08            PHP 
03FA8: 00            BRK 
03FA9: 8C 44 59      STY   $5944
03FAC: 59 8B C6      EOR   $C68B,Y
03FAF: BA            TSX 
03FB0: 0A            ASL 
03FB1: 00            BRK 
03FB2: F7 E2         SMB7  $E2
03FB4: 8B            ??? 
03FB5: D8            CLD 
03FB6: 81 C3         STA   ($C3,X)
03FB8: F8            SED 
03FB9: 52 1E         EOR   ($1E)
03FBB: 07 26         RMB0  $26
03FBD: FF 77 02      BBS7  $77, $3FC2
03FC0: 26 FF         ROL   $FF
03FC2: 37 9A         RMB3  $9A
03FC4: 08            PHP 
03FC5: 00            BRK 
03FC6: 8C 44 59      STY   $5944
03FC9: 59 8B C7      EOR   $C78B,Y
03FCC: 5F 5E 8B      BBR5  $5E, $3F5A
03FCF: E5 5D         SBC   $5D
03FD1: CB            ??? 
03FD2: 55 8B         EOR   $8B,X
03FD4: EC 83 EC      CPX   $EC83
03FD7: 04 56         TSB   $56
03FD9: C4 5E         CPY   $5E
03FDB: 0A            ASL 
03FDC: 4B            ??? 
03FDD: 8C 46 FE      STY   $FE46
03FE0: 89 5E         BIT   #$5E
03FE2: FC            ??? 
03FE3: 33            ??? 
03FE4: F6 EB         INC   $EB,X
03FE6: 04 FF         TSB   $FF
03FE8: 4E FC 46      LSR   $46FC
03FEB: C4 5E         CPY   $5E
03FED: FC            ??? 
03FEE: 26 80         ROL   $80
03FF0: 3F 81 72      BBR3  $81, $4065
03FF3: 06 26         ASL   $26
03FF5: 80 3F         BRA   $4036
03FF7: 9F 76 0F      BBS1  $76, $4009
03FFA: C4 5E         CPY   $5E
03FFC: FC            ??? 
03FFD: 26 80         ROL   $80
03FFF: 3F


;----------------------------------------------------------------------------------------
;
; CD extent 00007800
; Code of some sort
;
;----------------------------------------------------------------------------------------
08000: 4C 75 43      JMP   $4375
08003: 4C 75 43      JMP   $4375
08006: 82            CLX 
08007: AD 64 2B      LDA   $2B64
0800A: C9 21         CMP   #$21
0800C: 90 01         BCC   $800F
0800E: E8            INX 
0800F: A5 1E         LDA   $1E
08011: 48            PHA 
08012: AD 62 2B      LDA   $2B62
08015: 4A            LSR 
08016: 85 1E         STA   $1E
08018: BD 84 80      LDA   $8084,X
0801B: 38            SEC 
0801C: E5 1E         SBC   $1E
0801E: 85 1E         STA   $1E
08020: A9 0A         LDA   #$0A
08022: 85 F7         STA   $F7
08024: 03 0A         ST0   #$0A
08026: BD 86 80      LDA   $8086,X
08029: 8D 02 00      STA   $0002
0802C: A5 1E         LDA   $1E
0802E: 3A            DEC 
0802F: 8D 03 00      STA   $0003
08032: A9 0B         LDA   #$0B
08034: 85 F7         STA   $F7
08036: 03 0B         ST0   #$0B
08038: AD 62 2B      LDA   $2B62
0803B: 3A            DEC 
0803C: 8D 02 00      STA   $0002
0803F: A5 1E         LDA   $1E
08041: 1A            INC 
08042: 8D 03 00      STA   $0003
08045: AD 63 2B      LDA   $2B63
08048: 4A            LSR 
08049: 85 1E         STA   $1E
0804B: A9 89         LDA   #$89
0804D: 38            SEC 
0804E: E5 1E         SBC   $1E
08050: 85 1E         STA   $1E
08052: A9 0C         LDA   #$0C
08054: 85 F7         STA   $F7
08056: 03 0C         ST0   #$0C
08058: 13 02         ST1   #$02
0805A: A5 1E         LDA   $1E
0805C: 3A            DEC 
0805D: 3A            DEC 
0805E: 8D 03 00      STA   $0003
08061: A9 0D         LDA   #$0D
08063: 85 F7         STA   $F7
08065: 03 0D         ST0   #$0D
08067: AD 63 2B      LDA   $2B63
0806A: 3A            DEC 
0806B: 8D 02 00      STA   $0002
0806E: 23 00         ST2   #$00
08070: A9 0E         LDA   #$0E
08072: 85 F7         STA   $F7
08074: 03 0E         ST0   #$0E
08076: A5 1E         LDA   $1E
08078: 38            SEC 
08079: E9 0D         SBC   #$0D
0807B: 8D 02 00      STA   $0002
0807E: 23 00         ST2   #$00
08080: 68            PLA 
08081: 85 1E         STA   $1E
08083: 60            RTS 
08084: 13 1A         ST1   #$1A
08086: 03 04         ST0   #$04
08088: F3 54 40 65 2B 55 08  TAI   $4054, $2B65, $0855
0808F: A9 C6         LDA   #$C6
08091: 85 FE         STA   $FE
08093: A9 80         LDA   #$80
08095: 85 FF         STA   $FF
08097: 82            CLX 
08098: 62            CLA 
08099: 44 2C         BSR   $80C7
0809B: A2 01         LDX   #$01
0809D: A9 FF         LDA   #$FF
0809F: 44 26         BSR   $80C7
080A1: A9 01         LDA   #$01
080A3: A0 FF         LDY   #$FF
080A5: 8D 68 2B      STA   $2B68
080A8: 8C BA 2B      STY   $2BBA
080AB: 8C 69 2B      STY   $2B69
080AE: 9C BB 2B      STZ   $2BBB
080B1: A9 02         LDA   #$02
080B3: 82            CLX 
080B4: 9D 6A 33      STA   $336A,X
080B7: 1A            INC 
080B8: E8            INX 
080B9: C9 52         CMP   #$52
080BB: 90 F7         BCC   $80B4
080BD: 9C 65 2B      STZ   $2B65
080C0: 9C 00 21      STZ   $2100
080C3: 9C 67 2B      STZ   $2B67
080C6: 60            RTS 
080C7: 9D A6 2D      STA   $2DA6,X
080CA: A5 FE         LDA   $FE
080CC: 9D 0C 2C      STA   $2C0C,X
080CF: A5 FF         LDA   $FF
080D1: 9D 5E 2C      STA   $2C5E,X
080D4: A9 03         LDA   #$03
080D6: 9D B0 2C      STA   $2CB0,X
080D9: 9E 54 2D      STZ   $2D54,X
080DC: 60            RTS 
080DD: A0 10         LDY   #$10
080DF: B1 F8         LDA   ($F8),Y
080E1: 85 FC         STA   $FC
080E3: C8            INY 
080E4: B1 F8         LDA   ($F8),Y
080E6: 85 FD         STA   $FD
080E8: 82            CLX 
080E9: C2            CLY 
080EA: 02            SXY 
080EB: B1 F8         LDA   ($F8),Y
080ED: 02            SXY 
080EE: 91 FA         STA   ($FA),Y
080F0: C8            INY 
080F1: 62            CLA 
080F2: 06 FC         ASL   $FC
080F4: 26 FD         ROL   $FD
080F6: 2A            ROL 
080F7: 91 FA         STA   ($FA),Y
080F9: C8            INY 
080FA: E8            INX 
080FB: E0 10         CPX   #$10
080FD: 90 EB         BCC   $80EA
080FF: 60            RTS 
08100: BD 4A 2E      LDA   $2E4A,X
08103: 30 2E         BMI   $8133
08105: F0 40         BEQ   $8147
08107: DE EE 2E      DEC   $2EEE,X
0810A: D0 26         BNE   $8132
0810C: BD 9C 2E      LDA   $2E9C,X
0810F: 9D EE 2E      STA   $2EEE,X
08112: BD 92 2F      LDA   $2F92,X
08115: 18            CLC 
08116: 7D 40 2F      ADC   $2F40,X
08119: 9D 40 2F      STA   $2F40,X
0811C: BD 36 30      LDA   $3036,X
0811F: 18            CLC 
08120: 7D E4 2F      ADC   $2FE4,X
08123: 9D E4 2F      STA   $2FE4,X
08126: DE 4A 2E      DEC   $2E4A,X
08129: BD DA 30      LDA   $30DA,X
0812C: 20 6C 49      JSR   $496C
0812F: 20 84 49      JSR   $4984
08132: 60            RTS 
08133: BD 88 30      LDA   $3088,X
08136: A8            TAY 
08137: B9 59 81      LDA   $8159,Y
0813A: 9D 40 2F      STA   $2F40,X
0813D: B9 5D 81      LDA   $815D,Y
08140: 9D E4 2F      STA   $2FE4,X
08143: 44 E4         BSR   $8129
08145: A6 1F         LDX   $1F
08147: A9 FF         LDA   #$FF
08149: 9D 4A 2E      STA   $2E4A,X
0814C: 20 F8 47      JSR   $47F8
0814F: BD DA 30      LDA   $30DA,X
08152: 20 B6 4A      JSR   $4AB6
08155: 20 5C 47      JSR   $475C
08158: 60            RTS 
08159: 00            BRK 
0815A: 07 00         RMB0  $00
0815C: 07 00         RMB0  $00
0815E: 00            BRK 
0815F: 07 00         RMB0  $00
08161: BD 4A 2E      LDA   $2E4A,X
08164: 30 24         BMI   $818A
08166: F0 31         BEQ   $8199
08168: DE EE 2E      DEC   $2EEE,X
0816B: D0 1C         BNE   $8189
0816D: BD 9C 2E      LDA   $2E9C,X
08170: 9D EE 2E      STA   $2EEE,X
08173: BD 92 2F      LDA   $2F92,X
08176: 18            CLC 
08177: 7D 40 2F      ADC   $2F40,X
0817A: 9D 40 2F      STA   $2F40,X
0817D: DE 4A 2E      DEC   $2E4A,X
08180: BD DA 30      LDA   $30DA,X
08183: 20 6C 49      JSR   $496C
08186: 20 84 49      JSR   $4984
08189: 60            RTS 
0818A: BD 92 2F      LDA   $2F92,X
0818D: 30 04         BMI   $8193
0818F: A9 07         LDA   #$07
08191: 80 01         BRA   $8194
08193: 62            CLA 
08194: 9D 40 2F      STA   $2F40,X
08197: 44 E7         BSR   $8180
08199: A9 FF         LDA   #$FF
0819B: 9D 4A 2E      STA   $2E4A,X
0819E: 20 F8 47      JSR   $47F8
081A1: BD DA 30      LDA   $30DA,X
081A4: 20 B6 4A      JSR   $4AB6
081A7: 20 5C 47      JSR   $475C
081AA: 60            RTS 


081AB: 82            CLX 
081AC: 2A          - ROL 
081AD: B0 06         BCS   $81B5 +
081AF: E8            INX 
081B0: E0 08         CPX   #$08
081B2: 90 F8         BCC   $81AC -
081B4: 60            RTS 

081B5: BD 9E 34    + LDA   $349E,X
081B8: F0 F2         BEQ   $81AC
081BA: AA            TAX 
081BB: BD 88 30      LDA   $3088,X
081BE: C9 04         CMP   #$04
081C0: F0 24         BEQ   $81E6
081C2: BD 40 2F      LDA   $2F40,X
081C5: 85 25         STA   $25
081C7: BD E4 2F      LDA   $2FE4,X
081CA: 85 26         STA   $26
081CC: C2            CLY 
081CD: B1 FA         LDA   ($FA),Y
081CF: C8            INY 
081D0: AA            TAX 
081D1: B1 FA         LDA   ($FA),Y
081D3: 88            DEY 
081D4: 6A            ROR 
081D5: 8A            TXA 
081D6: 44 48         BSR   $8220
081D8: 91 FA         STA   ($FA),Y
081DA: C8            INY 
081DB: 2A            ROL 
081DC: 29 01         AND   #$01
081DE: 91 FA         STA   ($FA),Y
081E0: C8            INY 
081E1: C0 20         CPY   #$20
081E3: 90 E8         BCC   $81CD
081E5: 60            RTS 
081E6: BD 40 2F      LDA   $2F40,X
081E9: 85 25         STA   $25
081EB: BD 2C 31      LDA   $312C,X
081EE: 53 20         TAM   #$20
081F0: 1A            INC 
081F1: 53 40         TAM   #$40
081F3: BD E4 2F      LDA   $2FE4,X
081F6: 85 F8         STA   $F8
081F8: BD 36 30      LDA   $3036,X
081FB: 85 F9         STA   $F9
081FD: C2            CLY 
081FE: B1 F8         LDA   ($F8),Y
08200: 85 27         STA   $27
08202: B1 FA         LDA   ($FA),Y
08204: AA            TAX 
08205: C8            INY 
08206: B1 F8         LDA   ($F8),Y
08208: 85 28         STA   $28
0820A: B1 FA         LDA   ($FA),Y
0820C: 2A            ROL 
0820D: 8A            TXA 
0820E: 88            DEY 
0820F: 20 73 82      JSR   $8273
08212: 91 FA         STA   ($FA),Y
08214: C8            INY 
08215: 6A            ROR 
08216: 29 01         AND   #$01
08218: 91 FA         STA   ($FA),Y
0821A: C8            INY 
0821B: C0 20         CPY   #$20
0821D: 90 DF         BCC   $81FE
0821F: 60            RTS 
08220: 6A            ROR 
08221: 85 27         STA   $27
08223: 2A            ROL 
08224: 29 07         AND   #$07
08226: 0A            ASL 
08227: 0A            ASL 
08228: 0A            ASL 
08229: 05 25         ORA   $25
0822B: AA            TAX 
0822C: BD E0 82      LDA   $82E0,X
0822F: 65 26         ADC   $26
08231: C9 07         CMP   #$07
08233: 90 02         BCC   $8237
08235: A9 07         LDA   #$07
08237: 85 29         STA   $29
08239: A5 27         LDA   $27
0823B: 0A            ASL 
0823C: 29 38         AND   #$38
0823E: 05 25         ORA   $25
08240: AA            TAX 
08241: BD E0 82      LDA   $82E0,X
08244: 18            CLC 
08245: 65 26         ADC   $26
08247: C9 07         CMP   #$07
08249: 90 04         BCC   $824F
0824B: A9 38         LDA   #$38
0824D: 80 03         BRA   $8252
0824F: 0A            ASL 
08250: 0A            ASL 
08251: 0A            ASL 
08252: 05 29         ORA   $29
08254: 0A            ASL 
08255: 0A            ASL 
08256: 85 29         STA   $29
08258: A5 27         LDA   $27
0825A: 4A            LSR 
0825B: 4A            LSR 
0825C: 29 38         AND   #$38
0825E: 05 25         ORA   $25
08260: AA            TAX 
08261: BD E0 82      LDA   $82E0,X
08264: 18            CLC 
08265: 65 26         ADC   $26
08267: C9 07         CMP   #$07
08269: 90 02         BCC   $826D
0826B: A9 07         LDA   #$07
0826D: 4A            LSR 
0826E: 05 29         ORA   $29
08270: 6A            ROR 
08271: 6A            ROR 
08272: 60            RTS 
08273: 6A            ROR 
08274: 85 29         STA   $29
08276: 2A            ROL 
08277: 29 07         AND   #$07
08279: 85 26         STA   $26
0827B: A5 27         LDA   $27
0827D: 66 28         ROR   $28
0827F: 6A            ROR 
08280: 85 28         STA   $28
08282: 2A            ROL 
08283: 29 07         AND   #$07
08285: 18            CLC 
08286: 69 07         ADC   #$07
08288: 38            SEC 
08289: E5 26         SBC   $26
0828B: 0A            ASL 
0828C: 0A            ASL 
0828D: 0A            ASL 
0828E: 05 25         ORA   $25
08290: AA            TAX 
08291: BD 20 83      LDA   $8320,X
08294: 65 26         ADC   $26
08296: 85 27         STA   $27
08298: A5 29         LDA   $29
0829A: 0A            ASL 
0829B: 29 38         AND   #$38
0829D: 85 26         STA   $26
0829F: A5 28         LDA   $28
082A1: 0A            ASL 
082A2: 29 38         AND   #$38
082A4: 18            CLC 
082A5: 69 38         ADC   #$38
082A7: 38            SEC 
082A8: E5 26         SBC   $26
082AA: 05 25         ORA   $25
082AC: AA            TAX 
082AD: BD 20 83      LDA   $8320,X
082B0: 0A            ASL 
082B1: 0A            ASL 
082B2: 0A            ASL 
082B3: 18            CLC 
082B4: 65 26         ADC   $26
082B6: 05 27         ORA   $27
082B8: 85 27         STA   $27
082BA: A5 29         LDA   $29
082BC: 4A            LSR 
082BD: 4A            LSR 
082BE: 29 38         AND   #$38
082C0: 85 26         STA   $26
082C2: A5 28         LDA   $28
082C4: 4A            LSR 
082C5: 4A            LSR 
082C6: 29 38         AND   #$38
082C8: 18            CLC 
082C9: 69 38         ADC   #$38
082CB: 38            SEC 
082CC: E5 26         SBC   $26
082CE: 05 25         ORA   $25
082D0: AA            TAX 
082D1: BD 20 83      LDA   $8320,X
082D4: 0A            ASL 
082D5: 0A            ASL 
082D6: 0A            ASL 
082D7: 18            CLC 
082D8: 65 26         ADC   $26
082DA: 0A            ASL 
082DB: 0A            ASL 
082DC: 0A            ASL 
082DD: 05 27         ORA   $27
082DF: 60            RTS 
082E0: 00            BRK 
082E1: 00            BRK 
082E2: 00            BRK 
082E3: 00            BRK 
082E4: 00            BRK 
082E5: 00            BRK 
082E6: 00            BRK 
082E7: 00            BRK 
082E8: 00            BRK 
082E9: 00            BRK 
082EA: 00            BRK 
082EB: 00            BRK 
082EC: 00            BRK 
082ED: 00            BRK 
082EE: 00            BRK 
082EF: 01 00         ORA   ($00,X)
082F1: 00            BRK 
082F2: 00            BRK 
082F3: 00            BRK 
082F4: 01 01         ORA   ($01,X)
082F6: 01 02         ORA   ($02,X)
082F8: 00            BRK 
082F9: 00            BRK 
082FA: 00            BRK 
082FB: 01 01         ORA   ($01,X)
082FD: 02            SXY 
082FE: 02            SXY 
082FF: 03 00         ST0   #$00
08301: 00            BRK 
08302: 01 01         ORA   ($01,X)
08304: 02            SXY 
08305: 02            SXY 
08306: 03 04         ST0   #$04
08308: 00            BRK 
08309: 00            BRK 
0830A: 01 02         ORA   ($02,X)
0830C: 02            SXY 
0830D: 03 04         ST0   #$04
0830F: 05 00         ORA   $00
08311: 00            BRK 
08312: 01 02         ORA   ($02,X)
08314: 03 04         ST0   #$04
08316: 05 06         ORA   $06
08318: 00            BRK 
08319: 01 02         ORA   ($02,X)
0831B: 03 04         ST0   #$04
0831D: 05 06         ORA   $06
0831F: 07 00         RMB0  $00
08321: FF FE FD      BBS7  $FE, $8321
08324: FC            ??? 
08325: FB            ??? 
08326: FA            PLX 
08327: F9 00 FF      SBC   $FF00,Y
0832A: FE FD FD      INC   $FDFD,X
0832D: FC            ??? 
0832E: FB            ??? 
0832F: FA            PLX 
08330: 00            BRK 
08331: FF FE FE      BBS7  $FE, $8332
08334: FD FC FC      SBC   $FCFC,X
08337: FB            ??? 
08338: 00            BRK 
08339: FF FF FE      BBS7  $FF, $833A
0833C: FE FD FD      INC   $FDFD,X
0833F: FC            ??? 
08340: 00            BRK 
08341: 00            BRK 
08342: FF FF FE      BBS7  $FF, $8343
08345: FE FD FD      INC   $FDFD,X
08348: 00            BRK 
08349: 00            BRK 
0834A: 00            BRK 
0834B: FF FF FF      BBS7  $FF, $834D
0834E: FE FE 00      INC   $00FE,X
08351: 00            BRK 
08352: 00            BRK 
08353: 00            BRK 
08354: FF FF FF      BBS7  $FF, $8356
08357: FF 64 2C      BBS7  $64, $8386
0835A: A9 80         LDA   #$80
0835C: 85 2A         STA   $2A
0835E: 64 F7         STZ   $F7
08360: 03 00         ST0   #$00
08362: AD 14 22      LDA   $2214
08365: 8D 02 00      STA   $0002
08368: AD 15 22      LDA   $2215
0836B: 8D 03 00      STA   $0003
0836E: A9 02         LDA   #$02
08370: 85 F7         STA   $F7
08372: 03 02         ST0   #$02
08374: 60            RTS 
08375: 64 2A         STZ   $2A
08377: 60            RTS 
08378: BD 40 2F      LDA   $2F40,X
0837B: 53 20         TAM   #$20
0837D: 1A            INC 
0837E: 53 40         TAM   #$40
08380: BD 4A 2E      LDA   $2E4A,X
08383: 30 62         BMI   $83E7
08385: BD 18 33      LDA   $3318,X
08388: F0 05         BEQ   $838F
0838A: DE 18 33      DEC   $3318,X
0838D: 80 5D         BRA   $83EC
0838F: BD 92 2F      LDA   $2F92,X
08392: 85 F8         STA   $F8
08394: BD E4 2F      LDA   $2FE4,X
08397: 85 F9         STA   $F9
08399: BD C6 32      LDA   $32C6,X
0839C: 0A            ASL 
0839D: 0A            ASL 
0839E: A8            TAY 
0839F: B1 F8         LDA   ($F8),Y
083A1: 10 09         BPL   $83AC
083A3: B3 20 74 32   TST   $20, $3274
083A7: F0 3E         BEQ   $83E7
083A9: C2            CLY 
083AA: B2 F8         LDA   ($F8)
083AC: 9D 36 30      STA   $3036,X
083AF: C8            INY 
083B0: B1 F8         LDA   ($F8),Y
083B2: 9D 18 33      STA   $3318,X
083B5: C8            INY 
083B6: 64 FA         STZ   $FA
083B8: B1 F8         LDA   ($F8),Y
083BA: 10 02         BPL   $83BE
083BC: C6 FA         DEC   $FA
083BE: 18            CLC 
083BF: 7D 2C 31      ADC   $312C,X
083C2: 9D 2C 31      STA   $312C,X
083C5: A5 FA         LDA   $FA
083C7: 7D 7E 31      ADC   $317E,X
083CA: 9D 7E 31      STA   $317E,X
083CD: C8            INY 
083CE: 64 FA         STZ   $FA
083D0: B1 F8         LDA   ($F8),Y
083D2: 10 02         BPL   $83D6
083D4: C6 FA         DEC   $FA
083D6: 18            CLC 
083D7: 7D 2C 31      ADC   $312C,X
083DA: 9D 2C 31      STA   $312C,X
083DD: A5 FA         LDA   $FA
083DF: 7D 7E 31      ADC   $317E,X
083E2: 9D 7E 31      STA   $317E,X
083E5: 80 05         BRA   $83EC
083E7: A6 1F         LDX   $1F
083E9: 4C 5C 47      JMP   $475C
083EC: BD 40 2F      LDA   $2F40,X
083EF: 53 20         TAM   #$20
083F1: 1A            INC 
083F2: 53 40         TAM   #$40
083F4: BD 74 32      LDA   $3274,X
083F7: 89 40         BIT   #$40
083F9: D0 2A         BNE   $8425
083FB: BD 9C 2E      LDA   $2E9C,X
083FE: 85 FC         STA   $FC
08400: BD EE 2E      LDA   $2EEE,X
08403: 85 FD         STA   $FD
08405: BD 36 30      LDA   $3036,X
08408: 0A            ASL 
08409: A8            TAY 
0840A: B1 FC         LDA   ($FC),Y
0840C: 18            CLC 
0840D: 65 FC         ADC   $FC
0840F: 85 02         STA   $02
08411: C8            INY 
08412: B1 FC         LDA   ($FC),Y
08414: 65 FD         ADC   $FD
08416: 85 03         STA   $03
08418: B2 02         LDA   ($02)
0841A: 85 2B         STA   $2B
0841C: 18            CLC 
0841D: 65 2C         ADC   $2C
0841F: C9 40         CMP   #$40
08421: 90 03         BCC   $8426
08423: F0 01         BEQ   $8426
08425: 60            RTS 
08426: E6 02         INC   $02
08428: D0 02         BNE   $842C
0842A: E6 03         INC   $03
0842C: BD 2C 31      LDA   $312C,X
0842F: 18            CLC 
08430: 69 20         ADC   #$20
08432: 85 F8         STA   $F8
08434: BD 7E 31      LDA   $317E,X
08437: 69 00         ADC   #$00
08439: 85 F9         STA   $F9
0843B: BD D0 31      LDA   $31D0,X
0843E: 18            CLC 
0843F: 69 40         ADC   #$40
08441: 85 FA         STA   $FA
08443: BD 22 32      LDA   $3222,X
08446: 69 00         ADC   #$00
08448: 85 FB         STA   $FB
0844A: C2            CLY 
0844B: 64 04         STZ   $04
0844D: B1 02         LDA   ($02),Y
0844F: 10 02         BPL   $8453
08451: C6 04         DEC   $04
08453: C8            INY 
08454: 18            CLC 
08455: 65 F8         ADC   $F8
08457: 85 FC         STA   $FC
08459: A5 04         LDA   $04
0845B: 65 F9         ADC   $F9
0845D: 85 FD         STA   $FD
0845F: 64 04         STZ   $04
08461: B1 02         LDA   ($02),Y
08463: 10 02         BPL   $8467
08465: C6 04         DEC   $04
08467: C8            INY 
08468: 18            CLC 
08469: 65 FA         ADC   $FA
0846B: 85 FE         STA   $FE
0846D: A5 04         LDA   $04
0846F: 65 FB         ADC   $FB
08471: 85 FF         STA   $FF
08473: 20 F7 84      JSR   $84F7
08476: 90 05         BCC   $847D
08478: C8            INY 
08479: C8            INY 
0847A: C8            INY 
0847B: 80 67         BRA   $84E4
0847D: A5 FE         LDA   $FE
0847F: 8D 02 00      STA   $0002
08482: A5 FF         LDA   $FF
08484: 8D 03 00      STA   $0003
08487: A5 FC         LDA   $FC
08489: 8D 02 00      STA   $0002
0848C: A5 FD         LDA   $FD
0848E: 8D 03 00      STA   $0003
08491: B1 02         LDA   ($02),Y
08493: C8            INY 
08494: 85 FD         STA   $FD
08496: B1 02         LDA   ($02),Y
08498: 4A            LSR 
08499: 4A            LSR 
0849A: 4A            LSR 
0849B: 85 FC         STA   $FC
0849D: BD 88 30      LDA   $3088,X
084A0: AA            TAX 
084A1: BD A0 E9      LDA   $E9A0,X
084A4: 18            CLC 
084A5: 65 FD         ADC   $FD
084A7: AA            TAX 
084A8: BD E0 E9      LDA   $E9E0,X
084AB: 29 7F         AND   #$7F
084AD: 64 FD         STZ   $FD
084AF: 0A            ASL 
084B0: 26 FD         ROL   $FD
084B2: 0A            ASL 
084B3: 26 FD         ROL   $FD
084B5: 0A            ASL 
084B6: 26 FD         ROL   $FD
084B8: 05 FC         ORA   $FC
084BA: 8D 02 00      STA   $0002
084BD: A5 FD         LDA   $FD
084BF: 8D 03 00      STA   $0003
084C2: B1 02         LDA   ($02),Y
084C4: C8            INY 
084C5: 29 0F         AND   #$0F
084C7: A6 1F         LDX   $1F
084C9: 18            CLC 
084CA: 7D DA 30      ADC   $30DA,X
084CD: AA            TAX 
084CE: BD A0 E9      LDA   $E9A0,X
084D1: AA            TAX 
084D2: BD E0 E9      LDA   $E9E0,X
084D5: A6 1F         LDX   $1F
084D7: 05 2A         ORA   $2A
084D9: 8D 02 00      STA   $0002
084DC: B1 02         LDA   ($02),Y
084DE: C8            INY 
084DF: 8D 03 00      STA   $0003
084E2: E6 2C         INC   $2C
084E4: 98            TYA 
084E5: 18            CLC 
084E6: 65 02         ADC   $02
084E8: 85 02         STA   $02
084EA: 62            CLA 
084EB: 65 03         ADC   $03
084ED: 85 03         STA   $03
084EF: C6 2B         DEC   $2B
084F1: F0 03         BEQ   $84F6
084F3: 4C 4A 84      JMP   $844A
084F6: 60            RTS 
084F7: A5 FD         LDA   $FD
084F9: 30 0A         BMI   $8505
084FB: F0 0E         BEQ   $850B
084FD: A5 FC         LDA   $FC
084FF: C9 20         CMP   #$20
08501: 90 08         BCC   $850B
08503: 80 1D         BRA   $8522
08505: A5 FC         LDA   $FC
08507: C9 E1         CMP   #$E1
08509: 90 16         BCC   $8521
0850B: A5 FF         LDA   $FF
0850D: 30 0A         BMI   $8519
0850F: F0 0E         BEQ   $851F
08511: A5 FE         LDA   $FE
08513: C9 20         CMP   #$20
08515: 90 08         BCC   $851F
08517: 80 09         BRA   $8522
08519: A5 FE         LDA   $FE
0851B: C9 C1         CMP   #$C1
0851D: 90 02         BCC   $8521
0851F: 18            CLC 
08520: 60            RTS 
08521: 38            SEC 
08522: 60            RTS 
08523: 85 23         STA   $23
08525: 20 58 87      JSR   $8758
08528: 90 01         BCC   $852B
0852A: 60            RTS 
0852B: AE EE 34      LDX   $34EE
0852E: 80 10         BRA   $8540
08530: BD AD 34      LDA   $34AD,X
08533: D0 05         BNE   $853A
08535: BD BD 34      LDA   $34BD,X
08538: 30 0D         BMI   $8547
0853A: E8            INX 
0853B: EC EE 34      CPX   $34EE
0853E: F0 46         BEQ   $8586
08540: E0 10         CPX   #$10
08542: 90 EC         BCC   $8530
08544: 82            CLX 
08545: 80 E9         BRA   $8530
08547: 29 7F         AND   #$7F
08549: C5 23         CMP   $23
0854B: 90 ED         BCC   $853A
0854D: 9E CD 34      STZ   $34CD,X
08550: 8E EF 34      STX   $34EF
08553: F0 28         BEQ   $857D
08555: 48            PHA 
08556: A5 23         LDA   $23
08558: 09 80         ORA   #$80
0855A: 9D BD 34      STA   $34BD,X
0855D: 8A            TXA 
0855E: 18            CLC 
0855F: 65 23         ADC   $23
08561: AA            TAX 
08562: 68            PLA 
08563: 38            SEC 
08564: E5 23         SBC   $23
08566: 09 80         ORA   #$80
08568: 9D BD 34      STA   $34BD,X
0856B: 8E EE 34      STX   $34EE
0856E: 29 7F         AND   #$7F
08570: 85 23         STA   $23
08572: 8A            TXA 
08573: C6 23         DEC   $23
08575: F0 22         BEQ   $8599
08577: E8            INX 
08578: 9D BD 34      STA   $34BD,X
0857B: 80 F6         BRA   $8573
0857D: 8A            TXA 
0857E: 18            CLC 
0857F: 65 23         ADC   $23
08581: 8D EE 34      STA   $34EE
08584: 80 13         BRA   $8599
08586: AD AB 34      LDA   $34AB
08589: 89 02         BIT   #$02
0858B: F0 1E         BEQ   $85AB
0858D: A5 23         LDA   $23
0858F: 48            PHA 
08590: 20 AD 85      JSR   $85AD
08593: 68            PLA 
08594: B0 15         BCS   $85AB
08596: 4C 23 4C      JMP   $4C23
08599: AE EF 34      LDX   $34EF
0859C: 98            TYA 
0859D: 09 80         ORA   #$80
0859F: 9D AD 34      STA   $34AD,X
085A2: 8A            TXA 
085A3: 99 DE 34      STA   $34DE,Y
085A6: 8C AA 34      STY   $34AA
085A9: 18            CLC 
085AA: 60            RTS 
085AB: 38            SEC 
085AC: 60            RTS 
085AD: AD AB 34      LDA   $34AB
085B0: 89 01         BIT   #$01
085B2: D0 02         BNE   $85B6
085B4: 38            SEC 
085B5: 60            RTS 
085B6: EE AC 34      INC   $34AC
085B9: 43 20         TMA   #$20
085BB: 48            PHA 
085BC: 43 40         TMA   #$40
085BE: 48            PHA 
085BF: 82            CLX 
085C0: BD BD 34      LDA   $34BD,X
085C3: 10 05         BPL   $85CA
085C5: BD AD 34      LDA   $34AD,X
085C8: F0 14         BEQ   $85DE
085CA: 8A            TXA 
085CB: 18            CLC 
085CC: 7D BD 34      ADC   $34BD,X
085CF: 29 7F         AND   #$7F
085D1: AA            TAX 
085D2: E0 10         CPX   #$10
085D4: 90 EA         BCC   $85C0
085D6: 68            PLA 
085D7: 53 40         TAM   #$40
085D9: 68            PLA 
085DA: 53 20         TAM   #$20
085DC: 80 D6         BRA   $85B4
085DE: 86 22         STX   $22
085E0: BD BD 34      LDA   $34BD,X
085E3: 10 05         BPL   $85EA
085E5: BD AD 34      LDA   $34AD,X
085E8: D0 4D         BNE   $8637
085EA: 8A            TXA 
085EB: 18            CLC 
085EC: 7D BD 34      ADC   $34BD,X
085EF: 29 7F         AND   #$7F
085F1: AA            TAX 
085F2: E0 10         CPX   #$10
085F4: 90 EA         BCC   $85E0
085F6: A6 22         LDX   $22
085F8: 8E EE 34      STX   $34EE
085FB: A9 10         LDA   #$10
085FD: 38            SEC 
085FE: E5 22         SBC   $22
08600: 09 80         ORA   #$80
08602: 9D BD 34      STA   $34BD,X
08605: 9E AD 34      STZ   $34AD,X
08608: 9E CD 34      STZ   $34CD,X
0860B: 29 7F         AND   #$7F
0860D: 8D EF 34      STA   $34EF
08610: 8A            TXA 
08611: E8            INX 
08612: CE EF 34      DEC   $34EF
08615: F0 0B         BEQ   $8622
08617: 9D BD 34      STA   $34BD,X
0861A: 9E AD 34      STZ   $34AD,X
0861D: 9E CD 34      STZ   $34CD,X
08620: 80 EF         BRA   $8611
08622: A9 01         LDA   #$01
08624: 1C AB 34      TRB   $34AB
08627: 68            PLA 
08628: 53 40         TAM   #$40
0862A: 68            PLA 
0862B: 53 20         TAM   #$20
0862D: 18            CLC 
0862E: 60            RTS 
0862F: A6 23         LDX   $23
08631: E0 10         CPX   #$10
08633: 90 AB         BCC   $85E0
08635: 80 BF         BRA   $85F6
08637: 86 23         STX   $23
08639: 20 7A 86      JSR   $867A
0863C: BD AD 34      LDA   $34AD,X
0863F: 29 7F         AND   #$7F
08641: A8            TAY 
08642: A5 22         LDA   $22
08644: 99 DE 34      STA   $34DE,Y
08647: A8            TAY 
08648: BD AD 34      LDA   $34AD,X
0864B: 99 AD 34      STA   $34AD,Y
0864E: BD BD 34      LDA   $34BD,X
08651: 99 BD 34      STA   $34BD,Y
08654: 29 7F         AND   #$7F
08656: 8D EF 34      STA   $34EF
08659: BD CD 34      LDA   $34CD,X
0865C: 99 CD 34      STA   $34CD,Y
0865F: 98            TYA 
08660: AA            TAX 
08661: E6 22         INC   $22
08663: E6 23         INC   $23
08665: E8            INX 
08666: CE EF 34      DEC   $34EF
08669: F0 C4         BEQ   $862F
0866B: 20 7A 86      JSR   $867A
0866E: 9E CD 34      STZ   $34CD,X
08671: 9E AD 34      STZ   $34AD,X
08674: 98            TYA 
08675: 9D BD 34      STA   $34BD,X
08678: 80 E7         BRA   $8661
0867A: DA            PHX 
0867B: 5A            PHY 
0867C: A5 23         LDA   $23
0867E: 18            CLC 
0867F: 69 10         ADC   #$10
08681: 6D 16 26      ADC   $2616
08684: 53 20         TAM   #$20
08686: 64 2D         STZ   $2D
08688: A9 A0         LDA   #$A0
0868A: 85 2E         STA   $2E
0868C: A5 22         LDA   $22
0868E: 18            CLC 
0868F: 69 10         ADC   #$10
08691: 6D 16 26      ADC   $2616
08694: 53 40         TAM   #$40
08696: 64 2F         STZ   $2F
08698: A9 C0         LDA   #$C0
0869A: 85 30         STA   $30
0869C: A2 20         LDX   #$20
0869E: C2            CLY 
0869F: B1 2D         LDA   ($2D),Y
086A1: 91 2F         STA   ($2F),Y
086A3: C8            INY 
086A4: D0 F9         BNE   $869F
086A6: E6 2E         INC   $2E
086A8: E6 30         INC   $30
086AA: CA            DEX 
086AB: D0 F2         BNE   $869F
086AD: 7A            PLY 
086AE: FA            PLX 
086AF: 60            RTS 
086B0: 8D DD 34      STA   $34DD
086B3: AA            TAX 
086B4: BD 00 E0      LDA   $E000,X
086B7: 85 F8         STA   $F8
086B9: 20 36 87      JSR   $8736
086BC: 90 65         BCC   $8723
086BE: A5 F8         LDA   $F8
086C0: 3A            DEC 
086C1: 4A            LSR 
086C2: 4A            LSR 
086C3: 1A            INC 
086C4: 20 23 85      JSR   $8523
086C7: B0 6B         BCS   $8734
086C9: BE DE 34      LDX   $34DE,Y
086CC: AD DD 34      LDA   $34DD
086CF: 9D CD 34      STA   $34CD,X
086D2: 85 22         STA   $22
086D4: 43 40         TMA   #$40
086D6: 48            PHA 
086D7: A6 22         LDX   $22
086D9: BD 00 E0      LDA   $E000,X
086DC: 85 F8         STA   $F8
086DE: 8A            TXA 
086DF: 64 FD         STZ   $FD
086E1: A2 06         LDX   #$06
086E3: 0A            ASL 
086E4: 26 FD         ROL   $FD
086E6: CA            DEX 
086E7: D0 FA         BNE   $86E3
086E9: 18            CLC 
086EA: 69 02         ADC   #$02
086EC: 85 FE         STA   $FE
086EE: A5 FD         LDA   $FD
086F0: 69 00         ADC   #$00
086F2: 85 FD         STA   $FD
086F4: 62            CLA 
086F5: 69 00         ADC   #$00
086F7: 85 FC         STA   $FC
086F9: A9 06         LDA   #$06
086FB: 85 FF         STA   $FF
086FD: B9 DE 34      LDA   $34DE,Y
08700: 18            CLC 
08701: 69 10         ADC   #$10
08703: 6D 16 26      ADC   $2616
08706: 85 FA         STA   $FA
08708: 48            PHA 
08709: 62            CLA 
0870A: 53 80         TAM   #$80
0870C: 68            PLA 
0870D: 20 09 E0      JSR   $E009 ; CD_READ
08710: 48            PHA 
08711: AD 1A 20      LDA   $201A
08714: 53 80         TAM   #$80
08716: 68            PLA 
08717: AC AA 34      LDY   $34AA
0871A: C9 00         CMP   #$00
0871C: D0 B9         BNE   $86D7
0871E: 68            PLA 
0871F: 53 40         TAM   #$40
08721: 18            CLC 
08722: 60            RTS 
08723: 20 58 87      JSR   $8758
08726: B0 0C         BCS   $8734
08728: 98            TYA 
08729: 09 80         ORA   #$80
0872B: 9D AD 34      STA   $34AD,X
0872E: 8A            TXA 
0872F: 99 DE 34      STA   $34DE,Y
08732: 18            CLC 
08733: 60            RTS 
08734: 38            SEC 
08735: 60            RTS 
08736: 82            CLX 
08737: BD BD 34      LDA   $34BD,X
0873A: 10 0D         BPL   $8749
0873C: BD AD 34      LDA   $34AD,X
0873F: D0 08         BNE   $8749
08741: BD CD 34      LDA   $34CD,X
08744: CD DD 34      CMP   $34DD
08747: F0 0D         BEQ   $8756
08749: 8A            TXA 
0874A: 18            CLC 
0874B: 7D BD 34      ADC   $34BD,X
0874E: 29 7F         AND   #$7F
08750: AA            TAX 
08751: E0 10         CPX   #$10
08753: 90 E2         BCC   $8737
08755: 60            RTS 
08756: 18            CLC 
08757: 60            RTS 
08758: C2            CLY 
08759: B9 DE 34      LDA   $34DE,Y
0875C: 30 06         BMI   $8764
0875E: C8            INY 
0875F: C0 10         CPY   #$10
08761: 90 F6         BCC   $8759
08763: 60            RTS 
08764: 18            CLC 
08765: 60            RTS 
08766: A8            TAY 
08767: B9 DE 34      LDA   $34DE,Y
0876A: 18            CLC 
0876B: 6D 16 26      ADC   $2616
0876E: 85 22         STA   $22
08770: 64 20         STZ   $20
08772: 64 21         STZ   $21
08774: 80 16         BRA   $878C

08776: AA            TAX 
08777: F0 2F         BEQ   $87A8
08779: B2 20         LDA   ($20)
0877B: 68            PLA 
0877C: A0 01         LDY   #$01
0877E: B1 20         LDA   ($20),Y
08780: A8            TAY 
08781: 68            PLA 
08782: 18            CLC 
08783: 65 20         ADC   $20
08785: 85 20         STA   $20
08787: 98            TYA 
08788: 65 21         ADC   $21
0878A: 85 21         STA   $21

0878C: A5 21         LDA   $21
0878E: A8            TAY 
0878F: A5 21         LDA   $21
08791: 29 1F         AND   #$1F
08793: 09 A0         ORA   #$A0
08795: 85 20         STA   $20
08797: 98            TYA 
08798: 0A            ASL 
08799: 2A            ROL 
0879A: 2A            ROL 
0879B: 2A            ROL 
0879C: 18            CLC 
0879D: 65 22         ADC   $22
0879F: 85 22         STA   $22
087A1: 53 20         TAM   #$20
087A3: 1A            INC 
087A4: 53 40         TAM   #$40
087A6: 80 CE         BRA   $8776
087A8: A5 21         LDA   $21
087AA: 29 1F         AND   #$1F
087AC: A8            TAY 
087AD: A6 20         LDX   $20
087AF: A5 22         LDA   $22
087B1: 38            SEC 
087B2: ED 16 26      SBC   $2616
087B5: 60            RTS 
087B6: A2 01         LDX   #$01
087B8: 20 6E 88      JSR   $886E
087BB: C2            CLY 
087BC: A9 10         LDA   #$10
087BE: 85 FD         STA   $FD
087C0: 64 F7         STZ   $F7
087C2: 03 00         ST0   #$00
087C4: 13 00         ST1   #$00
087C6: B9 00 E9      LDA   $E900,Y
087C9: C8            INY 
087CA: 8D 03 00      STA   $0003
087CD: A9 02         LDA   #$02
087CF: 85 F7         STA   $F7
087D1: 03 02         ST0   #$02
087D3: 5A            PHY 
087D4: A0 08         LDY   #$08

087D6: A5 FE       - LDA   $FE
087D8: 29 01         AND   #$01
087DA: F0 03         BEQ   $87DF +
087DC: 20 AD 4E      JSR   $4EAD
087DF: 8D 02 00    + STA   $0002
087E2: A5 FE         LDA   $FE
087E4: 29 02         AND   #$02
087E6: F0 03         BEQ   $87EB +
087E8: 20 AD 4E      JSR   $4EAD
087EB: 8D 03 00    + STA   $0003
087EE: 88            DEY 
087EF: D0 E5         BNE   $87D6 -

087F1: A0 08         LDY   #$08
087F3: A5 FE         LDA   $FE
087F5: 29 04         AND   #$04
087F7: F0 03         BEQ   $87FC
087F9: 20 AD 4E      JSR   $4EAD
087FC: 8D 02 00      STA   $0002
087FF: A5 FE         LDA   $FE
08801: 29 08         AND   #$08
08803: F0 03         BEQ   $8808
08805: 20 AD 4E      JSR   $4EAD
08808: 8D 03 00      STA   $0003
0880B: 88            DEY 
0880C: D0 E5         BNE   $87F3
0880E: C6 FD         DEC   $FD
08810: D0 C2         BNE   $87D4
08812: 7A            PLY 
08813: C4 FC         CPY   $FC
08815: 90 A5         BCC   $87BC
08817: A5 FC         LDA   $FC
08819: 60            RTS 
0881A: 82            CLX 
0881B: 20 6E 88      JSR   $886E
0881E: C2            CLY 
0881F: A9 08         LDA   #$08
08821: 85 FD         STA   $FD
08823: 64 F7         STZ   $F7
08825: 03 00         ST0   #$00
08827: 13 00         ST1   #$00
08829: B9 00 E9      LDA   $E900,Y
0882C: C8            INY 
0882D: 29 7F         AND   #$7F
0882F: 8D 03 00      STA   $0003
08832: A9 02         LDA   #$02
08834: 85 F7         STA   $F7
08836: 03 02         ST0   #$02
08838: 5A            PHY 
08839: A2 04         LDX   #$04
0883B: A5 FE         LDA   $FE
0883D: 85 FF         STA   $FF
0883F: DA            PHX 
08840: A0 10         LDY   #$10
08842: 46 FF         LSR   $FF
08844: 90 11         BCC   $8857
08846: 20 AD 4E      JSR   $4EAD
08849: 8D 02 00      STA   $0002
0884C: 20 AD 4E      JSR   $4EAD
0884F: 8D 03 00      STA   $0003
08852: 88            DEY 
08853: D0 F1         BNE   $8846
08855: 80 07         BRA   $885E
08857: 13 00         ST1   #$00
08859: 23 00         ST2   #$00
0885B: 88            DEY 
0885C: D0 F9         BNE   $8857
0885E: FA            PLX 
0885F: CA            DEX 
08860: D0 DD         BNE   $883F
08862: C6 FD         DEC   $FD
08864: D0 D3         BNE   $8839
08866: 7A            PLY 
08867: C4 FC         CPY   $FC
08869: 90 B4         BCC   $881F
0886B: A5 FC         LDA   $FC
0886D: 60            RTS 

0886E: A5 FC         LDA   $FC
08870: D0 02         BNE   $8874
08872: C6 FD         DEC   $FD
08874: C6 FC         DEC   $FC
08876: BC A0 88      LDY   $88A0,X
08879: A5 FD         LDA   $FD
0887B: 4A            LSR 
0887C: 66 FC         ROR   $FC
0887E: 88            DEY 
0887F: D0 FA         BNE   $887B
08881: E6 FC         INC   $FC
08883: A4 FC         LDY   $FC
08885: CA            DEX 
08886: D0 0C         BNE   $8894
08888: 82            CLX 
08889: 20 44 4D      JSR   $4D44
0888C: 9D 00 E9      STA   $E900,X
0888F: E8            INX 
08890: 88            DEY 
08891: D0 F6         BNE   $8889
08893: 60            RTS 
08894: 82            CLX 
08895: 20 0E 4D      JSR   $4D0E
08898: 9D 00 E9      STA   $E900,X
0889B: E8            INX 
0889C: 88            DEY 
0889D: D0 F6         BNE   $8895
0889F: 60            RTS 

088A0: 03 04         ST0   #$04
088A2: 07 0F         RMB0  $0F
088A4: 18            CLC 
088A5: 6D 16 26      ADC   $2616
088A8: 53 20         TAM   #$20
088AA: 1A            INC 
088AB: 53 40         TAM   #$40
088AD: 98            TYA 
088AE: 29 1F         AND   #$1F
088B0: 09 A0         ORA   #$A0
088B2: E0 00         CPX   #$00
088B4: D0 01         BNE   $88B7
088B6: 3A            DEC 
088B7: CA            DEX 
088B8: 86 02         STX   $02
088BA: 85 03         STA   $03
088BC: 82            CLX 
088BD: A0 01         LDY   #$01
088BF: B1 02         LDA   ($02),Y
088C1: C8            INY 
088C2: 31 02         AND   ($02),Y
088C4: 1A            INC 
088C5: F0 15         BEQ   $88DC
088C7: 20 DC 48      JSR   $48DC
088CA: 9D 80 E9      STA   $E980,X
088CD: E8            INX 
088CE: A9 08         LDA   #$08
088D0: 18            CLC 
088D1: 65 02         ADC   $02
088D3: 85 02         STA   $02
088D5: 62            CLA 
088D6: 65 03         ADC   $03
088D8: 85 03         STA   $03
088DA: 80 E1         BRA   $88BD
088DC: 8A            TXA 
088DD: 60            RTS 
088DE: 62            CLA 
088DF: 20 C3 45      JSR   $45C3
088E2: A4 FA         LDY   $FA
088E4: 64 F7         STZ   $F7
088E6: 03 00         ST0   #$00
088E8: A5 F8         LDA   $F8
088EA: 8D 02 00      STA   $0002
088ED: A5 F9         LDA   $F9
088EF: 8D 03 00      STA   $0003
088F2: A9 02         LDA   #$02
088F4: 85 F7         STA   $F7
088F6: 03 02         ST0   #$02
088F8: 20 AD 4E      JSR   $4EAD
088FB: AA            TAX 
088FC: BD 00 E9      LDA   $E900,X
088FF: 85 FC         STA   $FC
08901: 20 AD 4E      JSR   $4EAD
08904: 85 FD         STA   $FD
08906: 29 0F         AND   #$0F
08908: AA            TAX 
08909: BD 80 E9      LDA   $E980,X
0890C: 06 FD         ASL   $FD
0890E: 26 FC         ROL   $FC
08910: 2A            ROL 
08911: 06 FD         ASL   $FD
08913: 26 FC         ROL   $FC
08915: 2A            ROL 
08916: 06 FD         ASL   $FD
08918: 26 FC         ROL   $FC
0891A: 2A            ROL 
0891B: 06 FD         ASL   $FD
0891D: 26 FC         ROL   $FC
0891F: 2A            ROL 
08920: 48            PHA 
08921: A5 FC         LDA   $FC
08923: 8D 02 00      STA   $0002
08926: 68            PLA 
08927: 8D 03 00      STA   $0003
0892A: 88            DEY 
0892B: D0 CB         BNE   $88F8
0892D: A5 FE         LDA   $FE
0892F: 18            CLC 
08930: 65 F8         ADC   $F8
08932: 85 F8         STA   $F8
08934: 62            CLA 
08935: 65 F9         ADC   $F9
08937: 85 F9         STA   $F9
08939: C6 FB         DEC   $FB
0893B: D0 A5         BNE   $88E2
0893D: 60            RTS 
0893E: C2            CLY 
0893F: A9 04         LDA   #$04
08941: 85 FC         STA   $FC

08943: 82         -- CLX 
08944: BD 7C 89    - LDA   $897C,X
08947: 91 FA         STA   ($FA),Y
08949: E8            INX 
0894A: C8            INY 
0894B: BD 7C 89      LDA   $897C,X
0894E: 91 FA         STA   ($FA),Y
08950: E8            INX 
08951: C8            INY 
08952: E0 08         CPX   #$08
08954: 90 EE         BCC   $8944 -
08956: C6 FC         DEC   $FC
08958: D0 E9         BNE   $8943 --

0895A: 60            RTS 


0895B: C2            CLY 
0895C: 82            CLX 
0895D: A9 04         LDA   #$04
0895F: 85 FD         STA   $FD
08961: A9 04         LDA   #$04
08963: 85 FC         STA   $FC
08965: BD 7C 89      LDA   $897C,X
08968: 91 FA         STA   ($FA),Y
0896A: C8            INY 
0896B: BD 7D 89      LDA   $897D,X
0896E: 91 FA         STA   ($FA),Y
08970: C8            INY 
08971: C6 FC         DEC   $FC
08973: D0 F0         BNE   $8965
08975: E8            INX 
08976: E8            INX 
08977: C6 FD         DEC   $FD
08979: D0 E6         BNE   $8961
0897B: 60            RTS 

0897C: 00 00 8F 00 79 00 B7 01      

08984: A2 FE         LDX   #$FE
08986: 20 E6 89      JSR   $89E6
08989: 20 6F 48      JSR   $486F
0898C: 20 F8 47      JSR   $47F8
0898F: AD 2D 22      LDA   $222D
08992: 89 01         BIT   #$01
08994: F0 0B         BEQ   $89A1
08996: A2 FF         LDX   #$FF
08998: 20 E6 89      JSR   $89E6
0899B: AD A3 EA      LDA   $EAA3
0899E: 4C A6 48      JMP   $48A6
089A1: 89 02         BIT   #$02
089A3: F0 05         BEQ   $89AA
089A5: A9 FF         LDA   #$FF
089A7: 4C A6 48      JMP   $48A6
089AA: A2 FF         LDX   #$FF
089AC: 89 10         BIT   #$10
089AE: F0 01         BEQ   $89B1
089B0: 82            CLX 
089B1: 89 40         BIT   #$40
089B3: F0 02         BEQ   $89B7
089B5: A2 01         LDX   #$01
089B7: 89 80         BIT   #$80
089B9: F0 02         BEQ   $89BD
089BB: A2 02         LDX   #$02
089BD: 89 24         BIT   #$24
089BF: F0 02         BEQ   $89C3
089C1: A2 03         LDX   #$03
089C3: E0 FF         CPX   #$FF
089C5: F0 1A         BEQ   $89E1
089C7: AD A3 EA      LDA   $EAA3
089CA: 8D A2 EA      STA   $EAA2
089CD: 18            CLC 
089CE: 7D C2 EA      ADC   $EAC2,X
089D1: CD A1 EA      CMP   $EAA1
089D4: 90 03         BCC   $89D9
089D6: AD A2 EA      LDA   $EAA2
089D9: 8D A3 EA      STA   $EAA3
089DC: 44 08         BSR   $89E6
089DE: 4C 54 46      JMP   $4654
089E1: 44 19         BSR   $89FC
089E3: 4C 54 46      JMP   $4654
089E6: AD CA EA      LDA   $EACA
089E9: 8D 40 20      STA   $2040
089EC: AD C6 EA      LDA   $EAC6
089EF: 8D 3E 20      STA   $203E
089F2: AD C7 EA      LDA   $EAC7
089F5: 8D 3F 20      STA   $203F
089F8: 20 F6 50      JSR   $50F6
089FB: 60            RTS 
089FC: AD CA EA      LDA   $EACA
089FF: 8D 40 20      STA   $2040
08A02: AD C8 EA      LDA   $EAC8
08A05: 8D 3E 20      STA   $203E
08A08: AD C9 EA      LDA   $EAC9
08A0B: 8D 3F 20      STA   $203F
08A0E: 20 F6 50      JSR   $50F6
08A11: 60            RTS 
08A12: AE A2 EA      LDX   $EAA2
08A15: A9 20         LDA   #$20
08A17: 44 29         BSR   $8A42
08A19: AE A3 EA      LDX   $EAA3
08A1C: A9 3E         LDA   #$3E
08A1E: 44 22         BSR   $8A42
08A20: 9C 41 8A      STZ   $8A41
08A23: 60            RTS 
08A24: EE 41 8A      INC   $8A41
08A27: AE 41 8A      LDX   $8A41
08A2A: A9 20         LDA   #$20
08A2C: E0 08         CPX   #$08
08A2E: 90 10         BCC   $8A40 +
08A30: F0 09         BEQ   $8A3B
08A32: E0 10         CPX   #$10
08A34: 90 0A         BCC   $8A40
08A36: 9C 41 8A      STZ   $8A41
08A39: A9 3E         LDA   #$3E
08A3B: AE A3 EA      LDX   $EAA3
08A3E: 44 02         BSR   $8A42
08A40: 60          + RTS 

08A41: 00            BRK 
08A42: 48            PHA 
08A43: 20 B7 58      JSR   $58B7
08A46: 64 F7         STZ   $F7
08A48: 03 00         ST0   #$00
08A4A: A5 04         LDA   $04
08A4C: 8D 02 00      STA   $0002
08A4F: A5 05         LDA   $05
08A51: 8D 03 00      STA   $0003
08A54: A9 02         LDA   #$02
08A56: 85 F7         STA   $F7
08A58: 03 02         ST0   #$02
08A5A: 68            PLA 
08A5B: 20 F0 58      JSR   $58F0
08A5E: 60            RTS 
08A5F: 00            BRK 
... 00 padded ...
08FFF: 00            BRK 


;*********************************************************************************
;
; CD extent 00021000-00022FFF
; Logical address 8000-9FFF
;
;*********************************************************************************

08000: 68            PLA 
08001: 74 43         STZ   $43,X
08003: 10 1A         BPL   $801F
08005: 53 04         TAM   #$04
08007: 3A            DEC 
08008: 8D FF 46      STA   $46FF
0800B: 1A            INC 
0800C: 1A            INC 
0800D: 8D 06 47      STA   $4706
08010: 1A            INC 
08011: 8D 0D 47      STA   $470D
08014: AD 8B 2C      LDA   $2C8B
08017: 85 44         STA   $44
08019: 1A            INC 
0801A: 85 45         STA   $45
0801C: 1A            INC 
0801D: 85 46         STA   $46
0801F: 1A            INC 
08020: 85 47         STA   $47
08022: 64 61         STZ   $61
08024: 64 62         STZ   $62
08026: 4C 14 40      JMP   $4014
08029: A9 0E         LDA   #$0E
0802B: 20 DC 9B      JSR   $9BDC
0802E: A9 20         LDA   #$20
08030: 85 FC         STA   $FC
08032: 64 FD         STZ   $FD
08034: A9 0F         LDA   #$0F
08036: 85 FE         STA   $FE
08038: 20 5A 4F      JSR   $4F5A
0803B: AD 71 F6      LDA   $F671
0803E: 8D 11 F7      STA   $F711
08041: AD 72 F6      LDA   $F672
08044: 8D 12 F7      STA   $F712
08047: A9 FF         LDA   #$FF
08049: A2 20         LDX   #$20
0804B: A0 40         LDY   #$40
0804D: 20 68 4F      JSR   $4F68
08050: AD F1 F6      LDA   $F6F1
08053: 8D 13 F7      STA   $F713
08056: AD F2 F6      LDA   $F6F2
08059: 8D 14 F7      STA   $F714
0805C: 20 47 50      JSR   $5047
0805F: 60            RTS 
08060: A9 0C         LDA   #$0C
08062: 20 DC 9B      JSR   $9BDC
08065: A9 A0         LDA   #$A0
08067: 85 FC         STA   $FC
08069: 64 FD         STZ   $FD
0806B: A9 0F         LDA   #$0F
0806D: 85 FE         STA   $FE
0806F: 20 5A 4F      JSR   $4F5A
08072: 8D F5 80      STA   $80F5
08075: A8            TAY 
08076: 82            CLX 
08077: BD 71 F6      LDA   $F671,X
0807A: 9D FD 31      STA   $31FD,X
0807D: E8            INX 
0807E: 88            DEY 
0807F: D0 F6         BNE   $8077
08081: A9 FF         LDA   #$FF
08083: A2 1E         LDX   #$1E
08085: A0 80         LDY   #$80
08087: 20 68 4F      JSR   $4F68
0808A: 8D FC 80      STA   $80FC
0808D: A8            TAY 
0808E: 82            CLX 
0808F: BD F1 F6      LDA   $F6F1,X
08092: 9D 07 32      STA   $3207,X
08095: E8            INX 
08096: 88            DEY 
08097: D0 F6         BNE   $808F
08099: A9 0D         LDA   #$0D
0809B: 20 DC 9B      JSR   $9BDC
0809E: A9 10         LDA   #$10
080A0: 85 FC         STA   $FC
080A2: 64 FD         STZ   $FD
080A4: A9 0F         LDA   #$0F
080A6: 85 FE         STA   $FE
080A8: A2 01         LDX   #$01
080AA: 20 61 4F      JSR   $4F61
080AD: A8            TAY 
080AE: 82            CLX 
080AF: BD 71 F6      LDA   $F671,X
080B2: 9D 0A 32      STA   $320A,X
080B5: E8            INX 
080B6: 88            DEY 
080B7: D0 F6         BNE   $80AF
080B9: A9 FF         LDA   #$FF
080BB: A2 1F         LDX   #$1F
080BD: A0 80         LDY   #$80
080BF: 20 71 4F      JSR   $4F71
080C2: AD F1 F6      LDA   $F6F1
080C5: 8D 0E 32      STA   $320E
080C8: 20 63 81      JSR   $8163
080CB: 9C 0F 32      STZ   $320F
080CE: 60            RTS 
080CF: AD 0F 32      LDA   $320F
080D2: D0 14         BNE   $80E8
080D4: A9 A7         LDA   #$A7
080D6: 85 FE         STA   $FE
080D8: A9 81         LDA   #$81
080DA: 85 FF         STA   $FF
080DC: A5 44         LDA   $44
080DE: 85 FC         STA   $FC
080E0: A9 90         LDA   #$90
080E2: 20 F0 4D      JSR   $4DF0
080E5: 8E 0F 32      STX   $320F
080E8: 44 01         BSR   $80EB
080EA: 60            RTS 
080EB: AD 0F 32      LDA   $320F
080EE: F0 42         BEQ   $8132
080F0: 73 FD 31 71 F6 01 00  TII   $31FD, $F671, $0001
080F7: 73 07 32 F1 F6 01 00  TII   $3207, $F6F1, $0001
080FE: A9 0A         LDA   #$0A
08100: 20 DC 9B      JSR   $9BDC
08103: A9 20         LDA   #$20
08105: 85 FE         STA   $FE
08107: 64 F8         STZ   $F8
08109: 64 F9         STZ   $F9
0810B: A9 20         LDA   #$20
0810D: 85 FA         STA   $FA
0810F: A9 04         LDA   #$04
08111: 85 FB         STA   $FB
08113: 20 81 4F      JSR   $4F81
08116: A9 0B         LDA   #$0B
08118: 20 DC 9B      JSR   $9BDC
0811B: A9 20         LDA   #$20
0811D: 85 FE         STA   $FE
0811F: A9 80         LDA   #$80
08121: 85 F8         STA   $F8
08123: A9 02         LDA   #$02
08125: 85 F9         STA   $F9
08127: A9 20         LDA   #$20
08129: 85 FA         STA   $FA
0812B: A9 0A         LDA   #$0A
0812D: 85 FB         STA   $FB
0812F: 20 81 4F      JSR   $4F81
08132: 60            RTS 
08133: AD 0F 32      LDA   $320F
08136: 20 0B 4E      JSR   $4E0B
08139: 82            CLX 
0813A: BD FD 31      LDA   $31FD,X
0813D: 20 25 4F      JSR   $4F25
08140: E8            INX 
08141: E0 0A         CPX   #$0A
08143: 90 F5         BCC   $813A
08145: 82            CLX 
08146: BD 07 32      LDA   $3207,X
08149: 20 E3 4B      JSR   $4BE3
0814C: E8            INX 
0814D: E0 03         CPX   #$03
0814F: 90 F5         BCC   $8146
08151: 82            CLX 
08152: BD 0A 32      LDA   $320A,X
08155: 20 25 4F      JSR   $4F25
08158: E8            INX 
08159: E0 04         CPX   #$04
0815B: 90 F5         BCC   $8152
0815D: AD 0E 32      LDA   $320E
08160: 20 E3 4B      JSR   $4BE3
08163: 82            CLX 
08164: C2            CLY 
08165: 64 FC         STZ   $FC
08167: 44 18         BSR   $8181
08169: A2 10         LDX   #$10
0816B: A9 02         LDA   #$02
0816D: 85 FC         STA   $FC
0816F: 44 10         BSR   $8181
08171: A2 20         LDX   #$20
08173: C8            INY 
08174: 64 FC         STZ   $FC
08176: 44 09         BSR   $8181
08178: A2 30         LDX   #$30
0817A: A9 02         LDA   #$02
0817C: 85 FC         STA   $FC
0817E: 44 01         BSR   $8181
08180: 60            RTS 
08181: B9 0A 32      LDA   $320A,Y
08184: 29 7F         AND   #$7F
08186: 64 FD         STZ   $FD
08188: 0A            ASL 
08189: 0A            ASL 
0818A: 26 FD         ROL   $FD
0818C: 0A            ASL 
0818D: 26 FD         ROL   $FD
0818F: 05 FC         ORA   $FC
08191: 9D B0 81      STA   $81B0,X
08194: A5 FD         LDA   $FD
08196: 9D B2 81      STA   $81B2,X
08199: AD 0E 32      LDA   $320E
0819C: 09 80         ORA   #$80
0819E: 9D B4 81      STA   $81B4,X
081A1: A9 30         LDA   #$30
081A3: 9D B6 81      STA   $81B6,X
081A6: 60            RTS 
081A7: 13 60         ST1   #$60
081A9: 23 00         ST2   #$00
081AB: 13 20         ST1   #$20
081AD: 23 00         ST2   #$00
081AF: 13 00         ST1   #$00
081B1: 23 00         ST2   #$00
081B3: 13 00         ST1   #$00
081B5: 23 00         ST2   #$00
081B7: 13 60         ST1   #$60
081B9: 23 00         ST2   #$00
081BB: 13 10         ST1   #$10
081BD: 23 01         ST2   #$01
081BF: 13 00         ST1   #$00
081C1: 23 00         ST2   #$00
081C3: 13 00         ST1   #$00
081C5: 23 00         ST2   #$00
081C7: 13 A0         ST1   #$A0
081C9: 23 00         ST2   #$00
081CB: 13 20         ST1   #$20
081CD: 23 00         ST2   #$00
081CF: 13 00         ST1   #$00
081D1: 23 00         ST2   #$00
081D3: 13 00         ST1   #$00
081D5: 23 00         ST2   #$00
081D7: 13 A0         ST1   #$A0
081D9: 23 00         ST2   #$00
081DB: 13 10         ST1   #$10
081DD: 23 01         ST2   #$01
081DF: 13 00         ST1   #$00
081E1: 23 00         ST2   #$00
081E3: 13 00         ST1   #$00
081E5: 23 00         ST2   #$00
081E7: A5 4F         LDA   $4F
081E9: 18            CLC 
081EA: 69 04         ADC   #$04
081EC: 85 4F         STA   $4F
081EE: 60            RTS 
081EF: F3 00 40 34 33 63 02  TAI   $4000, $3334, $0263
081F6: A9 34         LDA   #$34
081F8: 85 FE         STA   $FE
081FA: A9 82         LDA   #$82
081FC: 85 FF         STA   $FF
081FE: 82            CLX 
081FF: 62            CLA 
08200: 44 3F         BSR   $8241
08202: A2 01         LDX   #$01
08204: A9 FF         LDA   #$FF
08206: 44 39         BSR   $8241
08208: A9 01         LDA   #$01
0820A: A0 FF         LDY   #$FF
0820C: 8D 37 33      STA   $3337
0820F: 8C B1 33      STY   $33B1
08212: 8C 38 33      STY   $3338
08215: 9C B2 33      STZ   $33B2
08218: A9 02         LDA   #$02
0821A: 82            CLX 
0821B: 9D 1F 35      STA   $351F,X
0821E: 1A            INC 
0821F: E8            INX 
08220: C9 78         CMP   #$78
08222: 90 F7         BCC   $821B
08224: 9C E6 2C      STZ   $2CE6
08227: 9C 00 21      STZ   $2100
0822A: 9C 36 33      STZ   $3336
0822D: 73 35 82 39 38 0C 00  TII   $8235, $3839, $000C
08234: 60            RTS 
08235: 4C A8 48      JMP   $48A8
08238: 4C C0 4A      JMP   $4AC0
0823B: 4C 40 4B      JMP   $4B40
0823E: 4C 7A 4B      JMP   $4B7A
08241: 9D 55 2E      STA   $2E55,X
08244: A5 FE         LDA   $FE
08246: 9D E7 2C      STA   $2CE7,X
08249: A5 FF         LDA   $FF
0824B: 9D 61 2D      STA   $2D61,X
0824E: A5 44         LDA   $44
08250: 9D DB 2D      STA   $2DDB,X
08253: 9E A5 34      STZ   $34A5,X
08256: 60            RTS 
08257: 20 0C 45      JSR   $450C
0825A: 64 4F         STZ   $4F
0825C: 64 F7         STZ   $F7
0825E: 03 00         ST0   #$00
08260: AD 14 22      LDA   $2214
08263: 8D 02 00      STA   $0002
08266: AD 15 22      LDA   $2215
08269: 8D 03 00      STA   $0003
0826C: A9 02         LDA   #$02
0826E: 85 F7         STA   $F7
08270: 03 02         ST0   #$02
08272: 60            RTS 
08273: BD E1 F1      LDA   $F1E1,X
08276: D0 04         BNE   $827C
08278: 44 6C         BSR   $82E6
0827A: B0 2E         BCS   $82AA
0827C: DE E1 F1      DEC   $F1E1,X
0827F: 44 29         BSR   $82AA
08281: A6 2F         LDX   $2F
08283: BD 05 EF      LDA   $EF05,X
08286: 38            SEC 
08287: FD D5 F2      SBC   $F2D5,X
0828A: 9D 05 EF      STA   $EF05,X
0828D: BD 7F EF      LDA   $EF7F,X
08290: FD 4F F3      SBC   $F34F,X
08293: 9D 7F EF      STA   $EF7F,X
08296: BD F9 EF      LDA   $EFF9,X
08299: 38            SEC 
0829A: FD C9 F3      SBC   $F3C9,X
0829D: 9D F9 EF      STA   $EFF9,X
082A0: BD 73 F0      LDA   $F073,X
082A3: FD 43 F4      SBC   $F443,X
082A6: 9D 73 F0      STA   $F073,X
082A9: 60            RTS 
082AA: BD 05 EF      LDA   $EF05,X
082AD: 18            CLC 
082AE: 7D D5 F2      ADC   $F2D5,X
082B1: 9D 05 EF      STA   $EF05,X
082B4: BD 7F EF      LDA   $EF7F,X
082B7: 7D 4F F3      ADC   $F34F,X
082BA: 9D 7F EF      STA   $EF7F,X
082BD: BD F9 EF      LDA   $EFF9,X
082C0: 18            CLC 
082C1: 7D C9 F3      ADC   $F3C9,X
082C4: 9D F9 EF      STA   $EFF9,X
082C7: BD 73 F0      LDA   $F073,X
082CA: 7D 43 F4      ADC   $F443,X
082CD: 9D 73 F0      STA   $F073,X
082D0: 4C 76 83      JMP   $8376
082D3: 9E 67 F1      STZ   $F167,X
082D6: 9E E1 F1      STZ   $F1E1,X
082D9: 9E D5 F2      STZ   $F2D5,X
082DC: 9E 4F F3      STZ   $F34F,X
082DF: 9E C9 F3      STZ   $F3C9,X
082E2: 9E 43 F4      STZ   $F443,X
082E5: 60            RTS 
082E6: 20 6D 83      JSR   $836D
082E9: BD 8F 30      LDA   $308F,X
082EC: 85 F8         STA   $F8
082EE: BD 09 31      LDA   $3109,X
082F1: 85 F9         STA   $F9
082F3: B2 F8         LDA   ($F8)
082F5: 18            CLC 
082F6: 65 F8         ADC   $F8
082F8: 85 F8         STA   $F8
082FA: 62            CLA 
082FB: 65 F9         ADC   $F9
082FD: 85 F9         STA   $F9
082FF: BD 67 F1      LDA   $F167,X
08302: FE 67 F1      INC   $F167,X
08305: 0A            ASL 
08306: 0A            ASL 
08307: A8            TAY 
08308: B1 F8         LDA   ($F8),Y
0830A: 10 26         BPL   $8332
0830C: B3 01 5B F2   TST   $01, $F25B
08310: D0 18         BNE   $832A
08312: B3 02 5B F2   TST   $02, $F25B
08316: D0 0F         BNE   $8327
08318: BD 5B F2      LDA   $F25B,X
0831B: 09 08         ORA   #$08
0831D: 9D 5B F2      STA   $F25B,X
08320: 20 08 4B      JSR   $4B08
08323: 76 83         ROR   $83,X
08325: 38            SEC 
08326: 60            RTS 
08327: 4C 90 49      JMP   $4990
0832A: 44 A7         BSR   $82D3
0832C: FE 67 F1      INC   $F167,X
0832F: C2            CLY 
08330: B2 F8         LDA   ($F8)
08332: 9D 97 ED      STA   $ED97,X
08335: C8            INY 
08336: B1 F8         LDA   ($F8),Y
08338: 9D E1 F1      STA   $F1E1,X
0833B: C8            INY 
0833C: 64 FA         STZ   $FA
0833E: B1 F8         LDA   ($F8),Y
08340: 10 02         BPL   $8344
08342: C6 FA         DEC   $FA
08344: 18            CLC 
08345: 7D D5 F2      ADC   $F2D5,X
08348: 9D D5 F2      STA   $F2D5,X
0834B: A5 FA         LDA   $FA
0834D: 7D 4F F3      ADC   $F34F,X
08350: 9D 4F F3      STA   $F34F,X
08353: C8            INY 
08354: 64 FA         STZ   $FA
08356: B1 F8         LDA   ($F8),Y
08358: 10 02         BPL   $835C
0835A: C6 FA         DEC   $FA
0835C: 18            CLC 
0835D: 7D C9 F3      ADC   $F3C9,X
08360: 9D C9 F3      STA   $F3C9,X
08363: A5 FA         LDA   $FA
08365: 7D 43 F4      ADC   $F443,X
08368: 9D 43 F4      STA   $F443,X
0836B: 18            CLC 
0836C: 60            RTS 
0836D: BD 83 31      LDA   $3183,X
08370: 53 20         TAM   #$20
08372: 1A            INC 
08373: 53 40         TAM   #$40
08375: 60            RTS 
08376: B3 60 ED F0   TST   $60, $F0ED
0837A: F0 01         BEQ   $837D
0837C: 60            RTS 
0837D: B3 08 ED F0   TST   $08, $F0ED
08381: F0 05         BEQ   $8388
08383: 20 BA 55      JSR   $55BA
08386: A6 2F         LDX   $2F
08388: 44 E3         BSR   $836D
0838A: BD 8F 30      LDA   $308F,X
0838D: 18            CLC 
0838E: 69 01         ADC   #$01
08390: 85 FC         STA   $FC
08392: BD 09 31      LDA   $3109,X
08395: 69 00         ADC   #$00
08397: 85 FD         STA   $FD
08399: BD 97 ED      LDA   $ED97,X
0839C: 0A            ASL 
0839D: A8            TAY 
0839E: B1 FC         LDA   ($FC),Y
083A0: 18            CLC 
083A1: 65 FC         ADC   $FC
083A3: 85 02         STA   $02
083A5: C8            INY 
083A6: B1 FC         LDA   ($FC),Y
083A8: 65 FD         ADC   $FD
083AA: 85 03         STA   $03
083AC: B2 02         LDA   ($02)
083AE: 85 4E         STA   $4E
083B0: 18            CLC 
083B1: 65 4F         ADC   $4F
083B3: C9 40         CMP   #$40
083B5: 90 03         BCC   $83BA
083B7: F0 01         BEQ   $83BA
083B9: 60            RTS 
083BA: E6 02         INC   $02
083BC: D0 02         BNE   $83C0
083BE: E6 03         INC   $03
083C0: BD 05 EF      LDA   $EF05,X
083C3: 18            CLC 
083C4: 69 20         ADC   #$20
083C6: 85 F8         STA   $F8
083C8: BD 7F EF      LDA   $EF7F,X
083CB: 69 00         ADC   #$00
083CD: 85 F9         STA   $F9
083CF: BD F9 EF      LDA   $EFF9,X
083D2: 18            CLC 
083D3: 69 40         ADC   #$40
083D5: 85 FA         STA   $FA
083D7: BD 73 F0      LDA   $F073,X
083DA: 69 00         ADC   #$00
083DC: 85 FB         STA   $FB
083DE: C2            CLY 
083DF: 64 18         STZ   $18
083E1: B1 02         LDA   ($02),Y
083E3: 10 02         BPL   $83E7
083E5: C6 18         DEC   $18
083E7: C8            INY 
083E8: 18            CLC 
083E9: 65 F8         ADC   $F8
083EB: 85 FC         STA   $FC
083ED: A5 18         LDA   $18
083EF: 65 F9         ADC   $F9
083F1: 85 FD         STA   $FD
083F3: 64 18         STZ   $18
083F5: B1 02         LDA   ($02),Y
083F7: 10 02         BPL   $83FB
083F9: C6 18         DEC   $18
083FB: C8            INY 
083FC: 18            CLC 
083FD: 65 FA         ADC   $FA
083FF: 85 FE         STA   $FE
08401: A5 18         LDA   $18
08403: 65 FB         ADC   $FB
08405: 85 FF         STA   $FF
08407: 20 1A 4E      JSR   $4E1A
0840A: 90 05         BCC   $8411
0840C: C8            INY 
0840D: C8            INY 
0840E: C8            INY 
0840F: 80 76         BRA   $8487
08411: A5 FE         LDA   $FE
08413: 8D 02 00      STA   $0002
08416: A5 FF         LDA   $FF
08418: 8D 03 00      STA   $0003
0841B: A5 FC         LDA   $FC
0841D: 8D 02 00      STA   $0002
08420: A5 FD         LDA   $FD
08422: 8D 03 00      STA   $0003
08425: B1 02         LDA   ($02),Y
08427: C8            INY 
08428: 85 FD         STA   $FD
0842A: B1 02         LDA   ($02),Y
0842C: 4A            LSR 
0842D: 4A            LSR 
0842E: 4A            LSR 
0842F: 85 FC         STA   $FC
08431: BD 11 EE      LDA   $EE11,X
08434: AA            TAX 
08435: BD 15 F7      LDA   $F715,X
08438: 18            CLC 
08439: 65 FD         ADC   $FD
0843B: AA            TAX 
0843C: BD 55 F7      LDA   $F755,X
0843F: 29 7F         AND   #$7F
08441: 64 FD         STZ   $FD
08443: 0A            ASL 
08444: 26 FD         ROL   $FD
08446: 0A            ASL 
08447: 26 FD         ROL   $FD
08449: 0A            ASL 
0844A: 26 FD         ROL   $FD
0844C: 05 FC         ORA   $FC
0844E: 8D 02 00      STA   $0002
08451: A5 FD         LDA   $FD
08453: 8D 03 00      STA   $0003
08456: A6 2F         LDX   $2F
08458: BD 8B EE      LDA   $EE8B,X
0845B: AA            TAX 
0845C: BD 15 F7      LDA   $F715,X
0845F: 85 19         STA   $19
08461: B1 02         LDA   ($02),Y
08463: C8            INY 
08464: 29 0F         AND   #$0F
08466: 18            CLC 
08467: 65 19         ADC   $19
08469: AA            TAX 
0846A: BD 55 F7      LDA   $F755,X
0846D: 29 0F         AND   #$0F
0846F: 85 19         STA   $19
08471: A6 2F         LDX   $2F
08473: BD ED F0      LDA   $F0ED,X
08476: 29 80         AND   #$80
08478: 05 19         ORA   $19
0847A: 8D 02 00      STA   $0002
0847D: B1 02         LDA   ($02),Y
0847F: C8            INY 
08480: 8D 03 00      STA   $0003
08483: A6 2F         LDX   $2F
08485: E6 4F         INC   $4F
08487: 98            TYA 
08488: 18            CLC 
08489: 65 02         ADC   $02
0848B: 85 02         STA   $02
0848D: 62            CLA 
0848E: 65 03         ADC   $03
08490: 85 03         STA   $03
08492: C6 4E         DEC   $4E
08494: F0 03         BEQ   $8499
08496: 4C DE 83      JMP   $83DE
08499: 60            RTS 
0849A: A2 02         LDX   #$02
0849C: 20 5A 85      JSR   $855A
0849F: C2            CLY 
084A0: A9 10         LDA   #$10
084A2: 85 FD         STA   $FD
084A4: 44 4F         BSR   $84F5
084A6: 5A            PHY 

084A7: A0 08      -- LDY   #$08
084A9: A5 FE       - LDA   $FE
084AB: 29 01         AND   #$01
084AD: F0 03         BEQ   $84B2 +
084AF: 20 2A 38      JSR   $382A ; Decompress a byte
084B2: 8D 02 00    + STA   $0002
084B5: A5 FE         LDA   $FE
084B7: 29 02         AND   #$02
084B9: F0 03         BEQ   $84BE +
084BB: 20 2A 38      JSR   $382A ; Decompress a byte
084BE: 8D 03 00    + STA   $0003
084C1: 88            DEY 
084C2: D0 E5         BNE   $84A9 -
084C4: A0 08         LDY   #$08
084C6: A5 FE       - LDA   $FE
084C8: 29 04         AND   #$04
084CA: F0 03         BEQ   $84CF +
084CC: 20 2A 38      JSR   $382A ; Decompress a byte
084CF: 8D 02 00    + STA   $0002
084D2: A5 FE         LDA   $FE
084D4: 29 08         AND   #$08
084D6: F0 03         BEQ   $84DB +
084D8: 20 2A 38      JSR   $382A ; Decompress a byte
084DB: 8D 03 00    + STA   $0003
084DE: 88            DEY 
084DF: D0 E5         BNE   $84C6 -
084E1: C6 FD         DEC   $FD
084E3: D0 C2         BNE   $84A7 --
084E5: 7A            PLY 
084E6: 98            TYA 
084E7: 29 07         AND   #$07
084E9: D0 03         BNE   $84EE
084EB: 20 27 38      JSR   $3827
084EE: C4 FC         CPY   $FC
084F0: 90 AE         BCC   $84A0
084F2: A5 FC         LDA   $FC
084F4: 60            RTS 
084F5: 64 F7         STZ   $F7
084F7: 03 00         ST0   #$00
084F9: 13 00         ST1   #$00
084FB: B9 71 F6      LDA   $F671,Y
084FE: 29 7F         AND   #$7F
08500: C8            INY 
08501: 8D 03 00      STA   $0003
08504: A9 02         LDA   #$02
08506: 85 F7         STA   $F7
08508: 03 02         ST0   #$02
0850A: 60            RTS 
0850B: BD 58 85      LDA   $8558,X
0850E: 85 FA         STA   $FA
08510: 20 5A 85      JSR   $855A
08513: C2            CLY 
08514: A5 FA         LDA   $FA
08516: 85 FD         STA   $FD
08518: 44 DB         BSR   $84F5
0851A: 5A            PHY 
0851B: A2 04         LDX   #$04
0851D: A5 FE         LDA   $FE
0851F: 85 FF         STA   $FF
08521: DA            PHX 
08522: A0 10         LDY   #$10
08524: 46 FF         LSR   $FF
08526: 90 11         BCC   $8539
08528: 20 2A 38      JSR   $382A ; Decompress a byte
0852B: 8D 02 00      STA   $0002
0852E: 20 2A 38      JSR   $382A ; Decompress a byte
08531: 8D 03 00      STA   $0003
08534: 88            DEY 
08535: D0 F1         BNE   $8528
08537: 80 07         BRA   $8540
08539: 13 00         ST1   #$00
0853B: 23 00         ST2   #$00
0853D: 88            DEY 
0853E: D0 F9         BNE   $8539
08540: FA            PLX 
08541: CA            DEX 
08542: D0 DD         BNE   $8521
08544: C6 FD         DEC   $FD
08546: D0 D3         BNE   $851B
08548: 7A            PLY 
08549: 98            TYA 
0854A: 29 07         AND   #$07
0854C: D0 03         BNE   $8551
0854E: 20 27 38      JSR   $3827
08551: C4 FC         CPY   $FC
08553: 90 BF         BCC   $8514
08555: A5 FC         LDA   $FC
08557: 60            RTS 
08558: 04 08         TSB   $08
0855A: A5 FC         LDA   $FC
0855C: D0 02         BNE   $8560
0855E: C6 FD         DEC   $FD
08560: C6 FC         DEC   $FC
08562: BC 8C 85      LDY   $858C,X
08565: A5 FD         LDA   $FD
08567: 4A            LSR 
08568: 66 FC         ROR   $FC
0856A: 88            DEY 
0856B: D0 FA         BNE   $8567
0856D: E6 FC         INC   $FC
0856F: A4 FC         LDY   $FC
08571: CA            DEX 
08572: F0 0C         BEQ   $8580
08574: 82            CLX 
08575: 20 9F 4E      JSR   $4E9F
08578: 9D 71 F6      STA   $F671,X
0857B: E8            INX 
0857C: 88            DEY 
0857D: D0 F6         BNE   $8575
0857F: 60            RTS 
08580: 82            CLX 
08581: 20 5A 4E      JSR   $4E5A
08584: 9D 71 F6      STA   $F671,X
08587: E8            INX 
08588: 88            DEY 
08589: D0 F6         BNE   $8581
0858B: 60            RTS 
0858C: 02            SXY 
0858D: 03 04         ST0   #$04
0858F: A0 4C         LDY   #$4C
08591: 80 02         BRA   $8595
08593: A0 2C         LDY   #$2C
08595: 8C 11 86      STY   $8611
08598: C9 FF         CMP   #$FF
0859A: D0 03         BNE   $859F
0859C: 4C 3F 86      JMP   $863F
0859F: 20 21 38      JSR   $3821 ; Seek to a compressed block (A=bank,X=block#)
085A2: 85 FA         STA   $FA
085A4: 18            CLC 
085A5: 65 01         ADC   $01
085A7: 8D B9 85      STA   $85B9
085AA: 86 04         STX   $04
085AC: 98            TYA 
085AD: 18            CLC 
085AE: 69 A0         ADC   #$A0
085B0: 85 05         STA   $05
085B2: 44 30         BSR   $85E4 ; Load byte from ($04)++
085B4: A8            TAY 
085B5: 64 0C         STZ   $0C
085B7: 5A            PHY 
085B8: A9 00         LDA   #$00
085BA: 53 20         TAM   #$20
085BC: 1A            INC 
085BD: 53 40         TAM   #$40
085BF: 44 23         BSR   $85E4 ; Load byte from ($04)++
085C1: 85 0A         STA   $0A
085C3: 44 1F         BSR   $85E4 ; Load byte from ($04)++
085C5: 85 0B         STA   $0B
085C7: C9 80         CMP   #$80
085C9: 90 0B         BCC   $85D6
085CB: 44 4A         BSR   $8617
085CD: 44 1E         BSR   $85ED
085CF: A9 02         LDA   #$02
085D1: 9D D5 2E      STA   $2ED5,X
085D4: 80 07         BRA   $85DD
085D6: 44 15         BSR   $85ED
085D8: A9 01         LDA   #$01
085DA: 9D D5 2E      STA   $2ED5,X
085DD: 7A            PLY 
085DE: 88            DEY 
085DF: D0 D6         BNE   $85B7
085E1: A5 0C         LDA   $0C
085E3: 60            RTS 

;-------------------------------
;
; Load byte from ($04)++
;
085E4: B2 04         LDA   ($04)
085E6: E6 04         INC   $04
085E8: D0 02         BNE   $85EC +
085EA: E6 05         INC   $05
085EC: 60          + RTS 



085ED: A5 04         LDA   $04
085EF: 85 F8         STA   $F8
085F1: A5 05         LDA   $05
085F3: 38            SEC 
085F4: E9 A0         SBC   #$A0
085F6: 85 F9         STA   $F9
085F8: 44 17         BSR   $8611
085FA: A4 0C         LDY   $0C
085FC: E6 0C         INC   $0C
085FE: 99 F1 F6      STA   $F6F1,Y
08601: A5 0A         LDA   $0A
08603: 18            CLC 
08604: 65 04         ADC   $04
08606: 85 04         STA   $04
08608: A5 0B         LDA   $0B
0860A: 29 7F         AND   #$7F
0860C: 65 05         ADC   $05
0860E: 85 05         STA   $05
08610: 60            RTS 
08611: 4C CF 4B      JMP   $4BCF
08614: 4C D6 4B      JMP   $4BD6

;-------------------------------------
;
;
;
08617: A5 04         LDA   $04
08619: 85 0E         STA   $0E
0861B: A5 05         LDA   $05
0861D: 85 0F         STA   $0F
0861F: A9 10         LDA   #$10
08621: 85 10         STA   $10
08623: A0 01         LDY   #$01
08625: 62          - CLA 
08626: 91 0E         STA   ($0E),Y
08628: C8            INY 
08629: 91 0E         STA   ($0E),Y
0862B: 88            DEY 
0862C: B2 0E         LDA   ($0E)
0862E: 1A            INC 
0862F: 38            SEC 
08630: 2A            ROL 
08631: 65 0E         ADC   $0E
08633: 85 0E         STA   $0E
08635: 62            CLA 
08636: 65 0F         ADC   $0F
08638: 85 0F         STA   $0F
0863A: C6 10         DEC   $10
0863C: D0 E7         BNE   $8625 -
0863E: 60            RTS 


0863F: 8A            TXA 
08640: 20 E3 9B      JSR   $9BE3
08643: 86 08         STX   $08
08645: 84 09         STY   $09
08647: 64 0A         STZ   $0A
08649: 44 68         BSR   $86B3
0864B: A8            TAY 
0864C: 82            CLX 
0864D: AD CF 2E      LDA   $2ECF
08650: 85 FA         STA   $FA
08652: 5A            PHY 
08653: DA            PHX 
08654: 44 5D         BSR   $86B3
08656: 85 0C         STA   $0C
08658: 44 59         BSR   $86B3
0865A: 85 0B         STA   $0B
0865C: 29 7F         AND   #$7F
0865E: 85 0D         STA   $0D
08660: A6 0C         LDX   $0C
08662: A8            TAY 
08663: 20 D0 5D      JSR   $5DD0
08666: 86 F8         STX   $F8
08668: 84 F9         STY   $F9
0866A: 86 04         STX   $04
0866C: 84 05         STY   $05
0866E: C2            CLY 
0866F: 44 42         BSR   $86B3
08671: 91 04         STA   ($04),Y
08673: C8            INY 
08674: D0 02         BNE   $8678
08676: E6 05         INC   $05
08678: A5 0C         LDA   $0C
0867A: D0 02         BNE   $867E
0867C: C6 0D         DEC   $0D
0867E: C6 0C         DEC   $0C
08680: A5 0C         LDA   $0C
08682: 05 0D         ORA   $0D
08684: D0 E9         BNE   $866F
08686: A5 0B         LDA   $0B
08688: C9 80         CMP   #$80
0868A: A9 01         LDA   #$01
0868C: 90 0D         BCC   $869B
0868E: A5 F8         LDA   $F8
08690: 85 04         STA   $04
08692: A5 F9         LDA   $F9
08694: 85 05         STA   $05
08696: 20 17 86      JSR   $8617
08699: A9 02         LDA   #$02
0869B: 48            PHA 
0869C: A9 E0         LDA   #$E0
0869E: 14 F9         TRB   $F9
086A0: 20 11 86      JSR   $8611
086A3: 68            PLA 
086A4: 9D D5 2E      STA   $2ED5,X
086A7: 8A            TXA 
086A8: FA            PLX 
086A9: 9D F1 F6      STA   $F6F1,X
086AC: E8            INX 
086AD: 7A            PLY 
086AE: 88            DEY 
086AF: D0 A1         BNE   $8652
086B1: 8A            TXA 
086B2: 60            RTS 
086B3: A6 0A         LDX   $0A
086B5: D0 20         BNE   $86D7
086B7: A5 F9         LDA   $F9
086B9: 48            PHA 
086BA: A5 F8         LDA   $F8
086BC: 48            PHA 
086BD: A5 08         LDA   $08
086BF: 85 FC         STA   $FC
086C1: A5 09         LDA   $09
086C3: 85 FD         STA   $FD
086C5: 64 F8         STZ   $F8
086C7: A9 01         LDA   #$01
086C9: 85 F9         STA   $F9
086CB: 20 31 9C      JSR   $9C31
086CE: E6 09         INC   $09
086D0: 68            PLA 
086D1: 85 F8         STA   $F8
086D3: 68            PLA 
086D4: 85 F9         STA   $F9
086D6: 82            CLX 
086D7: BD 7D 27      LDA   $277D,X
086DA: E6 0A         INC   $0A
086DC: 60            RTS 
086DD: 5A            PHY 
086DE: 20 21 38      JSR   $3821 ; Seek to a compressed block (A=bank,X=block#)
086E1: 18            CLC 
086E2: 65 01         ADC   $01
086E4: 85 1A         STA   $1A
086E6: 86 04         STX   $04
086E8: 98            TYA 
086E9: 18            CLC 
086EA: 69 A0         ADC   #$A0
086EC: 85 05         STA   $05
086EE: 20 E4 85      JSR   $85E4 ; Load byte from ($04)++
086F1: 20 E4 85      JSR   $85E4 ; Load byte from ($04)++
086F4: 20 E4 85      JSR   $85E4 ; Load byte from ($04)++
086F7: C9 80         CMP   #$80
086F9: A9 01         LDA   #$01
086FB: 90 05         BCC   $8702
086FD: 20 17 86      JSR   $8617
08700: A9 02         LDA   #$02
08702: FA            PLX 
08703: 09 80         ORA   #$80
08705: 9D D5 2E      STA   $2ED5,X
08708: A5 1A         LDA   $1A
0870A: 9D 55 2F      STA   $2F55,X
0870D: A5 04         LDA   $04
0870F: 9D 15 2F      STA   $2F15,X
08712: A5 05         LDA   $05
08714: 9D 35 2F      STA   $2F35,X
08717: 60            RTS 
08718: A4 FA         LDY   $FA
0871A: 64 F7         STZ   $F7
0871C: 03 00         ST0   #$00
0871E: A5 F8         LDA   $F8
08720: 8D 02 00      STA   $0002
08723: A5 F9         LDA   $F9
08725: 8D 03 00      STA   $0003
08728: A9 02         LDA   #$02
0872A: 85 F7         STA   $F7
0872C: 03 02         ST0   #$02
0872E: 20 2A 38      JSR   $382A ; Decompress a byte
08731: AA            TAX 
08732: BD 71 F6      LDA   $F671,X
08735: 85 FC         STA   $FC
08737: 20 2A 38      JSR   $382A ; Decompress a byte
0873A: 85 FD         STA   $FD
0873C: 29 0F         AND   #$0F
0873E: AA            TAX 
0873F: BD F1 F6      LDA   $F6F1,X
08742: 06 FD         ASL   $FD
08744: 26 FC         ROL   $FC
08746: 2A            ROL 
08747: 06 FD         ASL   $FD
08749: 26 FC         ROL   $FC
0874B: 2A            ROL 
0874C: 06 FD         ASL   $FD
0874E: 26 FC         ROL   $FC
08750: 2A            ROL 
08751: 06 FD         ASL   $FD
08753: 26 FC         ROL   $FC
08755: 2A            ROL 
08756: 48            PHA 
08757: A5 FC         LDA   $FC
08759: 8D 02 00      STA   $0002
0875C: 68            PLA 
0875D: 8D 03 00      STA   $0003
08760: 88            DEY 
08761: D0 CB         BNE   $872E
08763: A5 FE         LDA   $FE
08765: 18            CLC 
08766: 65 F8         ADC   $F8
08768: 85 F8         STA   $F8
0876A: 62            CLA 
0876B: 65 F9         ADC   $F9
0876D: 85 F9         STA   $F9
0876F: C6 FB         DEC   $FB
08771: D0 A5         BNE   $8718
08773: 60            RTS 
08774: 9C 0F 32      STZ   $320F
08777: 20 A8 9B      JSR   $9BA8
0877A: AD 8B 2C      LDA   $2C8B
0877D: 8D 88 2C      STA   $2C88
08780: 20 29 80      JSR   $8029
08783: 20 60 80      JSR   $8060
08786: 9C DD 2C      STZ   $2CDD
08789: 9C DE 2C      STZ   $2CDE
0878C: 9C DF 2C      STZ   $2CDF
0878F: 9C E0 2C      STZ   $2CE0
08792: A9 02         LDA   #$02
08794: 20 2D 38      JSR   $382D
08797: A2 FE         LDX   #$FE
08799: 20 1B 38      JSR   $381B
0879C: AA            TAX 
0879D: 18            CLC 
0879E: 65 01         ADC   $01
087A0: 53 20         TAM   #$20
087A2: 73 00 A0 1E F8 00 04  TII   $A000, $F81E, $0400
087A9: 8A            TXA 
087AA: 20 18 38      JSR   $3818
087AD: 20 CC 47      JSR   $47CC
087B0: A9 C8         LDA   #$C8
087B2: 85 FE         STA   $FE
087B4: A9 87         LDA   #$87
087B6: 85 FF         STA   $FF
087B8: A5 44         LDA   $44
087BA: 85 FC         STA   $FC
087BC: A9 28         LDA   #$28
087BE: 20 30 49      JSR   $4930
087C1: 20 36 38      JSR   $3836
087C4: 83 11 10      TST   $11, $10
087C7: 60            RTS 
087C8: 20 47 50      JSR   $5047
087CB: AD D3 2C      LDA   $2CD3
087CE: F0 38         BEQ   $8808
087D0: 1F 00 35      BBR1  $00, $8808
087D3: 20 9D 58      JSR   $589D
087D6: 20 85 88      JSR   $8885
087D9: A9 40         LDA   #$40
087DB: A0 05         LDY   #$05
087DD: 20 B7 4C      JSR   $4CB7
087E0: A6 2F         LDX   $2F
087E2: A9 28         LDA   #$28
087E4: 20 93 4A      JSR   $4A93
087E7: 20 C0 4A      JSR   $4AC0
087EA: A6 2F         LDX   $2F
087EC: A9 28         LDA   #$28
087EE: 20 93 4A      JSR   $4A93
087F1: 20 C0 4A      JSR   $4AC0
087F4: A9 40         LDA   #$40
087F6: A0 05         LDY   #$05
087F8: 20 B4 4C      JSR   $4CB4
087FB: A6 2F         LDX   $2F
087FD: A9 28         LDA   #$28
087FF: 20 93 4A      JSR   $4A93
08802: 20 C0 4A      JSR   $4AC0
08805: 20 EA 88      JSR   $88EA
08808: 64 2C         STZ   $2C
0880A: AD 8D 2C      LDA   $2C8D
0880D: C9 04         CMP   #$04
0880F: D0 03         BNE   $8814
08811: 4C 70 88      JMP   $8870
08814: 48            PHA 
08815: 20 36 38      JSR   $3836
08818: 83 01 14      TST   $01, $14
0881B: 20 36 38      JSR   $3836
0881E: 83 0E 12      TST   $0E, $12
08821: 20 36 38      JSR   $3836
08824: 83 14 18      TST   $14, $18
08827: 20 AB 88      JSR   $88AB
0882A: AD D3 2C      LDA   $2CD3
0882D: F0 08         BEQ   $8837
0882F: 1F 00 05      BBR1  $00, $8837
08832: A9 01         LDA   #$01
08834: 0C BA FC      TSB   $FCBA
08837: 68            PLA 
08838: C9 03         CMP   #$03
0883A: F0 45         BEQ   $8881
0883C: 93 01 BA FC   TST   $01, $FCBA
08840: F0 27         BEQ   $8869
08842: A2 10         LDX   #$10
08844: C2            CLY 
08845: A9 08         LDA   #$08
08847: 8D 5E 88      STA   $885E
0884A: E7 2C         SMB6  $2C
0884C: A9 03         LDA   #$03
0884E: 8D 71 FC      STA   $FC71
08851: D7 2C         SMB5  $2C
08853: 20 EA 41      JSR   $41EA
08856: A9 01         LDA   #$01
08858: A2 FF         LDX   #$FF
0885A: 20 FE 42      JSR   $42FE
0885D: A9 08         LDA   #$08
0885F: A2 FF         LDX   #$FF
08861: 20 FE 42      JSR   $42FE
08864: 57 2C         RMB5  $2C
08866: 4C 90 49      JMP   $4990
08869: A2 01         LDX   #$01
0886B: C2            CLY 
0886C: A9 09         LDA   #$09
0886E: 80 D7         BRA   $8847
08870: 20 AB 88      JSR   $88AB
08873: AE 8E 2C      LDX   $2C8E
08876: AC 8F 2C      LDY   $2C8F
08879: A9 1A         LDA   #$1A
0887B: F7 2C         SMB7  $2C
0887D: C7 2C         SMB4  $2C
0887F: 80 C6         BRA   $8847
08881: 82            CLX 
08882: C2            CLY 
08883: 80 C0         BRA   $8845
08885: 20 77 50      JSR   $5077
08888: 64 F8         STZ   $F8
0888A: A9 1C         LDA   #$1C
0888C: 85 F9         STA   $F9
0888E: 64 FA         STZ   $FA
08890: A9 10         LDA   #$10
08892: 85 FB         STA   $FB
08894: A9 10         LDA   #$10
08896: 20 B5 50      JSR   $50B5
08899: 62            CLA 
0889A: 20 C9 50      JSR   $50C9
0889D: 20 D7 50      JSR   $50D7
088A0: 73 F1 88 00 EC 36 00  TII   $88F1, $EC00, $0036
088A7: 20 06 51      JSR   $5106
088AA: 60            RTS 
088AB: 9C BA FC      STZ   $FCBA
088AE: 20 36 38      JSR   $3836
088B1: 83 14 16      TST   $14, $16
088B4: B0 33         BCS   $88E9
088B6: AD E0 5F      LDA   $5FE0
088B9: 3A            DEC 
088BA: 85 F8         STA   $F8
088BC: 64 F9         STZ   $F9
088BE: A9 05         LDA   #$05
088C0: 85 FA         STA   $FA
088C2: 64 FB         STZ   $FB
088C4: 20 03 38      JSR   $3803 ; CD System Call (BIT instruction follows)
088C7: 2C C9 E0      BIT   $E0C9 ; MA_DIV16S?
088CA: AD E0 5F      LDA   $5FE0
088CD: 38            SEC 
088CE: E5 FE         SBC   $FE
088D0: 85 FC         STA   $FC
088D2: 43 20         TMA   #$20
088D4: 48            PHA 
088D5: A9 03         LDA   #$03
088D7: 18            CLC 
088D8: 65 01         ADC   $01
088DA: 53 20         TAM   #$20
088DC: A5 FC         LDA   $FC
088DE: 8D 32 BD      STA   $BD32
088E1: A5 FE         LDA   $FE
088E3: 8D 34 BD      STA   $BD34
088E6: 68            PLA 
088E7: 53 20         TAM   #$20
088E9: 60            RTS 
088EA: 20 BC 50      JSR   $50BC
088ED: 20 99 50      JSR   $5099
088F0: 60            RTS 
088F1: 40            RTI 
088F2: 58            CLI 
088F3: 31 32         AND   ($32),Y
088F5: 40            RTI 
088F6: 59 30 33      EOR   $3330,Y
088F9: D9 D3 AD      CMP   $ADD3,Y
088FC: B4 40         LDY   $40,X
088FE: 58            CLI 
088FF: 30 37         BMI   $8938
08901: 40            RTI 
08902: 59 30 37      EOR   $3730,Y
08905: CD C1 CE      CMP   $CEC1
08908: C1 C7         CMP   ($C7,X)
0890A: C5 D2         CMP   $D2
0890C: A0 CD         LDY   #$CD
0890E: C1 D3         CMP   ($D3,X)
08910: D4            CSH 
08911: C5 D2         CMP   $D2
08913: 40            RTI 
08914: 58            CLI 
08915: 30 39         BMI   $8950
08917: 40            RTI 
08918: 59 31 31      EOR   $3131,Y
0891B: B1 B9         LDA   ($B9),Y
0891D: B9 B3 AF      LDA   $AFB3,Y
08920: B1 B1         LDA   ($B1),Y
08922: AF B0 B5      BBS2  $B0, $88DA
08925: 00            BRK 
08926: 15 DC         ORA   $DC,X
08928: 9B            ??? 
08929: 12 45         ORA   ($45)
0892B: 89 13         BIT   #$13
0892D: 4C 89 10      JMP   $1089
08930: E9 40         SBC   #$40
08932: 11 31         ORA   ($31),Y
08934: 41 14         EOR   ($14,X)
08936: A8            TAY 
08937: 9B            ??? 
08938: 16 60         ASL   $60,X
0893A: 80 17         BRA   $8953
0893C: CF 80 18      BBS4  $80, $8957
0893F: 33            ??? 
08940: 81 19         STA   ($19,X)
08942: 4F 89 FF      BBR4  $89, $8944
08945: A5 00         LDA   $00
08947: 09 18         ORA   #$18
08949: 85 00         STA   $00
0894B: 60            RTS 
0894C: 37 00         RMB3  $00
0894E: 60            RTS 
0894F: EA            NOP 
08950: 48            PHA 
08951: AD 1B F8      LDA   $F81B
08954: 8D 8E 2C      STA   $2C8E
08957: AD 1C F8      LDA   $F81C
0895A: 8D 8F 2C      STA   $2C8F
0895D: 20 36 38      JSR   $3836
08960: 83 05 11      TST   $05, $11
08963: 68            PLA 
08964: 8D 89 2C      STA   $2C89
08967: 20 C0 4A      JSR   $4AC0
0896A: 00            BRK 
0896B: EA            NOP 
0896C: EA            NOP 
0896D: 10 8C         BPL   $88FB
0896F: 89 11         BIT   #$11
08971: C7 89         SMB4  $89
08973: 12 D3         ORA   ($D3)
08975: 89 13         BIT   #$13
08977: 1A            INC 
08978: 8A            TXA 
08979: 14 12         TRB   $12
0897B: 8A            TXA 
0897C: 15 E1         ORA   $E1,X
0897E: 89 16         BIT   #$16
08980: ED 89 17      SBC   $1789
08983: FB            ??? 
08984: 89 18         BIT   #$18
08986: 9A            TXS 
08987: 89 19         BIT   #$19
08989: AF 89 FF      BBS2  $89, $898B
0898C: 44 7B         BSR   $8A09
0898E: B9 2C FC      LDA   $FC2C,Y
08991: 3D 04 40      AND   $4004,X
08994: F0 02         BEQ   $8998
08996: 38            SEC 
08997: 60            RTS 
08998: 18            CLC 
08999: 60            RTS 
0899A: 85 18         STA   $18
0899C: 86 19         STX   $19
0899E: 64 1A         STZ   $1A
089A0: A5 18         LDA   $18
089A2: 44 E8         BSR   $898C
089A4: 26 1A         ROL   $1A
089A6: E6 18         INC   $18
089A8: C6 19         DEC   $19
089AA: D0 F4         BNE   $89A0
089AC: A5 1A         LDA   $1A
089AE: 60            RTS 
089AF: 86 19         STX   $19
089B1: 18            CLC 
089B2: 65 19         ADC   $19
089B4: 85 18         STA   $18
089B6: 84 1A         STY   $1A
089B8: C6 18         DEC   $18
089BA: 44 05         BSR   $89C1
089BC: C6 19         DEC   $19
089BE: D0 F8         BNE   $89B8
089C0: 60            RTS 
089C1: A5 18         LDA   $18
089C3: 46 1A         LSR   $1A
089C5: 90 0C         BCC   $89D3
089C7: 44 40         BSR   $8A09
089C9: B9 2C FC      LDA   $FC2C,Y
089CC: 1D 04 40      ORA   $4004,X
089CF: 99 2C FC      STA   $FC2C,Y
089D2: 60            RTS 
089D3: 44 34         BSR   $8A09
089D5: BD 04 40      LDA   $4004,X
089D8: 49 FF         EOR   #$FF
089DA: 39 2C FC      AND   $FC2C,Y
089DD: 99 2C FC      STA   $FC2C,Y
089E0: 60            RTS 
089E1: 44 26         BSR   $8A09
089E3: B9 4C FC      LDA   $FC4C,Y
089E6: 1D 04 40      ORA   $4004,X
089E9: 99 4C FC      STA   $FC4C,Y
089EC: 60            RTS 
089ED: 44 1A         BSR   $8A09
089EF: BD 04 40      LDA   $4004,X
089F2: 49 FF         EOR   #$FF
089F4: 39 4C FC      AND   $FC4C,Y
089F7: 99 4C FC      STA   $FC4C,Y
089FA: 60            RTS 
089FB: 44 0C         BSR   $8A09
089FD: B9 4C FC      LDA   $FC4C,Y
08A00: 3D 04 40      AND   $4004,X
08A03: F0 02         BEQ   $8A07
08A05: 38            SEC 
08A06: 60            RTS 
08A07: 18            CLC 
08A08: 60            RTS 
08A09: AA            TAX 
08A0A: 29 07         AND   #$07
08A0C: 22            SAX 
08A0D: 4A            LSR 
08A0E: 4A            LSR 
08A0F: 4A            LSR 
08A10: A8            TAY 
08A11: 60            RTS 
08A12: A2 1F         LDX   #$1F
08A14: 9E 2C FC      STZ   $FC2C,X
08A17: CA            DEX 
08A18: 10 FA         BPL   $8A14
08A1A: 9C 4C FC      STZ   $FC4C
08A1D: 60            RTS 
08A1E: 10 3C         BPL   $8A5C
08A20: 8A            TXA 
08A21: 12 73         ORA   ($73)
08A23: 8A            TXA 
08A24: 13 FE         ST1   #$FE
08A26: 42            SAY 
08A27: 11 31         ORA   ($31),Y
08A29: 8A            TXA 
08A2A: 14 81         TRB   $81
08A2C: 8A            TXA 
08A2D: 15 D0         ORA   $D0,X
08A2F: 8A            TXA 
08A30: FF A9 02      BBS7  $A9, $8A35
08A33: A2 FF         LDX   #$FF
08A35: 20 FE 42      JSR   $42FE
08A38: 20 9E 42      JSR   $429E
08A3B: 60            RTS 
08A3C: 8D 68 8A      STA   $8A68
08A3F: AD 1B F8      LDA   $F81B
08A42: 8D D1 2E      STA   $2ED1
08A45: AD 1C F8      LDA   $F81C
08A48: 8D D2 2E      STA   $2ED2
08A4B: A5 08         LDA   $08
08A4D: 8D 58 8A      STA   $8A58
08A50: A5 09         LDA   $09
08A52: 8D 5A 8A      STA   $8A5A
08A55: 44 DA         BSR   $8A31
08A57: A2 00         LDX   #$00
08A59: A0 00         LDY   #$00
08A5B: D7 2C         SMB5  $2C
08A5D: 20 EA 41      JSR   $41EA
08A60: A9 01         LDA   #$01
08A62: A2 FF         LDX   #$FF
08A64: 20 FE 42      JSR   $42FE
08A67: A9 00         LDA   #$00
08A69: A2 FF         LDX   #$FF
08A6B: 20 FE 42      JSR   $42FE
08A6E: 57 2C         RMB5  $2C
08A70: 4C 90 49      JMP   $4990
08A73: A9 19         LDA   #$19
08A75: AE D1 2E      LDX   $2ED1
08A78: 86 08         STX   $08
08A7A: AE D2 2E      LDX   $2ED2
08A7D: 86 09         STX   $09
08A7F: 80 BB         BRA   $8A3C
08A81: DA            PHX 
08A82: 48            PHA 
08A83: A9 A7         LDA   #$A7
08A85: 85 FE         STA   $FE
08A87: A9 8A         LDA   #$8A
08A89: 85 FF         STA   $FF
08A8B: A5 44         LDA   $44
08A8D: 85 FC         STA   $FC
08A8F: A9 3C         LDA   #$3C
08A91: 20 30 49      JSR   $4930
08A94: 68            PLA 
08A95: 9D BD F4      STA   $F4BD,X
08A98: 68            PLA 
08A99: C9 FF         CMP   #$FF
08A9B: D0 03         BNE   $8AA0
08A9D: AD 1D F8      LDA   $F81D
08AA0: 9D 43 F4      STA   $F443,X
08AA3: 9E C9 F3      STZ   $F3C9,X
08AA6: 60            RTS 
08AA7: FF 2C 23      BBS7  $2C, $8ACD
08AAA: BD C9 F3      LDA   $F3C9,X
08AAD: F0 14         BEQ   $8AC3
08AAF: 85 FF         STA   $FF
08AB1: 9E C9 F3      STZ   $F3C9,X
08AB4: BD 4F F3      LDA   $F34F,X
08AB7: 85 FE         STA   $FE
08AB9: BC 43 F4      LDY   $F443,X
08ABC: 02            SXY 
08ABD: 20 76 43      JSR   $4376
08AC0: 4C A8 48      JMP   $48A8
08AC3: BD BD F4      LDA   $F4BD,X
08AC6: BC 43 F4      LDY   $F443,X
08AC9: 02            SXY 
08ACA: 20 FE 42      JSR   $42FE
08ACD: 4C A8 48      JMP   $48A8
08AD0: A4 2F         LDY   $2F
08AD2: 99 37 F5      STA   $F537,Y
08AD5: 68            PLA 
08AD6: 68            PLA 
08AD7: 68            PLA 
08AD8: 68            PLA 
08AD9: 18            CLC 
08ADA: 69 01         ADC   #$01
08ADC: 99 4F F3      STA   $F34F,Y
08ADF: 68            PLA 
08AE0: 69 00         ADC   #$00
08AE2: 99 C9 F3      STA   $F3C9,Y
08AE5: 60            RTS 
08AE6: 15 0D         ORA   $0D,X
08AE8: 8B            ??? 
08AE9: 10 F9         BPL   $8AE4
08AEB: 8A            TXA 
08AEC: 11 FF         ORA   ($FF),Y
08AEE: 8A            TXA 
08AEF: 12 0A         ORA   ($0A)
08AF1: 8B            ??? 
08AF2: 13 AD         ST1   #$AD
08AF4: 49 14         EOR   #$14
08AF6: C0 4A         CPY   #$4A
08AF8: FF AE 1D      BBS7  $AE, $8B18
08AFB: F8            SED 
08AFC: 20 B7 42      JSR   $42B7
08AFF: AD D4 2C      LDA   $2CD4
08B02: 85 FC         STA   $FC
08B04: A9 3C         LDA   #$3C
08B06: 20 30 49      JSR   $4930
08B09: 60            RTS 
08B0A: 4C 90 49      JMP   $4990
08B0D: A6 2F         LDX   $2F
08B0F: 9D 37 F5      STA   $F537,X
08B12: 20 40 4B      JSR   $4B40
08B15: 20 C0 4A      JSR   $4AC0
08B18: 20 7A 4B      JSR   $4B7A
08B1B: 60            RTS 
08B1C: 10 29         BPL   $8B47
08B1E: 8B            ??? 
08B1F: 11 53         ORA   ($53),Y
08B21: 8B            ??? 
08B22: 12 5E         ORA   ($5E)
08B24: 8B            ??? 
08B25: 13 7B         ST1   #$7B
08B27: 8B            ??? 
08B28: FF AA AD      BBS7  $AA, $8AD8
08B2B: 88            DEY 
08B2C: 2C C9 FF      BIT   $FFC9
08B2F: F0 1C         BEQ   $8B4D
08B31: 20 21 38      JSR   $3821 ; Seek to a compressed block (A=bank,X=block#)
08B34: 20 24 38      JSR   $3824 ; Begin decompression of block at AXY
08B37: 20 2A 38      JSR   $382A ; Decompress a byte
08B3A: 85 FC         STA   $FC
08B3C: 20 2A 38      JSR   $382A ; Decompress a byte
08B3F: 85 FD         STA   $FD
08B41: 20 2A 38      JSR   $382A ; Decompress a byte
08B44: 85 FE         STA   $FE
08B46: 20 5A 4F      JSR   $4F5A
08B49: 20 95 4F      JSR   $4F95
08B4C: 60            RTS 
08B4D: 8A            TXA 
08B4E: 20 DC 9B      JSR   $9BDC
08B51: 80 E4         BRA   $8B37
08B53: AA            TAX 
08B54: AD 88 2C      LDA   $2C88
08B57: 20 68 4F      JSR   $4F68
08B5A: 20 93 4F      JSR   $4F93
08B5D: 60            RTS 
08B5E: 86 18         STX   $18
08B60: 98            TYA 
08B61: 64 19         STZ   $19
08B63: 0A            ASL 
08B64: 0A            ASL 
08B65: 26 19         ROL   $19
08B67: 0A            ASL 
08B68: 26 19         ROL   $19
08B6A: 0A            ASL 
08B6B: 26 19         ROL   $19
08B6D: 0A            ASL 
08B6E: 26 19         ROL   $19
08B70: 05 18         ORA   $18
08B72: 8D BB 8B      STA   $8BBB
08B75: A5 19         LDA   $19
08B77: 8D BC 8B      STA   $8BBC
08B7A: 60            RTS 
08B7B: 48            PHA 
08B7C: 5A            PHY 
08B7D: 8A            TXA 
08B7E: 20 72 8C      JSR   $8C72
08B81: 68            PLA 
08B82: 20 8F 8C      JSR   $8C8F
08B85: FA            PLX 
08B86: E0 C0         CPX   #$C0
08B88: B0 29         BCS   $8BB3
08B8A: AD 88 2C      LDA   $2C88
08B8D: C9 FF         CMP   #$FF
08B8F: F0 22         BEQ   $8BB3
08B91: 20 21 38      JSR   $3821 ; Seek to a compressed block (A=bank,X=block#)
08B94: 20 24 38      JSR   $3824 ; Begin decompression of block at AXY
08B97: 20 2A 38      JSR   $382A ; Decompress a byte
08B9A: 85 FA         STA   $FA
08B9C: 20 2A 38      JSR   $382A ; Decompress a byte
08B9F: 85 FB         STA   $FB
08BA1: A9 20         LDA   #$20
08BA3: 85 FE         STA   $FE
08BA5: AD BB 8B      LDA   $8BBB
08BA8: 85 F8         STA   $F8
08BAA: AD BC 8B      LDA   $8BBC
08BAD: 85 F9         STA   $F9
08BAF: 20 81 4F      JSR   $4F81
08BB2: 60            RTS 
08BB3: 8A            TXA 
08BB4: 29 7F         AND   #$7F
08BB6: 20 DC 9B      JSR   $9BDC
08BB9: 80 DC         BRA   $8B97
08BBB: 80 00         BRA   $8BBD
08BBD: 15 32         ORA   $32,X
08BBF: 8C 16 4A      STY   $4A16
08BC2: 8C 17 F6      STY   $F617
08BC5: 4D 10 D9      EOR   $D910
08BC8: 8B            ??? 
08BC9: 11 D6         ORA   ($D6),Y
08BCB: 8B            ??? 
08BCC: 12 09         ORA   ($09)
08BCE: 8C 13 14      STY   $1413
08BD1: 8C 14 0B      STY   $0B14
08BD4: 4E FF A2      LSR   $A2FF
08BD7: 01 89         ORA   ($89,X)
08BD9: 82            CLX 
08BDA: 8E FB 8B      STX   $8BFB
08BDD: AA            TAX 
08BDE: AD 88 2C      LDA   $2C88
08BE1: C9 FF         CMP   #$FF
08BE3: F0 1E         BEQ   $8C03
08BE5: 20 21 38      JSR   $3821 ; Seek to a compressed block (A=bank,X=block#)
08BE8: 20 24 38      JSR   $3824 ; Begin decompression of block at AXY
08BEB: 20 2A 38      JSR   $382A ; Decompress a byte
08BEE: 85 FC         STA   $FC
08BF0: 20 2A 38      JSR   $382A ; Decompress a byte
08BF3: 85 FD         STA   $FD
08BF5: 20 2A 38      JSR   $382A ; Decompress a byte
08BF8: 85 FE         STA   $FE
08BFA: A2 00         LDX   #$00
08BFC: 20 61 4F      JSR   $4F61
08BFF: 20 95 4F      JSR   $4F95
08C02: 60            RTS 
08C03: 8A            TXA 
08C04: 20 DC 9B      JSR   $9BDC
08C07: 80 E2         BRA   $8BEB
08C09: AA            TAX 
08C0A: AD 88 2C      LDA   $2C88
08C0D: 20 71 4F      JSR   $4F71
08C10: 20 93 4F      JSR   $4F93
08C13: 60            RTS 
08C14: 86 FB         STX   $FB
08C16: AA            TAX 
08C17: AD 88 2C      LDA   $2C88
08C1A: 20 21 38      JSR   $3821 ; Seek to a compressed block (A=bank,X=block#)
08C1D: 86 F8         STX   $F8
08C1F: 84 F9         STY   $F9
08C21: 85 FA         STA   $FA
08C23: 20 AD 4D      JSR   $4DAD
08C26: A5 08         LDA   $08
08C28: 9D 11 EE      STA   $EE11,X
08C2B: A5 09         LDA   $09
08C2D: 9D 8B EE      STA   $EE8B,X
08C30: 8A            TXA 
08C31: 60            RTS 
08C32: 64 19         STZ   $19
08C34: C9 80         CMP   #$80
08C36: 90 02         BCC   $8C3A
08C38: C6 19         DEC   $19
08C3A: 18            CLC 
08C3B: 7D 05 EF      ADC   $EF05,X
08C3E: 9D 05 EF      STA   $EF05,X
08C41: A5 19         LDA   $19
08C43: 7D 7F EF      ADC   $EF7F,X
08C46: 9D 7F EF      STA   $EF7F,X
08C49: 60            RTS 
08C4A: 64 19         STZ   $19
08C4C: C9 80         CMP   #$80
08C4E: 90 02         BCC   $8C52
08C50: C6 19         DEC   $19
08C52: 18            CLC 
08C53: 7D F9 EF      ADC   $EFF9,X
08C56: 9D F9 EF      STA   $EFF9,X
08C59: A5 19         LDA   $19
08C5B: 7D 73 F0      ADC   $F073,X
08C5E: 9D 73 F0      STA   $F073,X
08C61: 60            RTS 
08C62: 10 95         BPL   $8BF9
08C64: 4F 11 93      BBR4  $11, $8BFA
08C67: 4F 12 EF      BBR4  $12, $8C59
08C6A: 4F 13 72      BBR4  $13, $8CDF
08C6D: 8C 14 8F      STY   $8F14
08C70: 8C FF A8      STY   $A8FF
08C73: BE 15 F7      LDX   $F715,Y
08C76: B9 35 F7      LDA   $F735,Y
08C79: 29 7F         AND   #$7F
08C7B: 85 18         STA   $18
08C7D: 85 19         STA   $19
08C7F: C2            CLY 
08C80: BD 55 F7      LDA   $F755,X
08C83: 99 71 F6      STA   $F671,Y
08C86: E8            INX 
08C87: C8            INY 
08C88: C6 18         DEC   $18
08C8A: D0 F4         BNE   $8C80
08C8C: A5 19         LDA   $19
08C8E: 60            RTS 
08C8F: A8            TAY 
08C90: BE 15 F7      LDX   $F715,Y
08C93: B9 35 F7      LDA   $F735,Y
08C96: 29 1F         AND   #$1F
08C98: 85 18         STA   $18
08C9A: 85 19         STA   $19
08C9C: C2            CLY 
08C9D: BD 55 F7      LDA   $F755,X
08CA0: 99 F1 F6      STA   $F6F1,Y
08CA3: E8            INX 
08CA4: C8            INY 
08CA5: C6 18         DEC   $18
08CA7: D0 F4         BNE   $8C9D
08CA9: A5 19         LDA   $19
08CAB: 60            RTS 
08CAC: 16 24         ASL   $24,X
08CAE: 4D 1B 04      EOR   $041B
08CB1: 8D 1E 13      STA   $131E
08CB4: 8D 1C 0A      STA   $0A1C
08CB7: 8D 17 1E      STA   $1E17
08CBA: 4C 18 14      JMP   $1418
08CBD: 4C 19 0E      JMP   $0E19
08CC0: 4C 1A 08      JMP   $081A
08CC3: 4C 10 B4      JMP   $B410
08CC6: 4C 11 B7      JMP   $B711
08CC9: 4C 12 BB      JMP   $BB12
08CCC: 4C 13 BF      JMP   $BF13
08CCF: 4C 14 DA      JMP   $DA14
08CD2: 8C 15 DE      STY   $DE15
08CD5: 8C 1D 2B      STY   $2B1D
08CD8: 4C FF 64      JMP   $64FF
08CDB: FB            ??? 
08CDC: 80 04         BRA   $8CE2
08CDE: 64 FB         STZ   $FB
08CE0: E6 FB         INC   $FB
08CE2: 48            PHA 
08CE3: 5A            PHY 
08CE4: AD 88 2C      LDA   $2C88
08CE7: 20 21 38      JSR   $3821 ; Seek to a compressed block (A=bank,X=block#)
08CEA: E8            INX 
08CEB: E8            INX 
08CEC: E8            INX 
08CED: E0 03         CPX   #$03
08CEF: B0 01         BCS   $8CF2
08CF1: C8            INY 
08CF2: 86 F8         STX   $F8
08CF4: 84 F9         STY   $F9
08CF6: 85 FA         STA   $FA
08CF8: 7A            PLY 
08CF9: 68            PLA 
08CFA: A6 FB         LDX   $FB
08CFC: F0 03         BEQ   $8D01
08CFE: 4C D4 4C      JMP   $4CD4
08D01: 4C D7 4C      JMP   $4CD7
08D04: AD 88 2C      LDA   $2C88
08D07: 4C 7A 4F      JMP   $4F7A
08D0A: BD D5 2E      LDA   $2ED5,X
08D0D: 49 08         EOR   #$08
08D0F: 9D D5 2E      STA   $2ED5,X
08D12: 60            RTS 
08D13: 86 4B         STX   $4B
08D15: 84 4D         STY   $4D
08D17: 4C 31 4C      JMP   $4C31
08D1A: FF FF FF      BBS7  $FF, $8D1C
08D1D: 10 4E         BPL   $8D6D
08D1F: 46 11         LSR   $11
08D21: A4 46         LDY   $46
08D23: 12 BA         ORA   ($BA)
08D25: 46 13         LSR   $13
08D27: EF 45 14      BBS6  $45, $8D3E
08D2A: F4            SET 
08D2B: 45 FF         EOR   $FF
08D2D: 10 5C         BPL   $8D8B
08D2F: 8D 13 AF      STA   $AF13
08D32: 90 14         BCC   $8D48
08D34: AF 90 11      BBS2  $90, $8D48
08D37: 56 8D         LSR   $8D,X
08D39: 12 4E         ORA   ($4E)
08D3B: 8D 15 73      STA   $7315
08D3E: 8E 16 46      STX   $4616
08D41: 8D 17 4A      STA   $4A17
08D44: 8D FF 8D      STA   $8DFF
08D47: 2B            ??? 
08D48: 8E 60 8D      STX   $8D60
08D4B: 68            PLA 
08D4C: 8D 60 64      STA   $6460
08D4F: 54            ??? 
08D50: F7 54         SMB7  $54
08D52: E7 54         SMB6  $54
08D54: 80 08         BRA   $8D5E
08D56: 64 54         STZ   $54
08D58: E7 54         SMB6  $54
08D5A: 80 02         BRA   $8D5E
08D5C: 64 54         STZ   $54
08D5E: 85 56         STA   $56
08D60: DA            PHX 
08D61: 5A            PHY 
08D62: 64 58         STZ   $58
08D64: AD 1A F8      LDA   $F81A
08D67: A2 01         LDX   #$01
08D69: 20 21 38      JSR   $3821 ; Seek to a compressed block (A=bank,X=block#)
08D6C: 20 24 38      JSR   $3824 ; Begin decompression of block at AXY
08D6F: A5 56         LDA   $56
08D71: F0 1C         BEQ   $8D8F
08D73: 20 17 8E      JSR   $8E17
08D76: 20 2A 38      JSR   $382A ; Decompress a byte
08D79: C9 80         CMP   #$80
08D7B: 90 03         BCC   $8D80
08D7D: 20 2A 38      JSR   $382A ; Decompress a byte
08D80: C9 00         CMP   #$00
08D82: D0 F2         BNE   $8D76
08D84: 20 2A 38      JSR   $382A ; Decompress a byte
08D87: C9 00         CMP   #$00
08D89: F0 E8         BEQ   $8D73
08D8B: C6 56         DEC   $56
08D8D: 80 E0         BRA   $8D6F
08D8F: EF 54 03      BBS6  $54, $8D95
08D92: 20 77 50      JSR   $5077
08D95: 64 56         STZ   $56
08D97: 64 5A         STZ   $5A
08D99: 9C 00 ED      STZ   $ED00
08D9C: A9 3F         LDA   #$3F
08D9E: 14 54         TRB   $54
08DA0: 20 2A 8F      JSR   $8F2A
08DA3: 44 72         BSR   $8E17
08DA5: A5 FB         LDA   $FB
08DA7: 38            SEC 
08DA8: E9 02         SBC   #$02
08DAA: 20 B5 50      JSR   $50B5
08DAD: 20 BA 5F      JSR   $5FBA
08DB0: E6 5A         INC   $5A
08DB2: 20 7F 8E      JSR   $8E7F
08DB5: 1F 54 15      BBR1  $54, $8DCD
08DB8: A9 01         LDA   #$01
08DBA: 85 F9         STA   $F9
08DBC: 85 FB         STA   $FB
08DBE: A9 FF         LDA   #$FF
08DC0: 85 F8         STA   $F8
08DC2: 85 FA         STA   $FA
08DC4: 64 FC         STZ   $FC
08DC6: 20 0D 51      JSR   $510D
08DC9: 85 56         STA   $56
08DCB: 80 19         BRA   $8DE6
08DCD: 57 54         RMB5  $54
08DCF: CF 54 14      BBS4  $54, $8DE6
08DD2: FF 54 11      BBS7  $54, $8DE6
08DD5: 20 40 4B      JSR   $4B40
08DD8: 20 C0 4A      JSR   $4AC0
08DDB: 20 93 90      JSR   $9093
08DDE: B0 03         BCS   $8DE3
08DE0: 4C A8 48      JMP   $48A8
08DE3: 20 7A 4B      JSR   $4B7A
08DE6: BF 54 05      BBS3  $54, $8DEE
08DE9: FF 54 02      BBS7  $54, $8DEE
08DEC: 44 1D         BSR   $8E0B
08DEE: 20 52 8E      JSR   $8E52
08DF1: C9 00         CMP   #$00
08DF3: F0 A4         BEQ   $8D99
08DF5: FF 54 0B      BBS7  $54, $8E03
08DF8: BF 54 08      BBS3  $54, $8E03
08DFB: 44 0E         BSR   $8E0B
08DFD: EF 54 03      BBS6  $54, $8E03
08E00: 20 99 50      JSR   $5099
08E03: 9C 2B 8E      STZ   $8E2B
08E06: A5 56         LDA   $56
08E08: 7A            PLY 
08E09: FA            PLX 
08E0A: 60            RTS 
08E0B: A5 5A         LDA   $5A
08E0D: F0 07         BEQ   $8E16
08E0F: 20 C1 5F      JSR   $5FC1
08E12: C6 5A         DEC   $5A
08E14: D0 F9         BNE   $8E0F
08E16: 60            RTS 
08E17: 44 39         BSR   $8E52
08E19: 85 F8         STA   $F8
08E1B: 44 38         BSR   $8E55
08E1D: 85 F9         STA   $F9
08E1F: 8D 54 8F      STA   $8F54
08E22: 44 31         BSR   $8E55
08E24: 85 FA         STA   $FA
08E26: 44 2D         BSR   $8E55
08E28: 85 FB         STA   $FB
08E2A: A9 00         LDA   #$00
08E2C: 4A            LSR 
08E2D: 4A            LSR 
08E2E: 29 03         AND   #$03
08E30: F0 0C         BEQ   $8E3E
08E32: 64 F8         STZ   $F8
08E34: 3A            DEC 
08E35: F0 07         BEQ   $8E3E
08E37: A9 1C         LDA   #$1C
08E39: 38            SEC 
08E3A: E5 F9         SBC   $F9
08E3C: 85 F8         STA   $F8
08E3E: AD 2B 8E      LDA   $8E2B
08E41: 29 03         AND   #$03
08E43: F0 0C         BEQ   $8E51
08E45: 64 FA         STZ   $FA
08E47: 3A            DEC 
08E48: F0 07         BEQ   $8E51
08E4A: A9 10         LDA   #$10
08E4C: 38            SEC 
08E4D: E5 FB         SBC   $FB
08E4F: 85 FA         STA   $FA
08E51: 60            RTS 
08E52: 20 27 38      JSR   $3827
08E55: A5 58         LDA   $58
08E57: F0 17         BEQ   $8E70
08E59: 29 1F         AND   #$1F
08E5B: 09 A0         ORA   #$A0
08E5D: 85 F9         STA   $F9
08E5F: A5 57         LDA   $57
08E61: 85 F8         STA   $F8
08E63: A5 59         LDA   $59
08E65: 53 20         TAM   #$20
08E67: B2 F8         LDA   ($F8)
08E69: E6 57         INC   $57
08E6B: D0 02         BNE   $8E6F
08E6D: E6 58         INC   $58
08E6F: 60            RTS 
08E70: 4C 2A 38      JMP   $382A ; Decompress a byte
08E73: A5 F8         LDA   $F8
08E75: 85 57         STA   $57
08E77: A5 F9         LDA   $F9
08E79: 85 58         STA   $58
08E7B: A5 FA         LDA   $FA
08E7D: 85 59         STA   $59
08E7F: 64 55         STZ   $55
08E81: 8F 54 08      BBS0  $54, $8E8C
08E84: AC 4D FC      LDY   $FC4D
08E87: B9 C4 8E      LDA   $8EC4,Y
08E8A: 85 55         STA   $55
08E8C: C2            CLY 
08E8D: 44 C3         BSR   $8E52
08E8F: 99 00 EC      STA   $EC00,Y
08E92: C8            INY 
08E93: C9 80         CMP   #$80
08E95: B0 12         BCS   $8EA9
08E97: C9 18         CMP   #$18
08E99: 90 0A         BCC   $8EA5
08E9B: AF 54 11      BBS2  $54, $8EAF
08E9E: 09 80         ORA   #$80
08EA0: 99 FF EB      STA   $EBFF,Y
08EA3: 80 0A         BRA   $8EAF
08EA5: 44 41         BSR   $8EE8
08EA7: 80 18         BRA   $8EC1
08EA9: 44 AA         BSR   $8E55
08EAB: 99 00 EC      STA   $EC00,Y
08EAE: C8            INY 
08EAF: 44 30         BSR   $8EE1
08EB1: A5 55         LDA   $55
08EB3: F0 0A         BEQ   $8EBF
08EB5: 80 08         BRA   $8EBF
08EB7: A9 0B         LDA   #$0B
08EB9: 20 36 38      JSR   $3836
08EBC: 83 13 15      TST   $13, $15
08EBF: 44 06         BSR   $8EC7
08EC1: 4C 7F 8E      JMP   $8E7F
08EC4: 00            BRK 
08EC5: 02            SXY 
08EC6: 05 A5         ORA   $A5
08EC8: 55 F0         EOR   $F0,X
08ECA: 15 20         ORA   $20,X
08ECC: 40            RTI 
08ECD: 4B            ??? 
08ECE: 20 C0 4A      JSR   $4AC0
08ED1: 20 93 90      JSR   $9093
08ED4: B0 07         BCS   $8EDD
08ED6: C6 55         DEC   $55
08ED8: F0 03         BEQ   $8EDD
08EDA: 4C A8 48      JMP   $48A8
08EDD: 20 7A 4B      JSR   $4B7A
08EE0: 60            RTS 
08EE1: 62            CLA 
08EE2: 20 8E 90      JSR   $908E
08EE5: 4C 06 51      JMP   $5106
08EE8: 88            DEY 
08EE9: 0A            ASL 
08EEA: AA            TAX 
08EEB: 7C EE 8E      JMP   ($8EEE,X)
08EEE: 3E 8F 69      ROL   $698F,X
08EF1: 90 71         BCC   $8F64
08EF3: 90 75         BCC   $8F6A
08EF5: 90 79         BCC   $8F70
08EF7: 90 7D         BCC   $8F76
08EF9: 90 81         BCC   $8E7C
08EFB: 90 52         BCC   $8F4F
08EFD: 90 5F         BCC   $8F5E
08EFF: 90 97         BCC   $8E98
08F01: 8F D8 8F      BBS0  $D8, $8E93
08F04: 46 90         LSR   $90
08F06: 3B            ??? 
08F07: 8F 65 90      BBS0  $65, $8E9A
08F0A: 41 8F         EOR   ($8F,X)
08F0C: 00            BRK 
08F0D: 00            BRK 
08F0E: 38            SEC 
08F0F: 8F 35 8F      BBS0  $35, $8EA1
08F12: 30 8F         BMI   $8EA3
08F14: 24 8F         BIT   $8F
08F16: 2A            ROL 
08F17: 8F 1E 8F      BBS0  $1E, $8EA9
08F1A: 21 8F         AND   ($8F,X)
08F1C: 2F 90 A7      BBR2  $90, $8EC6
08F1F: 54            ??? 
08F20: 60            RTS 
08F21: 27 54         RMB2  $54
08F23: 60            RTS 
08F24: A9 89         LDA   #$89
08F26: 8D B5 8E      STA   $8EB5
08F29: 60            RTS 
08F2A: A9 80         LDA   #$80
08F2C: 8D B5 8E      STA   $8EB5
08F2F: 60            RTS 
08F30: 44 F2         BSR   $8F24
08F32: D7 54         SMB5  $54
08F34: 60            RTS 
08F35: C7 54         SMB4  $54
08F37: 60            RTS 
08F38: B7 54         SMB3  $54
08F3A: 60            RTS 
08F3B: 87 54         SMB0  $54
08F3D: 60            RTS 
08F3E: 68            PLA 
08F3F: 68            PLA 
08F40: 60            RTS 
08F41: 44 61         BSR   $8FA4
08F43: 44 75         BSR   $8FBA
08F45: 44 29         BSR   $8F70
08F47: 20 CA 8F      JSR   $8FCA
08F4A: A5 08         LDA   $08
08F4C: 4A            LSR 
08F4D: AA            TAX 
08F4E: BD 62 8F      LDA   $8F62,X
08F51: 85 F8         STA   $F8
08F53: A9 00         LDA   #$00
08F55: 38            SEC 
08F56: E5 F8         SBC   $F8
08F58: 4A            LSR 
08F59: AA            TAX 
08F5A: A0 FF         LDY   #$FF
08F5C: 20 EF 50      JSR   $50EF
08F5F: 4C C7 8E      JMP   $8EC7
08F62: 00            BRK 
08F63: 01 02         ORA   ($02,X)
08F65: 04 05         TSB   $05
08F67: 07 08         RMB0  $08
08F69: 0A            ASL 
08F6A: 0B            ??? 
08F6B: 0D 0E 10      ORA   $100E
08F6E: 11 13         ORA   ($13),Y
08F70: 64 08         STZ   $08
08F72: 84 09         STY   $09
08F74: 80 09         BRA   $8F7F
08F76: A4 09         LDY   $09
08F78: 99 00 EC      STA   $EC00,Y
08F7B: E6 08         INC   $08
08F7D: E6 09         INC   $09
08F7F: 20 55 8E      JSR   $8E55
08F82: C9 17         CMP   #$17
08F84: D0 0C         BNE   $8F92
08F86: 44 1C         BSR   $8FA4
08F88: 20 37 90      JSR   $9037
08F8B: 44 F2         BSR   $8F7F
08F8D: 20 CA 8F      JSR   $8FCA
08F90: 80 ED         BRA   $8F7F
08F92: C9 00         CMP   #$00
08F94: D0 E0         BNE   $8F76
08F96: 60            RTS 
08F97: 44 0B         BSR   $8FA4
08F99: 44 1F         BSR   $8FBA
08F9B: 20 7F 8E      JSR   $8E7F
08F9E: 20 CA 8F      JSR   $8FCA
08FA1: 4C C7 8E      JMP   $8EC7
08FA4: 20 55 8E      JSR   $8E55
08FA7: 3A            DEC 
08FA8: 85 F8         STA   $F8
08FAA: FA            PLX 
08FAB: 7A            PLY 
08FAC: A5 57         LDA   $57
08FAE: 48            PHA 
08FAF: A5 58         LDA   $58
08FB1: 48            PHA 
08FB2: A5 59         LDA   $59
08FB4: 48            PHA 
08FB5: 5A            PHY 
08FB6: DA            PHX 
08FB7: A6 F8         LDX   $F8
08FB9: 60            RTS 
08FBA: BD BF FC      LDA   $FCBF,X
08FBD: 85 57         STA   $57
08FBF: BD CE FC      LDA   $FCCE,X
08FC2: 85 58         STA   $58
08FC4: BD DD FC      LDA   $FCDD,X
08FC7: 85 59         STA   $59
08FC9: 60            RTS 
08FCA: FA            PLX 
08FCB: 7A            PLY 
08FCC: 68            PLA 
08FCD: 85 59         STA   $59
08FCF: 68            PLA 
08FD0: 85 58         STA   $58
08FD2: 68            PLA 
08FD3: 85 57         STA   $57
08FD5: 5A            PHY 
08FD6: DA            PHX 
08FD7: 60            RTS 
08FD8: 44 CA         BSR   $8FA4
08FDA: A9 EC         LDA   #$EC
08FDC: 85 06         STA   $06
08FDE: 85 57         STA   $57
08FE0: A9 FC         LDA   #$FC
08FE2: 85 07         STA   $07
08FE4: 85 58         STA   $58
08FE6: BD BF FC      LDA   $FCBF,X
08FE9: 85 04         STA   $04
08FEB: BD CE FC      LDA   $FCCE,X
08FEE: 85 05         STA   $05
08FF0: C2            CLY 
08FF1: B1 04         LDA   ($04),Y
08FF3: 85 F8         STA   $F8
08FF5: C8            INY 
08FF6: BD DD FC      LDA   $FCDD,X
08FF9: AA            TAX 
08FFA: 29 30         AND   #$30
08FFC: 4A            LSR 
08FFD: 4A            LSR 
08FFE: 4A            LSR 
08FFF: 22            SAX 
09000: 20 0A 90      JSR   $900A
09003: 43 80         TMA   #$80
09005: 85 59         STA   $59
09007: 4C 9B 8F      JMP   $8F9B
0900A: 7C 0D 90      JMP   ($900D,X)
0900D: 13 90         ST1   #$90
0900F: 18            CLC 
09010: 90 21         BCC   $9033
09012: 90 64         BCC   $9078
09014: F9 4C DE      SBC   $DE4C,Y
09017: 90 48         BCC   $9061
09019: B1 04         LDA   ($04),Y
0901B: 85 F9         STA   $F9
0901D: 68            PLA 
0901E: 4C DE 90      JMP   $90DE
09021: 48            PHA 
09022: B1 04         LDA   ($04),Y
09024: 85 F9         STA   $F9
09026: C8            INY 
09027: B1 04         LDA   ($04),Y
09029: 85 FA         STA   $FA
0902B: 68            PLA 
0902C: 4C 24 91      JMP   $9124
0902F: 20 A4 8F      JSR   $8FA4
09032: 44 03         BSR   $9037
09034: 4C 9B 8F      JMP   $8F9B
09037: BD 36 E7      LDA   $E736,X
0903A: 85 57         STA   $57
0903C: BD 5B E7      LDA   $E75B,X
0903F: 85 58         STA   $58
09041: 43 80         TMA   #$80
09043: 85 59         STA   $59
09045: 60            RTS 
09046: 20 55 8E      JSR   $8E55
09049: 3A            DEC 
0904A: 85 55         STA   $55
0904C: 8F 54 0A      BBS0  $54, $9059
0904F: 4C C7 8E      JMP   $8EC7
09052: 8F 54 04      BBS0  $54, $9059
09055: A9 0A         LDA   #$0A
09057: 80 01         BRA   $905A
09059: 62            CLA 
0905A: 85 55         STA   $55
0905C: 4C C7 8E      JMP   $8EC7
0905F: 97 54         SMB1  $54
09061: A9 3F         LDA   #$3F
09063: 80 1E         BRA   $9083
09065: A9 45         LDA   #$45
09067: 80 1A         BRA   $9083
09069: A9 4E         LDA   #$4E
0906B: 44 1B         BSR   $9088
0906D: A9 4E         LDA   #$4E
0906F: 80 12         BRA   $9083
09071: A9 4C         LDA   #$4C
09073: 80 0E         BRA   $9083
09075: A9 30         LDA   #$30
09077: 80 0A         BRA   $9083
09079: A9 31         LDA   #$31
0907B: 80 06         BRA   $9083
0907D: A9 32         LDA   #$32
0907F: 80 02         BRA   $9083
09081: A9 33         LDA   #$33
09083: 44 03         BSR   $9088
09085: 4C E1 8E      JMP   $8EE1
09088: 48            PHA 
09089: A9 40         LDA   #$40
0908B: 44 01         BSR   $908E
0908D: 68            PLA 
0908E: 99 00 EC      STA   $EC00,Y
09091: C8            INY 
09092: 60            RTS 
09093: 18            CLC 
09094: DF 54 17      BBS5  $54, $90AE
09097: AD 2D 22      LDA   $222D
0909A: 89 03         BIT   #$03
0909C: F0 10         BEQ   $90AE
0909E: 64 56         STZ   $56
090A0: 89 02         BIT   #$02
090A2: F0 02         BEQ   $90A6
090A4: C6 56         DEC   $56
090A6: 87 54         SMB0  $54
090A8: 20 2A 8F      JSR   $8F2A
090AB: 64 55         STZ   $55
090AD: 38            SEC 
090AE: 60            RTS 
090AF: DA            PHX 
090B0: AA            TAX 
090B1: A5 F8         LDA   $F8
090B3: 9D BF FC      STA   $FCBF,X
090B6: A5 F9         LDA   $F9
090B8: 9D CE FC      STA   $FCCE,X
090BB: A5 FA         LDA   $FA
090BD: 9D DD FC      STA   $FCDD,X
090C0: FA            PLX 
090C1: 60            RTS 
090C2: 11 EE         ORA   ($EE),Y
090C4: 54            ??? 
090C5: 12 39         ORA   ($39)
090C7: 55 13         EOR   $13,X
090C9: 62            CLA 
090CA: 55 14         EOR   $14,X
090CC: 95 55         STA   $55,X
090CE: 10 C4         BPL   $9094
090D0: 91 18         STA   ($18),Y
090D2: 9A            TXS 
090D3: 55 16         EOR   $16,X
090D5: DE 90 17      DEC   $1790,X
090D8: 24 91         BIT   $91
090DA: 15 C3         ORA   $C3,X
090DC: 54            ??? 
090DD: FF 85 FC      BBS7  $85, $90DC
090E0: A0 04         LDY   #$04
090E2: 89 08         BIT   #$08
090E4: F0 08         BEQ   $90EE
090E6: 18            CLC 
090E7: 69 03         ADC   #$03
090E9: 85 FC         STA   $FC
090EB: 29 07         AND   #$07
090ED: A8            TAY 
090EE: 84 FD         STY   $FD
090F0: 82            CLX 
090F1: C2            CLY 
090F2: A9 2F         LDA   #$2F
090F4: 91 06         STA   ($06),Y
090F6: B1 06         LDA   ($06),Y
090F8: 1A            INC 
090F9: 91 06         STA   ($06),Y
090FB: A5 F8         LDA   $F8
090FD: 38            SEC 
090FE: FD AF 91      SBC   $91AF,X
09101: 85 F8         STA   $F8
09103: A5 F9         LDA   $F9
09105: FD B7 91      SBC   $91B7,X
09108: 85 F9         STA   $F9
0910A: B0 EA         BCS   $90F6
0910C: A5 F8         LDA   $F8
0910E: 18            CLC 
0910F: 7D AF 91      ADC   $91AF,X
09112: 85 F8         STA   $F8
09114: A5 F9         LDA   $F9
09116: 7D B7 91      ADC   $91B7,X
09119: 85 F9         STA   $F9
0911B: E8            INX 
0911C: C8            INY 
0911D: C0 05         CPY   #$05
0911F: D0 D1         BNE   $90F2
09121: 4C 69 91      JMP   $9169
09124: 85 FC         STA   $FC
09126: A9 07         LDA   #$07
09128: 85 FD         STA   $FD
0912A: 82            CLX 
0912B: C2            CLY 
0912C: A9 2F         LDA   #$2F
0912E: 91 06         STA   ($06),Y
09130: B1 06         LDA   ($06),Y
09132: 1A            INC 
09133: 91 06         STA   ($06),Y
09135: A5 F8         LDA   $F8
09137: 38            SEC 
09138: FD AC 91      SBC   $91AC,X
0913B: 85 F8         STA   $F8
0913D: A5 F9         LDA   $F9
0913F: FD B4 91      SBC   $91B4,X
09142: 85 F9         STA   $F9
09144: A5 FA         LDA   $FA
09146: FD BC 91      SBC   $91BC,X
09149: 85 FA         STA   $FA
0914B: B0 E3         BCS   $9130
0914D: A5 F8         LDA   $F8
0914F: 18            CLC 
09150: 7D AC 91      ADC   $91AC,X
09153: 85 F8         STA   $F8
09155: A5 F9         LDA   $F9
09157: 7D B4 91      ADC   $91B4,X
0915A: 85 F9         STA   $F9
0915C: A5 FA         LDA   $FA
0915E: 7D BC 91      ADC   $91BC,X
09161: 85 FA         STA   $FA
09163: E8            INX 
09164: C8            INY 
09165: C0 08         CPY   #$08
09167: D0 C3         BNE   $912C
09169: 62            CLA 
0916A: 91 06         STA   ($06),Y
0916C: 3F FC 0D      BBR3  $FC, $917C
0916F: A5 FC         LDA   $FC
09171: 29 07         AND   #$07
09173: AA            TAX 
09174: BC A4 91      LDY   $91A4,X
09177: 84 FD         STY   $FD
09179: 20 96 91      JSR   $9196
0917C: C2            CLY 
0917D: B1 06         LDA   ($06),Y
0917F: C9 30         CMP   #$30
09181: D0 0C         BNE   $918F
09183: EF FC 04      BBS6  $FC, $918A
09186: A9 20         LDA   #$20
09188: 91 06         STA   ($06),Y
0918A: C8            INY 
0918B: C4 FD         CPY   $FD
0918D: D0 EE         BNE   $917D
0918F: FF FC 03      BBS7  $FC, $9195
09192: 20 96 91      JSR   $9196
09195: 60            RTS 
09196: 82            CLX 
09197: B1 06         LDA   ($06),Y
09199: 02            SXY 
0919A: 91 06         STA   ($06),Y
0919C: C8            INY 
0919D: 02            SXY 
0919E: C8            INY 
0919F: C9 00         CMP   #$00
091A1: D0 F4         BNE   $9197
091A3: 60            RTS 
091A4: 07 06         RMB0  $06
091A6: 05 04         ORA   $04
091A8: 03 02         ST0   #$02
091AA: 01 00         ORA   ($00,X)
091AC: 80 40         BRA   $91EE
091AE: A0 10         LDY   #$10
091B0: E8            INX 
091B1: 64 0A         STZ   $0A
091B3: 01 96         ORA   ($96,X)
091B5: 42            SAY 
091B6: 86 27         STX   $27
091B8: 03 00         ST0   #$00
091BA: 00            BRK 
091BB: 00            BRK 
091BC: 98            TYA 
091BD: 0F 01 00      BBR0  $01, $91C0
091C0: 00            BRK 
091C1: 00            BRK 
091C2: 00            BRK 
091C3: 00            BRK 
091C4: 5A            PHY 
091C5: DA            PHX 
091C6: A5 F9         LDA   $F9
091C8: 49 80         EOR   #$80
091CA: 85 F9         STA   $F9
091CC: A5 FB         LDA   $FB
091CE: 49 80         EOR   #$80
091D0: 85 FB         STA   $FB
091D2: A5 FD         LDA   $FD
091D4: 49 80         EOR   #$80
091D6: 85 FD         STA   $FD
091D8: A5 FF         LDA   $FF
091DA: 49 80         EOR   #$80
091DC: 85 FF         STA   $FF
091DE: 64 0C         STZ   $0C
091E0: A5 F8         LDA   $F8
091E2: 38            SEC 
091E3: E5 FC         SBC   $FC
091E5: 85 08         STA   $08
091E7: A5 F9         LDA   $F9
091E9: E5 FD         SBC   $FD
091EB: 30 02         BMI   $91EF
091ED: B0 10         BCS   $91FF
091EF: 48            PHA 
091F0: 87 0C         SMB0  $0C
091F2: A5 08         LDA   $08
091F4: 49 FF         EOR   #$FF
091F6: 69 01         ADC   #$01
091F8: 85 08         STA   $08
091FA: 68            PLA 
091FB: 49 FF         EOR   #$FF
091FD: 69 00         ADC   #$00
091FF: 85 09         STA   $09
09201: A5 FA         LDA   $FA
09203: 38            SEC 
09204: E5 FE         SBC   $FE
09206: 85 0A         STA   $0A
09208: A5 FB         LDA   $FB
0920A: E5 FF         SBC   $FF
0920C: 30 02         BMI   $9210
0920E: B0 10         BCS   $9220
09210: 48            PHA 
09211: 97 0C         SMB1  $0C
09213: A5 0A         LDA   $0A
09215: 49 FF         EOR   #$FF
09217: 69 01         ADC   #$01
09219: 85 0A         STA   $0A
0921B: 68            PLA 
0921C: 49 FF         EOR   #$FF
0921E: 69 00         ADC   #$00
09220: 85 0B         STA   $0B
09222: A4 08         LDY   $08
09224: C4 0A         CPY   $0A
09226: A5 09         LDA   $09
09228: E5 0B         SBC   $0B
0922A: A5 09         LDA   $09
0922C: B0 0C         BCS   $923A
0922E: A7 0C         SMB2  $0C
09230: A6 0B         LDX   $0B
09232: 85 0B         STA   $0B
09234: A5 0A         LDA   $0A
09236: 84 0A         STY   $0A
09238: A8            TAY 
09239: 8A            TXA 
0923A: 84 FA         STY   $FA
0923C: 85 FB         STA   $FB
0923E: 62            CLA 
0923F: 46 0B         LSR   $0B
09241: 66 0A         ROR   $0A
09243: 6A            ROR 
09244: 46 0B         LSR   $0B
09246: 66 0A         ROR   $0A
09248: 6A            ROR 
09249: 85 F8         STA   $F8
0924B: A5 0A         LDA   $0A
0924D: 85 F9         STA   $F9
0924F: 20 03 38      JSR   $3803 ; CD System Call (BIT instruction follows)
09252: 2C C9 E0      BIT   $E0C9 ; MA_DIV16S?
09255: A5 0C         LDA   $0C
09257: 29 03         AND   #$03
09259: AA            TAX 
0925A: A4 FC         LDY   $FC
0925C: B9 7C 92      LDA   $927C,Y
0925F: AF 0C 06      BBS2  $0C, $9268
09262: 18            CLC 
09263: 69 E0         ADC   #$E0
09265: 49 FF         EOR   #$FF
09267: 1A            INC 
09268: 5D 74 92      EOR   $9274,X
0926B: 18            CLC 
0926C: 7D 78 92      ADC   $9278,X
0926F: 29 7F         AND   #$7F
09271: FA            PLX 
09272: 7A            PLY 
09273: 60            RTS 
09274: FF 00 00      BBS7  $00, $9277
09277: FF 81 00      BBS7  $81, $927A
0927A: 40            RTI 
0927B: 41 00         EOR   ($00,X)
0927D: 00            BRK 
0927E: 01 01         ORA   ($01,X)
09280: 01 02         ORA   ($02,X)
09282: 02            SXY 
09283: 02            SXY 
09284: 03 03         ST0   #$03
09286: 03 03         ST0   #$03
09288: 04 04         TSB   $04
0928A: 04 05         TSB   $05
0928C: 05 05         ORA   $05
0928E: 06 06         ASL   $06
09290: 06 06         ASL   $06
09292: 07 07         RMB0  $07
09294: 07 08         RMB0  $08
09296: 08            PHP 
09297: 08            PHP 
09298: 08            PHP 
09299: 09 09         ORA   #$09
0929B: 09 09         ORA   #$09
0929D: 0A            ASL 
0929E: 0A            ASL 
0929F: 0A            ASL 
092A0: 0A            ASL 
092A1: 0B            ??? 
092A2: 0B            ??? 
092A3: 0B            ??? 
092A4: 0B            ??? 
092A5: 0C 0C 0C      TSB   $0C0C
092A8: 0C 0C 0D      TSB   $0D0C
092AB: 0D 0D 0D      ORA   $0D0D
092AE: 0E 0E 0E      ASL   $0E0E
092B1: 0E 0E 0E      ASL   $0E0E
092B4: 0F 0F 0F      BBR0  $0F, $92C6
092B7: 0F 0F 10      BBR0  $0F, $92CA
092BA: 10 10         BPL   $92CC
092BC: 10 10         BPL   $92CE
092BE: E8            INX 
092BF: 92 11         STA   ($11)
092C1: 63            ??? 
092C2: 93 14 82 93   TST   $14, $9382
092C6: 15 96         ORA   $96,X
092C8: 93 16 96 93   TST   $16, $9396
092CC: 18            CLC 
092CD: CB            ??? 
092CE: 93 12 7D 94   TST   $12, $947D
092D2: 13 B2         ST1   #$B2
092D4: 94 17         STY   $17,X
092D6: 1C 96 19      TRB   $1996
092D9: EC 93 1A      CPX   $1A93
092DC: 19 94 1B      ORA   $1B94,Y
092DF: 42            SAY 
092E0: 93 1C 68 96   TST   $1C, $9668
092E4: 1D 8B 96      ORA   $968B,X
092E7: FF 20 63      BBS7  $20, $934D
092EA: 99 44 55      STA   $5544,Y
092ED: C2            CLY 
092EE: 64 FB         STZ   $FB
092F0: B9 21 93      LDA   $9321,Y
092F3: 85 F8         STA   $F8
092F5: C8            INY 
092F6: B9 21 93      LDA   $9321,Y
092F9: 85 F9         STA   $F9
092FB: C8            INY 
092FC: B9 21 93      LDA   $9321,Y
092FF: 85 FA         STA   $FA
09301: C8            INY 
09302: A5 FB         LDA   $FB
09304: 20 AF 90      JSR   $90AF
09307: E6 FB         INC   $FB
09309: A5 FB         LDA   $FB
0930B: C9 0B         CMP   #$0B
0930D: D0 E1         BNE   $92F0
0930F: 20 E0 96      JSR   $96E0
09312: 43 80         TMA   #$80
09314: 85 FA         STA   $FA
09316: A5 FB         LDA   $FB
09318: 20 AF 90      JSR   $90AF
0931B: A9 00         LDA   #$00
0931D: 20 56 8D      JSR   $8D56
09320: 60            RTS 
09321: 55 FC         EOR   $FC,X
09323: C9 56         CMP   #$56
09325: FC            ??? 
09326: EC 1C FD      CPX   $FD1C
09329: EC 4E FC      CPX   $FC4E
0932C: DA            PHX 
0932D: 50 FC         BVC   $932B
0932F: DA            PHX 
09330: 52 FC         EOR   ($FC)
09332: CA            DEX 
09333: 54            ??? 
09334: FC            ??? 
09335: CA            DEX 
09336: 5A            PHY 
09337: FC            ??? 
09338: DA            PHX 
09339: 5E FC DA      LSR   $DAFC,X
0933C: 1A            INC 
0933D: FD C9 1B      SBC   $1BC9,X
09340: FD C9 AD      SBC   $ADC9,X
09343: 1E FC 85      ASL   $85FC,X
09346: F8            SED 
09347: AD 1F FC      LDA   $FC1F
0934A: 85 F9         STA   $F9
0934C: A9 3C         LDA   #$3C
0934E: 85 FA         STA   $FA
09350: 64 FB         STZ   $FB
09352: 20 03 38      JSR   $3803 ; CD System Call (BIT instruction follows)
09355: 2C C9 E0      BIT   $E0C9 ; MA_DIV16S?
09358: A5 FC         LDA   $FC
0935A: 8D 1A FD      STA   $FD1A
0935D: A5 FE         LDA   $FE
0935F: 8D 1B FD      STA   $FD1B
09362: 60            RTS 
09363: AD 4E FC      LDA   $FC4E
09366: 85 F8         STA   $F8
09368: AD 4F FC      LDA   $FC4F
0936B: 85 F9         STA   $F9
0936D: 20 79 93      JSR   $9379
09370: A9 CA         LDA   #$CA
09372: 20 DE 90      JSR   $90DE
09375: C2            CLY 
09376: 4C 2C 94      JMP   $942C
09379: A9 F7         LDA   #$F7
0937B: 85 06         STA   $06
0937D: A9 FC         LDA   #$FC
0937F: 85 07         STA   $07
09381: 60            RTS 
09382: AD 52 FC      LDA   $FC52
09385: 85 F8         STA   $F8
09387: 64 F9         STZ   $F9
09389: 20 79 93      JSR   $9379
0938C: A9 CA         LDA   #$CA
0938E: 20 DE 90      JSR   $90DE
09391: A0 01         LDY   #$01
09393: 4C 2C 94      JMP   $942C
09396: 20 79 93      JSR   $9379
09399: AD 59 FC      LDA   $FC59
0939C: F0 14         BEQ   $93B2
0939E: 20 63 99      JSR   $9963
093A1: AD 1C FD      LDA   $FD1C
093A4: 85 F8         STA   $F8
093A6: AD 1D FD      LDA   $FD1D
093A9: 85 F9         STA   $F9
093AB: A9 C0         LDA   #$C0
093AD: 20 DE 90      JSR   $90DE
093B0: 80 14         BRA   $93C6
093B2: AD 56 FC      LDA   $FC56
093B5: 85 F8         STA   $F8
093B7: AD 57 FC      LDA   $FC57
093BA: 85 F9         STA   $F9
093BC: AD 58 FC      LDA   $FC58
093BF: 85 FA         STA   $FA
093C1: A9 CC         LDA   #$CC
093C3: 20 24 91      JSR   $9124
093C6: A0 03         LDY   #$03
093C8: 4C 2C 94      JMP   $942C
093CB: AD 62 FC      LDA   $FC62
093CE: 85 F8         STA   $F8
093D0: AD 63 FC      LDA   $FC63
093D3: 85 F9         STA   $F9
093D5: AD 64 FC      LDA   $FC64
093D8: 85 FA         STA   $FA
093DA: 20 79 93      JSR   $9379
093DD: A9 CC         LDA   #$CC
093DF: 20 24 91      JSR   $9124
093E2: A0 04         LDY   #$04
093E4: 4C 2C 94      JMP   $942C
093E7: E3 EA EC F1 FA AD 88  TIA   $ECEA, $FAF1, $88AD
093EE: 2C 48 A9      BIT   $A948
093F1: FF 8D 88      BBS7  $8D, $937C
093F4: 2C A9 1D      BIT   $1DA9
093F7: A0 20         LDY   #$20
093F9: 20 36 38      JSR   $3836
093FC: 83 07 11      TST   $07, $11
093FF: 8D 1A 94      STA   $941A
09402: 68            PLA 
09403: 8D 88 2C      STA   $2C88
09406: A9 20         LDA   #$20
09408: 20 2B 4C      JSR   $4C2B
0940B: 20 B0 5F      JSR   $5FB0
0940E: A9 F1         LDA   #$F1
09410: 8D 4A 94      STA   $944A
09413: A9 F6         LDA   #$F6
09415: 8D 4B 94      STA   $944B
09418: 60            RTS 
09419: A9 00         LDA   #$00
0941B: 20 36 38      JSR   $3836
0941E: 83 09 12      TST   $09, $12
09421: A9 13         LDA   #$13
09423: 8D 4A 94      STA   $944A
09426: A9 F7         LDA   #$F7
09428: 8D 4B 94      STA   $944B
0942B: 60            RTS 
0942C: DA            PHX 
0942D: 64 07         STZ   $07
0942F: AD 11 F7      LDA   $F711
09432: 0A            ASL 
09433: 26 07         ROL   $07
09435: 0A            ASL 
09436: 26 07         ROL   $07
09438: 0A            ASL 
09439: 26 07         ROL   $07
0943B: 0A            ASL 
0943C: 26 07         ROL   $07
0943E: 38            SEC 
0943F: E9 20         SBC   #$20
09441: 85 06         STA   $06
09443: A5 07         LDA   $07
09445: E9 00         SBC   #$00
09447: 85 07         STA   $07
09449: AD 13 F7      LDA   $F713
0944C: 0A            ASL 
0944D: 0A            ASL 
0944E: 0A            ASL 
0944F: 0A            ASL 
09450: 05 07         ORA   $07
09452: 85 07         STA   $07
09454: 64 F7         STZ   $F7
09456: 03 00         ST0   #$00
09458: B9 E7 93      LDA   $93E7,Y
0945B: 8D 02 00      STA   $0002
0945E: 23 02         ST2   #$02
09460: A9 02         LDA   #$02
09462: 85 F7         STA   $F7
09464: 03 02         ST0   #$02
09466: C2            CLY 
09467: B9 F7 FC      LDA   $FCF7,Y
0946A: F0 0F         BEQ   $947B
0946C: 18            CLC 
0946D: 65 06         ADC   $06
0946F: 8D 02 00      STA   $0002
09472: 62            CLA 
09473: 65 07         ADC   $07
09475: 8D 03 00      STA   $0003
09478: C8            INY 
09479: 80 EC         BRA   $9467
0947B: FA            PLX 
0947C: 60            RTS 
0947D: AD 4E FC      LDA   $FC4E
09480: 85 F8         STA   $F8
09482: AD 4F FC      LDA   $FC4F
09485: 85 F9         STA   $F9
09487: AD 50 FC      LDA   $FC50
0948A: 85 FA         STA   $FA
0948C: AD 51 FC      LDA   $FC51
0948F: 85 FB         STA   $FB
09491: A9 26         LDA   #$26
09493: 85 06         STA   $06
09495: A9 03         LDA   #$03
09497: 85 07         STA   $07
09499: A9 30         LDA   #$30
0949B: 85 04         STA   $04
0949D: A9 00         LDA   #$00
0949F: 85 05         STA   $05
094A1: A9 03         LDA   #$03
094A3: 85 FE         STA   $FE
094A5: AD 07 32      LDA   $3207
094A8: 0A            ASL 
094A9: 0A            ASL 
094AA: 0A            ASL 
094AB: 0A            ASL 
094AC: 8D CB 95      STA   $95CB
094AF: 4C D0 94      JMP   $94D0
094B2: A9 66         LDA   #$66
094B4: 85 06         STA   $06
094B6: A9 03         LDA   #$03
094B8: 85 07         STA   $07
094BA: A9 50         LDA   #$50
094BC: 85 04         STA   $04
094BE: A9 00         LDA   #$00
094C0: 85 05         STA   $05
094C2: A9 05         LDA   #$05
094C4: 85 FE         STA   $FE
094C6: AD 08 32      LDA   $3208
094C9: 0A            ASL 
094CA: 0A            ASL 
094CB: 0A            ASL 
094CC: 0A            ASL 
094CD: 8D CB 95      STA   $95CB
094D0: A5 F8         LDA   $F8
094D2: 46 F9         LSR   $F9
094D4: 6A            ROR 
094D5: 46 F9         LSR   $F9
094D7: 6A            ROR 
094D8: 46 F9         LSR   $F9
094DA: 6A            ROR 
094DB: 46 F9         LSR   $F9
094DD: 6A            ROR 
094DE: 85 F9         STA   $F9
094E0: A5 FA         LDA   $FA
094E2: 46 FB         LSR   $FB
094E4: 6A            ROR 
094E5: 46 FB         LSR   $FB
094E7: 6A            ROR 
094E8: 46 FB         LSR   $FB
094EA: 6A            ROR 
094EB: 46 FB         LSR   $FB
094ED: 6A            ROR 
094EE: 85 FB         STA   $FB
094F0: A9 F0         LDA   #$F0
094F2: 14 F8         TRB   $F8
094F4: 14 FA         TRB   $FA
094F6: C2            CLY 
094F7: A6 F9         LDX   $F9
094F9: A9 01         LDA   #$01
094FB: CA            DEX 
094FC: 30 0B         BMI   $9509
094FE: 99 00 FD      STA   $FD00,Y
09501: C8            INY 
09502: C0 19         CPY   #$19
09504: 90 F5         BCC   $94FB
09506: 4C B7 95      JMP   $95B7
09509: 8C 19 FD      STY   $FD19
0950C: 64 F7         STZ   $F7
0950E: 03 00         ST0   #$00
09510: A5 04         LDA   $04
09512: 8D 02 00      STA   $0002
09515: AD FD 31      LDA   $31FD
09518: 18            CLC 
09519: 65 05         ADC   $05
0951B: 8D 03 00      STA   $0003
0951E: A9 02         LDA   #$02
09520: 85 F7         STA   $F7
09522: 03 02         ST0   #$02
09524: 20 FA 95      JSR   $95FA
09527: A5 FB         LDA   $FB
09529: C5 F9         CMP   $F9
0952B: 90 1E         BCC   $954B
0952D: D0 31         BNE   $9560
0952F: A5 F8         LDA   $F8
09531: C5 FA         CMP   $FA
09533: B0 16         BCS   $954B
09535: A5 F8         LDA   $F8
09537: 29 0F         AND   #$0F
09539: 4A            LSR 
0953A: A8            TAY 
0953B: B9 14 96      LDA   $9614,Y
0953E: 85 04         STA   $04
09540: A5 FA         LDA   $FA
09542: 29 0F         AND   #$0F
09544: 4A            LSR 
09545: A8            TAY 
09546: B9 14 96      LDA   $9614,Y
09549: 80 0B         BRA   $9556
0954B: A5 F8         LDA   $F8
0954D: 29 0F         AND   #$0F
0954F: 4A            LSR 
09550: A8            TAY 
09551: B9 14 96      LDA   $9614,Y
09554: 85 04         STA   $04
09556: 85 05         STA   $05
09558: 20 04 96      JSR   $9604
0955B: AC 19 FD      LDY   $FD19
0955E: 80 46         BRA   $95A6
09560: A5 F8         LDA   $F8
09562: 29 0F         AND   #$0F
09564: 4A            LSR 
09565: A8            TAY 
09566: B9 14 96      LDA   $9614,Y
09569: 85 04         STA   $04
0956B: A9 FF         LDA   #$FF
0956D: 85 05         STA   $05
0956F: 20 04 96      JSR   $9604
09572: 20 FA 95      JSR   $95FA
09575: A5 FA         LDA   $FA
09577: 29 0F         AND   #$0F
09579: 4A            LSR 
0957A: A8            TAY 
0957B: B9 14 96      LDA   $9614,Y
0957E: 85 05         STA   $05
09580: 64 04         STZ   $04
09582: 20 04 96      JSR   $9604
09585: AC 19 FD      LDY   $FD19
09588: A5 FE         LDA   $FE
0958A: E6 FE         INC   $FE
0958C: 99 00 FD      STA   $FD00,Y
0958F: C8            INY 
09590: A5 FB         LDA   $FB
09592: 38            SEC 
09593: E5 F9         SBC   $F9
09595: AA            TAX 
09596: CA            DEX 
09597: A9 02         LDA   #$02
09599: C0 19         CPY   #$19
0959B: B0 1A         BCS   $95B7
0959D: CA            DEX 
0959E: 30 06         BMI   $95A6
095A0: 99 00 FD      STA   $FD00,Y
095A3: C8            INY 
095A4: 80 F3         BRA   $9599
095A6: A5 FE         LDA   $FE
095A8: 99 00 FD      STA   $FD00,Y
095AB: A9 07         LDA   #$07
095AD: C8            INY 
095AE: C0 19         CPY   #$19
095B0: B0 05         BCS   $95B7
095B2: 99 00 FD      STA   $FD00,Y
095B5: 80 F6         BRA   $95AD
095B7: AD FD 31      LDA   $31FD
095BA: 64 04         STZ   $04
095BC: 4A            LSR 
095BD: 66 04         ROR   $04
095BF: 4A            LSR 
095C0: 66 04         ROR   $04
095C2: 4A            LSR 
095C3: 66 04         ROR   $04
095C5: 4A            LSR 
095C6: 66 04         ROR   $04
095C8: 85 05         STA   $05
095CA: A9 00         LDA   #$00
095CC: 05 05         ORA   $05
095CE: 85 05         STA   $05
095D0: 64 F7         STZ   $F7
095D2: 03 00         ST0   #$00
095D4: A5 06         LDA   $06
095D6: 8D 02 00      STA   $0002
095D9: A5 07         LDA   $07
095DB: 8D 03 00      STA   $0003
095DE: A9 02         LDA   #$02
095E0: 85 F7         STA   $F7
095E2: 03 02         ST0   #$02
095E4: C2            CLY 
095E5: B9 00 FD      LDA   $FD00,Y
095E8: 18            CLC 
095E9: 65 04         ADC   $04
095EB: 8D 02 00      STA   $0002
095EE: 62            CLA 
095EF: 65 05         ADC   $05
095F1: 8D 03 00      STA   $0003
095F4: C8            INY 
095F5: C0 19         CPY   #$19
095F7: D0 EC         BNE   $95E5
095F9: 60            RTS 
095FA: A0 08         LDY   #$08
095FC: 13 00         ST1   #$00
095FE: 23 FF         ST2   #$FF
09600: 88            DEY 
09601: D0 F9         BNE   $95FC
09603: 60            RTS 
09604: A0 08         LDY   #$08
09606: A5 04         LDA   $04
09608: 8D 02 00      STA   $0002
0960B: A5 05         LDA   $05
0960D: 8D 03 00      STA   $0003
09610: 88            DEY 
09611: D0 F3         BNE   $9606
09613: 60            RTS 
09614: 00            BRK 
09615: 80 C0         BRA   $95D7
09617: E0 F0         CPX   #$F0
09619: F8            SED 
0961A: FC            ??? 
0961B: FE 8D 59      INC   $598D,X
0961E: FC            ??? 
0961F: A8            TAY 
09620: B9 66 96      LDA   $9666,Y
09623: A8            TAY 
09624: 64 04         STZ   $04
09626: AD FD 31      LDA   $31FD
09629: 4A            LSR 
0962A: 66 04         ROR   $04
0962C: 4A            LSR 
0962D: 66 04         ROR   $04
0962F: 4A            LSR 
09630: 66 04         ROR   $04
09632: 4A            LSR 
09633: 66 04         ROR   $04
09635: 85 05         STA   $05
09637: AD 07 32      LDA   $3207
0963A: 0A            ASL 
0963B: 0A            ASL 
0963C: 0A            ASL 
0963D: 0A            ASL 
0963E: 05 05         ORA   $05
09640: 85 05         STA   $05
09642: 64 F7         STZ   $F7
09644: 03 00         ST0   #$00
09646: 13 EE         ST1   #$EE
09648: 23 02         ST2   #$02
0964A: A9 02         LDA   #$02
0964C: 85 F7         STA   $F7
0964E: 03 02         ST0   #$02
09650: A2 03         LDX   #$03
09652: 98            TYA 
09653: 18            CLC 
09654: 65 04         ADC   $04
09656: 8D 02 00      STA   $0002
09659: 62            CLA 
0965A: 65 05         ADC   $05
0965C: 8D 03 00      STA   $0003
0965F: C8            INY 
09660: CA            DEX 
09661: D0 EF         BNE   $9652
09663: 4C 96 93      JMP   $9396
09666: 0A            ASL 
09667: 0D B9 87      ORA   $87B9
0966A: 96 D0         STX   $D0,Y
0966C: 19 5A BE      ORA   $BE5A,Y
0966F: 89 96         BIT   #$96
09671: A9 01         LDA   #$01
09673: 85 F8         STA   $F8
09675: B9 07 32      LDA   $3207,Y
09678: A8            TAY 
09679: A5 44         LDA   $44
0967B: 20 36 38      JSR   $3836
0967E: 83 0A 16      TST   $0A, $16
09681: 8A            TXA 
09682: 7A            PLY 
09683: 99 87 96      STA   $9687,Y
09686: 60            RTS 
09687: 00            BRK 
09688: 00            BRK 
09689: 02            SXY 
0968A: 03 BE         ST0   #$BE
0968C: 87 96         SMB0  $96
0968E: F0 0C         BEQ   $969C
09690: 62            CLA 
09691: 99 87 96      STA   $9687,Y
09694: A9 80         LDA   #$80
09696: 1D 15 30      ORA   $3015,X
09699: 9D 15 30      STA   $3015,X
0969C: 60            RTS 
0969D: 10 63         BPL   $9702
0969F: 99 12 EE      STA   $EE12,Y
096A2: 96 11         STX   $11,Y
096A4: E0 96         CPX   #$96
096A6: 13 2A         ST1   #$2A
096A8: 97 1F         SMB1  $1F
096AA: A3 98 14      TST   $98, $14
096AD: A8            TAY 
096AE: 9A            TXS 
096AF: 15 CE         ORA   $CE,X
096B1: 9A            TXS 
096B2: 16 28         ASL   $28,X
096B4: 9B            ??? 
096B5: 17 FF         RMB1  $FF
096B7: 9A            TXS 
096B8: 18            CLC 
096B9: 62            CLA 
096BA: 9B            ??? 
096BB: 19 7A 9B      ORA   $9B7A,Y
096BE: 1A            INC 
096BF: 97 9B         SMB1  $9B
096C1: 1E FE 97      ASL   $97FE,X
096C4: 1B            ??? 
096C5: 72 97         ADC   ($97)
096C7: 1C AF 97      TRB   $97AF
096CA: 1D E2 97      ORA   $97E2,X
096CD: 20 B5 99      JSR   $99B5
096D0: 21 E0         AND   ($E0,X)
096D2: 99 22 F1      STA   $F122,Y
096D5: 99 24 67      STA   $6724,Y
096D8: 9A            TXS 
096D9: 23 35         ST2   #$35
096DB: 9A            TXS 
096DC: 25 8D         AND   $8D
096DE: 9A            TXS 
096DF: FF A9 00      BBS7  $A9, $96E2
096E2: 85 F8         STA   $F8
096E4: A9 E0         LDA   #$E0
096E6: 85 F9         STA   $F9
096E8: AD 6C FC      LDA   $FC6C
096EB: 4C 5D 97      JMP   $975D
096EE: C9 80         CMP   #$80
096F0: B0 2F         BCS   $9721
096F2: 44 0B         BSR   $96FF
096F4: A0 71         LDY   #$71
096F6: 84 F8         STY   $F8
096F8: A0 E3         LDY   #$E3
096FA: 84 F9         STY   $F9
096FC: 4C 5D 97      JMP   $975D
096FF: 85 18         STA   $18
09701: 82            CLX 
09702: BC 1A 97      LDY   $971A,X
09705: 30 12         BMI   $9719
09707: E8            INX 
09708: E8            INX 
09709: C4 18         CPY   $18
0970B: D0 F5         BNE   $9702
0970D: BD 19 97      LDA   $9719,X
09710: 20 97 9B      JSR   $9B97
09713: B0 01         BCS   $9716
09715: CA            DEX 
09716: BD 19 97      LDA   $9719,X
09719: 60            RTS 
0971A: 10 32         BPL   $974E
0971C: 0A            ASL 
0971D: 30 0D         BMI   $972C
0971F: 31 FF         AND   ($FF),Y
09721: A9 9F         LDA   #$9F
09723: 85 F8         STA   $F8
09725: A9 E8         LDA   #$E8
09727: 85 F9         STA   $F9
09729: 60            RTS 
0972A: C9 80         CMP   #$80
0972C: B0 F3         BCS   $9721
0972E: 44 0B         BSR   $973B
09730: A0 46         LDY   #$46
09732: 84 F8         STY   $F8
09734: A0 E5         LDY   #$E5
09736: 84 F9         STY   $F9
09738: 4C 5D 97      JMP   $975D
0973B: 85 18         STA   $18
0973D: 82            CLX 
0973E: BC 56 97      LDY   $9756,X
09741: 30 12         BMI   $9755
09743: E8            INX 
09744: E8            INX 
09745: C4 18         CPY   $18
09747: D0 F5         BNE   $973E
09749: BD 55 97      LDA   $9755,X
0974C: 20 28 9B      JSR   $9B28
0974F: B0 01         BCS   $9752
09751: CA            DEX 
09752: BD 55 97      LDA   $9755,X
09755: 60            RTS 
09756: 05 07         ORA   $07
09758: 0D 0F 15      ORA   $150F
0975B: 17 FF         RMB1  $FF
0975D: 48            PHA 
0975E: A8            TAY 
0975F: 80 0D         BRA   $976E
09761: B2 F8         LDA   ($F8)
09763: 48            PHA 
09764: E6 F8         INC   $F8
09766: D0 02         BNE   $976A
09768: E6 F9         INC   $F9
0976A: 68            PLA 
0976B: D0 F4         BNE   $9761
0976D: 88            DEY 
0976E: D0 F1         BNE   $9761
09770: 68            PLA 
09771: 60            RTS 
09772: A5 F8         LDA   $F8
09774: 18            CLC 
09775: 6D 62 FC      ADC   $FC62
09778: 8D 62 FC      STA   $FC62
0977B: A5 F9         LDA   $F9
0977D: 6D 63 FC      ADC   $FC63
09780: 8D 63 FC      STA   $FC63
09783: A5 FA         LDA   $FA
09785: 6D 64 FC      ADC   $FC64
09788: 8D 64 FC      STA   $FC64
0978B: AD 62 FC      LDA   $FC62
0978E: C9 9F         CMP   #$9F
09790: AD 63 FC      LDA   $FC63
09793: E9 86         SBC   #$86
09795: AD 64 FC      LDA   $FC64
09798: E9 01         SBC   #$01
0979A: 90 0F         BCC   $97AB
0979C: A9 9F         LDA   #$9F
0979E: 8D 62 FC      STA   $FC62
097A1: A9 86         LDA   #$86
097A3: 8D 63 FC      STA   $FC63
097A6: A9 01         LDA   #$01
097A8: 8D 64 FC      STA   $FC64
097AB: 20 CB 93      JSR   $93CB
097AE: 60            RTS 
097AF: 44 21         BSR   $97D2
097B1: 90 1E         BCC   $97D1
097B3: AD 62 FC      LDA   $FC62
097B6: 38            SEC 
097B7: E5 F8         SBC   $F8
097B9: 8D 62 FC      STA   $FC62
097BC: AD 63 FC      LDA   $FC63
097BF: E5 F9         SBC   $F9
097C1: 8D 63 FC      STA   $FC63
097C4: AD 64 FC      LDA   $FC64
097C7: E5 FA         SBC   $FA
097C9: 8D 64 FC      STA   $FC64
097CC: 08            PHP 
097CD: 20 CB 93      JSR   $93CB
097D0: 28            PLP 
097D1: 60            RTS 
097D2: AD 62 FC      LDA   $FC62
097D5: C5 F8         CMP   $F8
097D7: AD 63 FC      LDA   $FC63
097DA: E5 F9         SBC   $F9
097DC: AD 64 FC      LDA   $FC64
097DF: E5 FA         SBC   $FA
097E1: 60            RTS 
097E2: 44 EE         BSR   $97D2
097E4: B0 17         BCS   $97FD
097E6: A5 F8         LDA   $F8
097E8: 38            SEC 
097E9: ED 62 FC      SBC   $FC62
097EC: 85 F8         STA   $F8
097EE: A5 F9         LDA   $F9
097F0: ED 63 FC      SBC   $FC63
097F3: 85 F9         STA   $F9
097F5: A5 FA         LDA   $FA
097F7: ED 64 FC      SBC   $FC64
097FA: 85 FA         STA   $FA
097FC: 18            CLC 
097FD: 60            RTS 
097FE: A5 F8         LDA   $F8
09800: 18            CLC 
09801: 6D 56 FC      ADC   $FC56
09804: 8D 56 FC      STA   $FC56
09807: A5 F9         LDA   $F9
09809: 6D 57 FC      ADC   $FC57
0980C: 8D 57 FC      STA   $FC57
0980F: 62            CLA 
09810: 6D 58 FC      ADC   $FC58
09813: 8D 58 FC      STA   $FC58
09816: AD 56 FC      LDA   $FC56
09819: C9 9F         CMP   #$9F
0981B: AD 57 FC      LDA   $FC57
0981E: E9 86         SBC   #$86
09820: AD 58 FC      LDA   $FC58
09823: E9 01         SBC   #$01
09825: 90 0F         BCC   $9836
09827: A9 9F         LDA   #$9F
09829: 8D 56 FC      STA   $FC56
0982C: A9 86         LDA   #$86
0982E: 8D 57 FC      STA   $FC57
09831: A9 01         LDA   #$01
09833: 8D 58 FC      STA   $FC58
09836: 20 96 93      JSR   $9396
09839: 20 63 99      JSR   $9963
0983C: B0 64         BCS   $98A2
0983E: A9 04         LDA   #$04
09840: 20 36 38      JSR   $3836
09843: 83 13 15      TST   $13, $15
09846: EE 55 FC      INC   $FC55
09849: AD 50 FC      LDA   $FC50
0984C: 85 F8         STA   $F8
0984E: AD 51 FC      LDA   $FC51
09851: 85 F9         STA   $F9
09853: AD 54 FC      LDA   $FC54
09856: 48            PHA 
09857: 20 A3 98      JSR   $98A3
0985A: AD 4E FC      LDA   $FC4E
0985D: CD 50 FC      CMP   $FC50
09860: AD 4F FC      LDA   $FC4F
09863: ED 51 FC      SBC   $FC51
09866: B0 13         BCS   $987B
09868: AD 50 FC      LDA   $FC50
0986B: 38            SEC 
0986C: E5 F8         SBC   $F8
0986E: 85 F8         STA   $F8
09870: AD 51 FC      LDA   $FC51
09873: E5 F9         SBC   $F9
09875: 85 F9         STA   $F9
09877: 18            CLC 
09878: 20 F1 99      JSR   $99F1
0987B: 68            PLA 
0987C: 85 F8         STA   $F8
0987E: AD 52 FC      LDA   $FC52
09881: CD 54 FC      CMP   $FC54
09884: B0 0E         BCS   $9894
09886: AD 54 FC      LDA   $FC54
09889: 38            SEC 
0988A: E5 F8         SBC   $F8
0988C: 85 F9         STA   $F9
0988E: 64 F8         STZ   $F8
09890: 18            CLC 
09891: 20 35 9A      JSR   $9A35
09894: 20 63 93      JSR   $9363
09897: 20 7D 94      JSR   $947D
0989A: 20 82 93      JSR   $9382
0989D: 20 96 93      JSR   $9396
098A0: 80 97         BRA   $9839
098A2: 60            RTS 
098A3: AD 55 FC      LDA   $FC55
098A6: 20 A2 99      JSR   $99A2
098A9: A0 03         LDY   #$03
098AB: B1 04         LDA   ($04),Y
098AD: 8D 50 FC      STA   $FC50
098B0: C8            INY 
098B1: B1 04         LDA   ($04),Y
098B3: 8D 51 FC      STA   $FC51
098B6: C8            INY 
098B7: B1 04         LDA   ($04),Y
098B9: 8D 54 FC      STA   $FC54
098BC: C8            INY 
098BD: B1 04         LDA   ($04),Y
098BF: 8D 5C FC      STA   $FC5C
098C2: C8            INY 
098C3: B1 04         LDA   ($04),Y
098C5: 8D 60 FC      STA   $FC60
098C8: 62            CLA 
098C9: AC 65 FC      LDY   $FC65
098CC: 30 03         BMI   $98D1
098CE: B9 6B EA      LDA   $EA6B,Y
098D1: 8D 5D FC      STA   $FC5D
098D4: 18            CLC 
098D5: 6D 5C FC      ADC   $FC5C
098D8: 8D 5A FC      STA   $FC5A
098DB: 62            CLA 
098DC: 0A            ASL 
098DD: 8D 5B FC      STA   $FC5B
098E0: 62            CLA 
098E1: AC 66 FC      LDY   $FC66
098E4: 30 03         BMI   $98E9
098E6: B9 72 EA      LDA   $EA72,Y
098E9: AC 67 FC      LDY   $FC67
098EC: 30 04         BMI   $98F2
098EE: 18            CLC 
098EF: 79 79 EA      ADC   $EA79,Y
098F2: 8D 61 FC      STA   $FC61
098F5: 18            CLC 
098F6: 6D 60 FC      ADC   $FC60
098F9: 8D 5E FC      STA   $FC5E
098FC: 62            CLA 
098FD: 0A            ASL 
098FE: 8D 5F FC      STA   $FC5F
09901: 20 36 38      JSR   $3836
09904: 83 1C 12      TST   $1C, $12
09907: DA            PHX 
09908: A9 0A         LDA   #$0A
0990A: 20 36 38      JSR   $3836
0990D: 83 01 10      TST   $01, $10
09910: B0 03         BCS   $9915
09912: 9C 54 FC      STZ   $FC54
09915: 44 02         BSR   $9919
09917: FA            PLX 
09918: 60            RTS 
09919: AD 65 FC      LDA   $FC65
0991C: 30 06         BMI   $9924
0991E: 18            CLC 
0991F: 69 00         ADC   #$00
09921: 20 3B 97      JSR   $973B
09924: 8D B4 FC      STA   $FCB4
09927: AD 66 FC      LDA   $FC66
0992A: 30 06         BMI   $9932
0992C: 18            CLC 
0992D: 69 08         ADC   #$08
0992F: 20 3B 97      JSR   $973B
09932: 8D B5 FC      STA   $FCB5
09935: AD 67 FC      LDA   $FC67
09938: 30 06         BMI   $9940
0993A: 18            CLC 
0993B: 69 10         ADC   #$10
0993D: 20 3B 97      JSR   $973B
09940: 8D B6 FC      STA   $FCB6
09943: AD 6A FC      LDA   $FC6A
09946: 30 03         BMI   $994B
09948: 18            CLC 
09949: 69 18         ADC   #$18
0994B: 8D B7 FC      STA   $FCB7
0994E: AD 69 FC      LDA   $FC69
09951: 30 03         BMI   $9956
09953: 18            CLC 
09954: 69 1E         ADC   #$1E
09956: 8D B8 FC      STA   $FCB8
09959: AD 68 FC      LDA   $FC68
0995C: 20 FF 96      JSR   $96FF
0995F: 8D B9 FC      STA   $FCB9
09962: 60            RTS 
09963: AD 55 FC      LDA   $FC55
09966: C9 32         CMP   #$32
09968: B0 2E         BCS   $9998
0996A: 1A            INC 
0996B: 20 A2 99      JSR   $99A2
0996E: A0 00         LDY   #$00
09970: B1 04         LDA   ($04),Y
09972: 38            SEC 
09973: ED 56 FC      SBC   $FC56
09976: 8D 1C FD      STA   $FD1C
09979: C8            INY 
0997A: B1 04         LDA   ($04),Y
0997C: ED 57 FC      SBC   $FC57
0997F: 8D 1D FD      STA   $FD1D
09982: C8            INY 
09983: B1 04         LDA   ($04),Y
09985: ED 58 FC      SBC   $FC58
09988: 8D 1E FD      STA   $FD1E
0998B: AD 1C FD      LDA   $FD1C
0998E: 0D 1D FD      ORA   $FD1D
09991: 0D 1E FD      ORA   $FD1E
09994: D0 01         BNE   $9997
09996: 18            CLC 
09997: 60            RTS 
09998: 9C 1C FD      STZ   $FD1C
0999B: 9C 1D FD      STZ   $FD1D
0999E: 9C 1E FD      STZ   $FD1E
099A1: 60            RTS 
099A2: 64 05         STZ   $05
099A4: 0A            ASL 
099A5: 0A            ASL 
099A6: 0A            ASL 
099A7: 26 05         ROL   $05
099A9: 18            CLC 
099AA: 69 98         ADC   #$98
099AC: 85 04         STA   $04
099AE: A5 05         LDA   $05
099B0: 69 E8         ADC   #$E8
099B2: 85 05         STA   $05
099B4: 60            RTS 
099B5: 20 40 4B      JSR   $4B40
099B8: A9 01         LDA   #$01
099BA: 85 F8         STA   $F8
099BC: 64 F9         STZ   $F9
099BE: 18            CLC 
099BF: 44 30         BSR   $99F1
099C1: AD 4E FC      LDA   $FC4E
099C4: 90 0B         BCC   $99D1
099C6: 29 01         AND   #$01
099C8: F0 04         BEQ   $99CE
099CA: A9 05         LDA   #$05
099CC: 44 0B         BSR   $99D9
099CE: 4C A8 48      JMP   $48A8
099D1: A9 06         LDA   #$06
099D3: 44 04         BSR   $99D9
099D5: 20 7A 4B      JSR   $4B7A
099D8: 60            RTS 
099D9: 20 36 38      JSR   $3836
099DC: 83 13 15      TST   $13, $15
099DF: 60            RTS 
099E0: 20 40 4B      JSR   $4B40
099E3: 64 F8         STZ   $F8
099E5: A9 01         LDA   #$01
099E7: 85 F9         STA   $F9
099E9: 18            CLC 
099EA: 44 49         BSR   $9A35
099EC: AD 52 FC      LDA   $FC52
099EF: 80 D3         BRA   $99C4
099F1: AD 50 FC      LDA   $FC50
099F4: AC 51 FC      LDY   $FC51
099F7: 90 04         BCC   $99FD
099F9: A9 90         LDA   #$90
099FB: A0 01         LDY   #$01
099FD: 85 FA         STA   $FA
099FF: 84 FB         STY   $FB
09A01: A5 F8         LDA   $F8
09A03: 18            CLC 
09A04: 6D 4E FC      ADC   $FC4E
09A07: 8D 4E FC      STA   $FC4E
09A0A: A5 F9         LDA   $F9
09A0C: 6D 4F FC      ADC   $FC4F
09A0F: 8D 4F FC      STA   $FC4F
09A12: A5 FB         LDA   $FB
09A14: A4 FA         LDY   $FA
09A16: D0 01         BNE   $9A19
09A18: 3A            DEC 
09A19: 88            DEY 
09A1A: CC 4E FC      CPY   $FC4E
09A1D: ED 4F FC      SBC   $FC4F
09A20: B0 0A         BCS   $9A2C
09A22: A5 FA         LDA   $FA
09A24: 8D 4E FC      STA   $FC4E
09A27: A5 FB         LDA   $FB
09A29: 8D 4F FC      STA   $FC4F
09A2C: 08            PHP 
09A2D: 20 63 93      JSR   $9363
09A30: 20 7D 94      JSR   $947D
09A33: 28            PLP 
09A34: 60            RTS 
09A35: AD 54 FC      LDA   $FC54
09A38: F0 27         BEQ   $9A61
09A3A: 90 02         BCC   $9A3E
09A3C: A9 C8         LDA   #$C8
09A3E: 85 FA         STA   $FA
09A40: A5 F8         LDA   $F8
09A42: 18            CLC 
09A43: 6D 53 FC      ADC   $FC53
09A46: 8D 53 FC      STA   $FC53
09A49: A5 F9         LDA   $F9
09A4B: 6D 52 FC      ADC   $FC52
09A4E: 8D 52 FC      STA   $FC52
09A51: A5 FA         LDA   $FA
09A53: 3A            DEC 
09A54: CD 52 FC      CMP   $FC52
09A57: B0 08         BCS   $9A61
09A59: A5 FA         LDA   $FA
09A5B: 8D 52 FC      STA   $FC52
09A5E: 9C 53 FC      STZ   $FC53
09A61: 08            PHP 
09A62: 20 82 93      JSR   $9382
09A65: 28            PLP 
09A66: 60            RTS 
09A67: AD 4E FC      LDA   $FC4E
09A6A: 38            SEC 
09A6B: E5 F8         SBC   $F8
09A6D: 8D 4E FC      STA   $FC4E
09A70: AD 4F FC      LDA   $FC4F
09A73: E5 F9         SBC   $F9
09A75: 8D 4F FC      STA   $FC4F
09A78: B0 08         BCS   $9A82
09A7A: 9C 4E FC      STZ   $FC4E
09A7D: 9C 4F FC      STZ   $FC4F
09A80: 80 AA         BRA   $9A2C
09A82: AD 4E FC      LDA   $FC4E
09A85: 0D 4F FC      ORA   $FC4F
09A88: D0 A2         BNE   $9A2C
09A8A: 18            CLC 
09A8B: 80 9F         BRA   $9A2C
09A8D: AD 53 FC      LDA   $FC53
09A90: 38            SEC 
09A91: E5 F8         SBC   $F8
09A93: 8D 53 FC      STA   $FC53
09A96: AD 52 FC      LDA   $FC52
09A99: E5 F9         SBC   $F9
09A9B: 8D 52 FC      STA   $FC52
09A9E: B0 C1         BCS   $9A61
09AA0: 9C 52 FC      STZ   $FC52
09AA3: 9C 53 FC      STZ   $FC53
09AA6: 80 B9         BRA   $9A61
09AA8: 44 19         BSR   $9AC3
09AAA: 38            SEC 
09AAB: F9 49 9B      SBC   $9B49,Y
09AAE: AA            TAX 
09AAF: B9 4E 9B      LDA   $9B4E,Y
09AB2: 85 18         STA   $18
09AB4: B9 53 9B      LDA   $9B53,Y
09AB7: 85 19         STA   $19
09AB9: BD 04 40      LDA   $4004,X
09ABC: 12 18         ORA   ($18)
09ABE: 92 18         STA   ($18)
09AC0: 4C 19 99      JMP   $9919
09AC3: A0 04         LDY   #$04
09AC5: D9 49 9B      CMP   $9B49,Y
09AC8: B0 03         BCS   $9ACD
09ACA: 88            DEY 
09ACB: D0 F8         BNE   $9AC5
09ACD: 60            RTS 
09ACE: 44 F3         BSR   $9AC3
09AD0: 38            SEC 
09AD1: F9 49 9B      SBC   $9B49,Y
09AD4: AA            TAX 
09AD5: B9 4E 9B      LDA   $9B4E,Y
09AD8: 85 18         STA   $18
09ADA: B9 53 9B      LDA   $9B53,Y
09ADD: 85 19         STA   $19
09ADF: BD 04 40      LDA   $4004,X
09AE2: 49 FF         EOR   #$FF
09AE4: 32 18         AND   ($18)
09AE6: 92 18         STA   ($18)
09AE8: B9 58 9B      LDA   $9B58,Y
09AEB: 85 18         STA   $18
09AED: B9 5D 9B      LDA   $9B5D,Y
09AF0: 85 19         STA   $19
09AF2: 8A            TXA 
09AF3: D2 18         CMP   ($18)
09AF5: D0 07         BNE   $9AFE
09AF7: A9 FF         LDA   #$FF
09AF9: 92 18         STA   ($18)
09AFB: 20 19 99      JSR   $9919
09AFE: 60            RTS 
09AFF: 44 C2         BSR   $9AC3
09B01: 38            SEC 
09B02: F9 49 9B      SBC   $9B49,Y
09B05: AA            TAX 
09B06: B9 4E 9B      LDA   $9B4E,Y
09B09: 85 18         STA   $18
09B0B: B9 53 9B      LDA   $9B53,Y
09B0E: 85 19         STA   $19
09B10: BD 04 40      LDA   $4004,X
09B13: 32 18         AND   ($18)
09B15: F0 10         BEQ   $9B27
09B17: B9 58 9B      LDA   $9B58,Y
09B1A: 85 18         STA   $18
09B1C: B9 5D 9B      LDA   $9B5D,Y
09B1F: 85 19         STA   $19
09B21: 8A            TXA 
09B22: 92 18         STA   ($18)
09B24: 20 19 99      JSR   $9919
09B27: 60            RTS 
09B28: DA            PHX 
09B29: 44 98         BSR   $9AC3
09B2B: 38            SEC 
09B2C: F9 49 9B      SBC   $9B49,Y
09B2F: AA            TAX 
09B30: B9 4E 9B      LDA   $9B4E,Y
09B33: 85 18         STA   $18
09B35: B9 53 9B      LDA   $9B53,Y
09B38: 85 19         STA   $19
09B3A: B2 18         LDA   ($18)
09B3C: 85 18         STA   $18
09B3E: BD 04 40      LDA   $4004,X
09B41: FA            PLX 
09B42: 24 18         BIT   $18
09B44: 18            CLC 
09B45: F0 01         BEQ   $9B48
09B47: 38            SEC 
09B48: 60            RTS 
09B49: 00            BRK 
09B4A: 08            PHP 
09B4B: 10 18         BPL   $9B65
09B4D: 1E 27 28      ASL   $2827,X
09B50: 29 2B         AND   #$2B
09B52: 2A            ROL 
09B53: FC            ??? 
09B54: FC            ??? 
09B55: FC            ??? 
09B56: FC            ??? 
09B57: FC            ??? 
09B58: 65 66         ADC   $66
09B5A: 67 6A         RMB6  $6A
09B5C: 69 FC         ADC   #$FC
09B5E: FC            ??? 
09B5F: FC            ??? 
09B60: FC            ??? 
09B61: FC            ??? 
09B62: 44 0C         BSR   $9B70
09B64: B9 20 FC      LDA   $FC20,Y
09B67: 1D 04 40      ORA   $4004,X
09B6A: 99 20 FC      STA   $FC20,Y
09B6D: 4C 19 99      JMP   $9919
09B70: A8            TAY 
09B71: 29 07         AND   #$07
09B73: AA            TAX 
09B74: 98            TYA 
09B75: 4A            LSR 
09B76: 4A            LSR 
09B77: 4A            LSR 
09B78: A8            TAY 
09B79: 60            RTS 
09B7A: 48            PHA 
09B7B: 44 F3         BSR   $9B70
09B7D: BD 04 40      LDA   $4004,X
09B80: 49 FF         EOR   #$FF
09B82: 39 20 FC      AND   $FC20,Y
09B85: 99 20 FC      STA   $FC20,Y
09B88: 68            PLA 
09B89: CD 68 FC      CMP   $FC68
09B8C: D0 08         BNE   $9B96
09B8E: A9 FF         LDA   #$FF
09B90: 8D 68 FC      STA   $FC68
09B93: 20 19 99      JSR   $9919
09B96: 60            RTS 
09B97: DA            PHX 
09B98: 44 D6         BSR   $9B70
09B9A: BD 04 40      LDA   $4004,X
09B9D: 02            SXY 
09B9E: 7A            PLY 
09B9F: 3C 20 FC      BIT   $FC20,X
09BA2: 02            SXY 
09BA3: 18            CLC 
09BA4: F0 01         BEQ   $9BA7
09BA6: 38            SEC 
09BA7: 60            RTS 
09BA8: 20 03 38      JSR   $3803 ; CD System Call (BIT instruction follows)
09BAB: 2C 30 E0      BIT   $E030
09BAE: 62            CLA 
09BAF: 20 33 38      JSR   $3833
09BB2: A5 FE         LDA   $FE
09BB4: 18            CLC 
09BB5: 69 20         ADC   #$20
09BB7: 85 FE         STA   $FE
09BB9: A5 FD         LDA   $FD
09BBB: 69 00         ADC   #$00
09BBD: 85 FD         STA   $FD
09BBF: A5 FC         LDA   $FC
09BC1: 69 00         ADC   #$00
09BC3: 85 FC         STA   $FC
09BC5: A9 12         LDA   #$12
09BC7: 85 F8         STA   $F8
09BC9: 64 FF         STZ   $FF
09BCB: 64 FA         STZ   $FA
09BCD: 64 FB         STZ   $FB
09BCF: 20 06 38      JSR   $3806 ; CD System Call ALTERNATE (BIT instruction follows)
09BD2: 2C 33 E0      BIT   $E033
09BD5: 9C D3 2E      STZ   $2ED3
09BD8: 9C D4 2E      STZ   $2ED4
09BDB: 60            RTS 
09BDC: 20 E3 9B      JSR   $9BE3
09BDF: 20 24 38      JSR   $3824 ; Begin decompression of block at AXY
09BE2: 60            RTS 

;---------------------------------
;
; ?
;
; Returns an address of a compressed block in AXY
;
09BE3: 89 40         BIT   #$40
09BE5: F0 0F         BEQ   $9BF6
09BE7: AE D3 2E      LDX   $2ED3
09BEA: 86 FC         STX   $FC
09BEC: AE D4 2E      LDX   $2ED4
09BEF: 86 FD         STX   $FD
09BF1: 29 BF         AND   #$BF
09BF3: AA            TAX 
09BF4: 80 05         BRA   $9BFB
09BF6: AA            TAX 
09BF7: 64 FC         STZ   $FC
09BF9: 64 FD         STZ   $FD
09BFB: A9 02         LDA   #$02
09BFD: 85 F8         STA   $F8
09BFF: 64 F9         STZ   $F9
09C01: 8A            TXA 
09C02: F0 1F         BEQ   $9C23
09C04: CA            DEX 
09C05: DA            PHX 
09C06: 20 31 9C      JSR   $9C31
09C09: FA            PLX 
09C0A: A5 FC         LDA   $FC
09C0C: 18            CLC 
09C0D: 6D 7D 27      ADC   $277D
09C10: A8            TAY 
09C11: A5 FD         LDA   $FD
09C13: 6D 7E 27      ADC   $277E
09C16: 42            SAY 
09C17: 18            CLC 
09C18: 69 02         ADC   #$02
09C1A: 85 FC         STA   $FC
09C1C: 98            TYA 
09C1D: 69 00         ADC   #$00
09C1F: 85 FD         STA   $FD
09C21: 80 DE         BRA   $9C01
09C23: A5 FC         LDA   $FC
09C25: 18            CLC 
09C26: 69 02         ADC   #$02
09C28: AA            TAX 
09C29: A5 FD         LDA   $FD
09C2B: 69 00         ADC   #$00
09C2D: A8            TAY 
09C2E: A9 FF         LDA   #$FF
09C30: 60            RTS 

;
09C31: 5A            PHY 
09C32: A2 07         LDX   #$07
09C34: B5 F8         LDA   $F8,X
09C36: 9D 7D 28      STA   $287D,X
09C39: CA            DEX 
09C3A: 10 F8         BPL   $9C34
09C3C: 20 03 38      JSR   $3803 ; CD System Call (BIT instruction follows)
09C3F: 2C 42 E0      BIT   $E042 ; AD_STOP
09C42: 20 06 38      JSR   $3806 ; CD System Call ALTERNATE (BIT instruction follows)
09C45: 2C 45 E0      BIT   $E045 ; AD_STAT
09C48: A2 07         LDX   #$07
09C4A: BD 7D 28    - LDA   $287D,X
09C4D: 95 F8         STA   $F8,X
09C4F: CA            DEX 
09C50: 10 F8         BPL   $9C4A -
09C52: 64 FF         STZ   $FF
09C54: A9 7D         LDA   #$7D
09C56: 85 FA         STA   $FA
09C58: A9 27         LDA   #$27
09C5A: 85 FB         STA   $FB
09C5C: 20 06 38      JSR   $3806 ; CD System Call ALTERNATE (BIT instruction follows)
09C5F: 2C D6 2C      BIT   $2CD6 ; j_AD_READ
09C62: A2 07         LDX   #$07
09C64: BD 7D 28      LDA   $287D,X
09C67: 95 F8         STA   $F8,X
09C69: CA            DEX 
09C6A: 10 F8         BPL   $9C64
09C6C: 7A            PLY 
09C6D: 60            RTS 
09C6E: 10 01         BPL   $9C71
09C70: 5A            PHY 
09C71: 11 0A         ORA   ($0A),Y
09C73: 5A            PHY 
09C74: 12 0E         ORA   ($0E)
09C76: 5A            PHY 
09C77: 13 D1         ST1   #$D1
09C79: 5A            PHY 
09C7A: 14 E2         TRB   $E2
09C7C: 5A            PHY 
09C7D: 15 EA         ORA   $EA,X
09C7F: 5A            PHY 
09C80: 16 F7         ASL   $F7,X
09C82: 5A            PHY 
09C83: 17 18         RMB1  $18
09C85: 5B            ??? 
09C86: 18            CLC 
09C87: 22            SAX 
09C88: 5B            ??? 
09C89: 19 28 5B      ORA   $5B28,Y
09C8C: 1A            INC 
09C8D: FE 5A FF      INC   $FF5A,X
09C90: 10 36         BPL   $9CC8
09C92: 5B            ??? 
09C93: 11 3E         ORA   ($3E),Y
09C95: 5B            ??? 
09C96: 12 B0         ORA   ($B0)
09C98: 5B            ??? 
09C99: 14 55         TRB   $55
09C9B: 5B            ??? 
09C9C: 15 DE         ORA   $DE,X
09C9E: 5B            ??? 
09C9F: 13 C9         ST1   #$C9
09CA1: 5B            ??? 
09CA2: FF 10 16      BBS7  $10, $9CBB
09CA5: 5C            ??? 
09CA6: 11 1E         ORA   ($1E),Y
09CA8: 5C            ??? 
09CA9: 12 31         ORA   ($31)
09CAB: 5C            ??? 
09CAC: 13 D1         ST1   #$D1
09CAE: 5C            ??? 
09CAF: 14 D7         TRB   $D7
09CB1: 5C            ??? 
09CB2: 15 D8         ORA   $D8,X
09CB4: 5C            ??? 
09CB5: 16 E8         ASL   $E8,X
09CB7: 5C            ??? 
09CB8: 17 58         RMB1  $58
09CBA: 5D 18 A9      EOR   $A918,X
09CBD: 5D 19 21      EOR   $2119,X
09CC0: 5D FF 0F      EOR   $0FFF,X
09CC3: 6B            ??? 
09CC4: 37 AD         RMB3  $AD
09CC6: DC            ??? 
09CC7: 2C A8 38      BIT   $38A8
09CCA: FD 15 30      SBC   $3015,X
09CCD: 85 F8         STA   $F8
09CCF: BD 8F 30      LDA   $308F,X
09CD2: 38            SEC 
09CD3: E5 F8         SBC   $F8
09CD5: 9D 8F 30      STA   $308F,X
09CD8: BD 09 31      LDA   $3109,X
09CDB: E9 00         SBC   #$00
09CDD: 9D 09 31      STA   $3109,X
09CE0: 98            TYA 
09CE1: 9D 15 30      STA   $3015,X
09CE4: B0 19         BCS   $9CFF
09CE6: BD 83 31      LDA   $3183,X
09CE9: F0 0E         BEQ   $9CF9
09CEB: 20 E3 4A      JSR   $4AE3
09CEE: 02            SXY 
09CEF: 20 03 38      JSR   $3803 ; CD System Call (BIT instruction follows)
09CF2: 2C 45 E0      BIT   $E045 ; AD_STAT
09CF5: C9 00         CMP   #$00
09CF7: D0 06         BNE   $9CFF
09CF9: 20 1E 5C      JSR   $5C1E
09CFC: 20 90 49      JSR   $4990
09CFF: 60            RTS 
09D00: 10 66         BPL   $9D68
09D02: 9D 11 7D      STA   $7D11,X
09D05: 9D 12 85      STA   $8512,X
09D08: 9D 13 06      STA   $0613,X
09D0B: 5F 14 3A      BBR5  $14, $9D48
09D0E: 5F 15 6F      BBR5  $15, $9D80
09D11: 5F 16 FC      BBR5  $16, $9D10
09D14: 9D 17 32      STA   $3217,X
09D17: 9E 18 AE      STZ   $AE18,X
09D1A: 9D 19 EE      STA   $EE19,X
09D1D: 9D 1A 22      STA   $221A,X
09D20: 9D FF 64      STA   $64FF,X
09D23: 18            CLC 
09D24: E6 18         INC   $18
09D26: A5 18         LDA   $18
09D28: 85 F8         STA   $F8
09D2A: A9 E2         LDA   #$E2
09D2C: 85 FA         STA   $FA
09D2E: A9 36         LDA   #$36
09D30: 85 FB         STA   $FB
09D32: 20 03 38      JSR   $3803 ; CD System Call (BIT instruction follows)
09D35: 2C 57 E0      BIT   $E057
09D38: C9 FF         CMP   #$FF
09D3A: F0 29         BEQ   $9D65
09D3C: 3A            DEC 
09D3D: F0 10         BEQ   $9D4F
09D3F: A0 0A         LDY   #$0A
09D41: 62            CLA 
09D42: 88            DEY 
09D43: 30 20         BMI   $9D65
09D45: B9 98 5F      LDA   $5F98,Y
09D48: D9 E2 36      CMP   $36E2,Y
09D4B: F0 F4         BEQ   $9D41
09D4D: 80 D5         BRA   $9D24
09D4F: 20 03 38      JSR   $3803 ; CD System Call (BIT instruction follows)
09D52: 2C 4B E0      BIT   $E04B
09D55: C9 FF         CMP   #$FF
09D57: F0 0C         BEQ   $9D65
09D59: A5 FC         LDA   $FC
09D5B: C9 3B         CMP   #$3B
09D5D: A5 FD         LDA   $FD
09D5F: E9 00         SBC   #$00
09D61: 62            CLA 
09D62: B0 01         BCS   $9D65
09D64: 1A            INC 
09D65: 60            RTS 
09D66: 20 AC 9E      JSR   $9EAC
09D69: 44 03         BSR   $9D6E
09D6B: 4C 40 9E      JMP   $9E40
09D6E: A2 F4         LDX   #$F4
09D70: A0 36         LDY   #$36
09D72: A9 5B         LDA   #$5B
09D74: 8D 6E 20      STA   $206E
09D77: A9 9F         LDA   #$9F
09D79: 8D 6F 20      STA   $206F
09D7C: 60            RTS 
09D7D: 44 EF         BSR   $9D6E
09D7F: 20 85 9E      JSR   $9E85
09D82: 4C C2 9E      JMP   $9EC2
09D85: A9 2F         LDA   #$2F
09D87: 85 FA         STA   $FA
09D89: A9 37         LDA   #$37
09D8B: 85 FB         STA   $FB
09D8D: A9 0B         LDA   #$0B
09D8F: 85 FC         STA   $FC
09D91: 64 FD         STZ   $FD
09D93: 20 3A 5F      JSR   $5F3A
09D96: C9 01         CMP   #$01
09D98: B0 13         BCS   $9DAD
09D9A: A2 2F         LDX   #$2F
09D9C: A0 37         LDY   #$37
09D9E: A9 A8         LDA   #$A8
09DA0: 8D 6E 20      STA   $206E
09DA3: A9 9F         LDA   #$9F
09DA5: 8D 6F 20      STA   $206F
09DA8: 20 85 9E      JSR   $9E85
09DAB: 62            CLA 
09DAC: 18            CLC 
09DAD: 60            RTS 
09DAE: 44 0E         BSR   $9DBE
09DB0: 20 3A 5F      JSR   $5F3A
09DB3: C9 01         CMP   #$01
09DB5: B0 06         BCS   $9DBD
09DB7: 44 26         BSR   $9DDF
09DB9: 20 85 9E      JSR   $9E85
09DBC: 18            CLC 
09DBD: 60            RTS 
09DBE: A9 30         LDA   #$30
09DC0: 8D A2 5F      STA   $5FA2
09DC3: A9 58         LDA   #$58
09DC5: 8D A3 5F      STA   $5FA3
09DC8: A9 98         LDA   #$98
09DCA: 85 F8         STA   $F8
09DCC: A9 5F         LDA   #$5F
09DCE: 85 F9         STA   $F9
09DD0: A9 3A         LDA   #$3A
09DD2: 85 FA         STA   $FA
09DD4: A9 37         LDA   #$37
09DD6: 85 FB         STA   $FB
09DD8: A9 02         LDA   #$02
09DDA: 85 FC         STA   $FC
09DDC: 64 FD         STZ   $FD
09DDE: 60            RTS 
09DDF: A2 3A         LDX   #$3A
09DE1: A0 37         LDY   #$37
09DE3: A9 C2         LDA   #$C2
09DE5: 8D 6E 20      STA   $206E
09DE8: A9 9F         LDA   #$9F
09DEA: 8D 6F 20      STA   $206F
09DED: 60            RTS 
09DEE: 44 EF         BSR   $9DDF
09DF0: 20 40 9E      JSR   $9E40
09DF3: 20 BE 9D      JSR   $9DBE
09DF6: 20 06 5F      JSR   $5F06
09DF9: C9 01         CMP   #$01
09DFB: 60            RTS 
09DFC: 44 0E         BSR   $9E0C
09DFE: 20 3A 5F      JSR   $5F3A
09E01: C9 01         CMP   #$01
09E03: B0 06         BCS   $9E0B
09E05: 44 1C         BSR   $9E23
09E07: 20 85 9E      JSR   $9E85
09E0A: 18            CLC 
09E0B: 60            RTS 
09E0C: A9 A4         LDA   #$A4
09E0E: 85 F8         STA   $F8
09E10: A9 5F         LDA   #$5F
09E12: 85 F9         STA   $F9
09E14: A9 3C         LDA   #$3C
09E16: 85 FA         STA   $FA
09E18: A9 37         LDA   #$37
09E1A: 85 FB         STA   $FB
09E1C: A9 02         LDA   #$02
09E1E: 85 FC         STA   $FC
09E20: 64 FD         STZ   $FD
09E22: 60            RTS 
09E23: A2 3C         LDX   #$3C
09E25: A0 37         LDY   #$37
09E27: A9 CA         LDA   #$CA
09E29: 8D 6E 20      STA   $206E
09E2C: A9 9F         LDA   #$9F
09E2E: 8D 6F 20      STA   $206F
09E31: 60            RTS 
09E32: 44 EF         BSR   $9E23
09E34: 20 40 9E      JSR   $9E40
09E37: 20 0C 9E      JSR   $9E0C
09E3A: 20 06 5F      JSR   $5F06
09E3D: C9 01         CMP   #$01
09E3F: 60            RTS 
09E40: 20 10 9F      JSR   $9F10
09E43: C2            CLY 
09E44: 44 2D         BSR   $9E73
09E46: F0 04         BEQ   $9E4C
09E48: 44 0C         BSR   $9E56
09E4A: 80 F8         BRA   $9E44
09E4C: 20 20 9F      JSR   $9F20
09E4F: AE 70 20      LDX   $2070
09E52: AC 71 20      LDY   $2071
09E55: 60            RTS 
09E56: 5A            PHY 
09E57: C2            CLY 
09E58: B1 F8         LDA   ($F8),Y
09E5A: C8            INY 
09E5B: A2 08         LDX   #$08
09E5D: E4 FA         CPX   $FA
09E5F: F0 08         BEQ   $9E69
09E61: 90 06         BCC   $9E69
09E63: 2A            ROL 
09E64: CA            DEX 
09E65: D0 F6         BNE   $9E5D
09E67: 80 EF         BRA   $9E58
09E69: 2A            ROL 
09E6A: 20 40 9F      JSR   $9F40
09E6D: C6 FA         DEC   $FA
09E6F: D0 F3         BNE   $9E64
09E71: 7A            PLY 
09E72: 60            RTS 
09E73: B1 6E         LDA   ($6E),Y
09E75: 85 F8         STA   $F8
09E77: C8            INY 
09E78: B1 6E         LDA   ($6E),Y
09E7A: 85 F9         STA   $F9
09E7C: C8            INY 
09E7D: AA            TAX 
09E7E: B1 6E         LDA   ($6E),Y
09E80: 85 FA         STA   $FA
09E82: C8            INY 
09E83: E8            INX 
09E84: 60            RTS 
09E85: 20 10 9F      JSR   $9F10
09E88: C2            CLY 
09E89: 44 E8         BSR   $9E73
09E8B: F0 04         BEQ   $9E91
09E8D: 44 04         BSR   $9E93
09E8F: 80 F8         BRA   $9E89
09E91: 80 BC         BRA   $9E4F
09E93: 5A            PHY 
09E94: C2            CLY 
09E95: A2 08         LDX   #$08
09E97: 62            CLA 
09E98: 20 25 9F      JSR   $9F25
09E9B: 2A            ROL 
09E9C: C6 FA         DEC   $FA
09E9E: F0 08         BEQ   $9EA8
09EA0: CA            DEX 
09EA1: D0 F5         BNE   $9E98
09EA3: 91 F8         STA   ($F8),Y
09EA5: C8            INY 
09EA6: 80 ED         BRA   $9E95
09EA8: 91 F8         STA   ($F8),Y
09EAA: 7A            PLY 
09EAB: 60            RTS 
09EAC: C2            CLY 
09EAD: 44 2B         BSR   $9EDA
09EAF: F0 10         BEQ   $9EC1
09EB1: B2 F8         LDA   ($F8)
09EB3: 10 03         BPL   $9EB8
09EB5: B9 F4 9E      LDA   $9EF4,Y
09EB8: 92 FA         STA   ($FA)
09EBA: 98            TYA 
09EBB: 18            CLC 
09EBC: 69 05         ADC   #$05
09EBE: A8            TAY 
09EBF: 80 EC         BRA   $9EAD
09EC1: 60            RTS 
09EC2: C2            CLY 
09EC3: 44 15         BSR   $9EDA
09EC5: F0 12         BEQ   $9ED9
09EC7: B2 FA         LDA   ($FA)
09EC9: D9 F4 9E      CMP   $9EF4,Y
09ECC: D0 02         BNE   $9ED0
09ECE: A9 FF         LDA   #$FF
09ED0: 92 F8         STA   ($F8)
09ED2: 98            TYA 
09ED3: 18            CLC 
09ED4: 69 05         ADC   #$05
09ED6: A8            TAY 
09ED7: 80 EA         BRA   $9EC3
09ED9: 60            RTS 
09EDA: B9 F2 9E      LDA   $9EF2,Y
09EDD: 85 FA         STA   $FA
09EDF: B9 F3 9E      LDA   $9EF3,Y
09EE2: 85 FB         STA   $FB
09EE4: B9 F0 9E      LDA   $9EF0,Y
09EE7: 85 F8         STA   $F8
09EE9: B9 F1 9E      LDA   $9EF1,Y
09EEC: 85 F9         STA   $F9
09EEE: 1A            INC 
09EEF: 60            RTS 
09EF0: 65 FC         ADC   $FC
09EF2: EE 36 07      INC   $0736
09EF5: 66 FC         ROR   $FC
09EF7: EF 36 07      BBS6  $36, $9F01
09EFA: 67 FC         RMB6  $FC
09EFC: F0 36         BEQ   $9F34
09EFE: 07 68         RMB0  $68
09F00: FC            ??? 
09F01: F1 36         SBC   ($36),Y
09F03: 3F 69 FC      BBR3  $69, $9F02
09F06: F2 36         SBC   ($36)
09F08: 07 6A         RMB0  $6A
09F0A: FC            ??? 
09F0B: F3 36 07 FF FF 86 72  TAI   $0736, $FFFF, $7286
09F12: 84 73         STY   $73
09F14: 64 70         STZ   $70
09F16: 64 71         STZ   $71
09F18: A9 80         LDA   #$80
09F1A: 85 75         STA   $75
09F1C: 60            RTS 
09F1D: 18            CLC 
09F1E: 44 20         BSR   $9F40
09F20: A5 75         LDA   $75
09F22: 10 F9         BPL   $9F1D
09F24: 60            RTS 
09F25: 06 75         ASL   $75
09F27: 90 14         BCC   $9F3D
09F29: 26 75         ROL   $75
09F2B: 48            PHA 
09F2C: B2 72         LDA   ($72)
09F2E: 85 74         STA   $74
09F30: 68            PLA 
09F31: E6 72         INC   $72
09F33: D0 02         BNE   $9F37
09F35: E6 73         INC   $73
09F37: E6 70         INC   $70
09F39: D0 02         BNE   $9F3D
09F3B: E6 71         INC   $71
09F3D: 26 74         ROL   $74
09F3F: 60            RTS 
09F40: 26 74         ROL   $74
09F42: 46 75         LSR   $75
09F44: 90 14         BCC   $9F5A
09F46: 66 75         ROR   $75
09F48: 48            PHA 
09F49: A5 74         LDA   $74
09F4B: 92 72         STA   ($72)
09F4D: 68            PLA 
09F4E: E6 72         INC   $72
09F50: D0 02         BNE   $9F54
09F52: E6 73         INC   $73
09F54: E6 70         INC   $70
09F56: D0 02         BNE   $9F5A
09F58: E6 71         INC   $71
09F5A: 60            RTS 
09F5B: DF 5F 08      BBS5  $5F, $9F66
09F5E: 6C FC 08      JMP   ($08FC)
09F61: 1E FC 0D      ASL   $0DFC,X
09F64: 4E FC 09      LSR   $09FC
09F67: 52 FC         EOR   ($FC)
09F69: 08            PHP 
09F6A: 56 FC         LSR   $FC,X
09F6C: 11 62         ORA   ($62),Y
09F6E: FC            ??? 
09F6F: 11 55         ORA   ($55),Y
09F71: FC            ??? 
09F72: 06 20         ASL   $20
09F74: FC            ??? 
09F75: 38            SEC 
09F76: 27 FC         RMB2  $FC
09F78: 08            PHP 
09F79: 28            PLP 
09F7A: FC            ??? 
09F7B: 08            PHP 
09F7C: 29 FC         AND   #$FC
09F7E: 08            PHP 
09F7F: 2A            ROL 
09F80: FC            ??? 
09F81: 08            PHP 
09F82: 2B            ??? 
09F83: FC            ??? 
09F84: 08            PHP 
09F85: 1B            ??? 
09F86: F8            SED 
09F87: 0A            ASL 
09F88: 2C FC F0      BIT   $F0FC
09F8B: 72 FC         ADC   ($FC)
09F8D: 08            PHP 
09F8E: 73 FC 08 74 FC 01 EE  TII   $08FC, $FC74, $EE01
09F95: 36 03         ROL   $03,X
09F97: EF 36 03      BBS6  $36, $9F9D
09F9A: F0 36         BEQ   $9FD2
09F9C: 03 F1         ST0   #$F1
09F9E: 36 06         ROL   $06,X
09FA0: F2 36         SBC   ($36)
09FA2: 03 F3         ST0   #$F3
09FA4: 36 03         ROL   $03,X
09FA6: FF FF DF      BBS7  $FF, $9F88
09FA9: 5F 08 6C      BBR5  $08, $A018
09FAC: FC            ??? 
09FAD: 08            PHP 
09FAE: 1E FC 0D      ASL   $0DFC,X
09FB1: 4E FC 09      LSR   $09FC
09FB4: 52 FC         EOR   ($FC)
09FB6: 08            PHP 
09FB7: 56 FC         LSR   $FC,X
09FB9: 11 62         ORA   ($62),Y
09FBB: FC            ??? 
09FBC: 11 55         ORA   ($55),Y
09FBE: FC            ??? 
09FBF: 06 FF         ASL   $FF
09FC1: FF 61 20      BBS7  $61, $9FE4
09FC4: 08            PHP 
09FC5: 62            CLA 
09FC6: 20 08 FF      JSR   $FF08
09FC9: FF BA FC      BBS7  $BA, $9FC8
09FCC: 08            PHP 
09FCD: E0 5F         CPX   #$5F
09FCF: 05 16         ORA   $16
09FD1: F8            SED 
09FD2: 01 4D         ORA   ($4D,X)
09FD4: FC            ??? 
09FD5: 01 59         ORA   ($59,X)
09FD7: FC            ??? 
09FD8: 01 FF         ORA   ($FF,X)
09FDA: FF 00 00      BBS7  $00, $9FDD
09FDD: 00            BRK 
09FDE: 00            BRK 
09FDF: 00            BRK 
09FE0: 00            BRK 
09FE1: 00            BRK 
09FE2: 00            BRK 
09FE3: 00            BRK 
09FE4: 00            BRK 
09FE5: 00            BRK 
09FE6: 00            BRK 
09FE7: 00            BRK 
09FE8: 00            BRK 
09FE9: 00            BRK 
09FEA: 00            BRK 
09FEB: 00            BRK 
09FEC: 00            BRK 
09FED: 00            BRK 
09FEE: 00            BRK 
09FEF: 00            BRK 
09FF0: 00            BRK 
09FF1: 00            BRK 
09FF2: 00            BRK 
09FF3: 00            BRK 
09FF4: 00            BRK 
09FF5: 00            BRK 
09FF6: 00            BRK 
09FF7: 00            BRK 
09FF8: 00            BRK 
09FF9: 00            BRK 
09FFA: 00            BRK 
09FFB: 00            BRK 
09FFC: 00            BRK 
09FFD: 00            BRK 
09FFE: 00            BRK 
09FFF: 00            BRK 

;*********************************************************************************
;
; CD System Card BIOS
;
; Comments by zeo and those other crazy pce folks
;
;*********************************************************************************

e000: 4c f3 e0    JMP $e0f3     ; CD_BOOT
e003: 4c e3 e8    JMP $e8e3     ; CD_RESET
e006: 4c 8f eb    JMP $eb8f     ; CD_BASE
e009: 4c 05 ec    JMP $ec05     ; CD_READ
e00c: 4c cb ed    JMP $edcb     ; CD_SEEK
e00f: 4c ec eb    JMP $ebec     ; CD_EXEC
e012: 4c 10 ee    JMP $ee10     ; CD_PLAY
e015: 4c 34 ef    JMP $ef34     ; CD_SEARCH
e018: 4c 94 ef    JMP $ef94     ; CD_PAUSE
e01b: 4c 47 f3    JMP $f347     ; CD_STAT
e01e: 4c bf ef    JMP $efbf     ; CD_SUBQ
e021: 4c f1 ef    JMP $eff1     ; CD_DINFO
e024: 4c a9 f0    JMP $f0a9     ; CD_CONTNTS
e027: 4c 54 f3    JMP $f354     ; CD_SUBRD
e02a: 4c 64 f3    JMP $f364     ; CD_PCMRD
e02d: 4c 79 f3    JMP $f379     ; CD_FADE

e030: 4c 7f f3    JMP $f37f     ; AD_RESET
e033: 4c 93 f3    JMP $f393     ; AD_TRANS
e036: 4c 07 f4    JMP $f407     ; AD_READ
e039: 4c d8 f4    JMP $f4d8     ; AD_WRITE
e03c: 4c c6 f5    JMP $f5c6     ; AD_PLAY
e03f: 4c 1f f6    JMP $f61f     ; AD_CPLAY
e042: 4c c1 f6    JMP $f6c1     ; AD_STOP
e045: 4c db f6    JMP $f6db     ; AD_STAT

e048: 4c 58 f8    JMP $f858     ; BM_FORMAT
e04b: 4c b8 f8    JMP $f8b8     ; BM_FREE
e04e: 4c e3 f8    JMP $f8e3     ; BM_READ
e051: 4c 55 f9    JMP $f955     ; BM_WRITE
e054: 4c 1a fa    JMP $fa1a     ; BM_DELETE
e057: 4c 72 fa    JMP $fa72     ; BM_FILES

e05a: 4c 2d f0    JMP $f02d     ; EX_GETVER
e05d: 4c 34 f0    JMP $f034     ; EX_SETVEC
e060: 4c 24 f1    JMP $f124     ; EX_GETFNT
e063: 4c 9a e4    JMP $e49a     ; EX_JOYSNS
e066: 4c 75 e1    JMP $e175     ; EX_JOYREP

e069: 4c 67 e2    JMP $e267     ; EX_SCRSIZ
e06c: 4c 72 e2    JMP $e272     ; EX_DOTMOD
e06f: 4c 9d e2    JMP $e29d     ; EX_SCRMOD
e072: 4c 82 e3    JMP $e382     ; EX_IMODE
e075: 4c 91 e3    JMP $e391     ; EX_VMODE
e078: 4c a4 e3    JMP $e3a4     ; EX_HMODE
e07b: 4c b5 e3    JMP $e3b5     ; EX_VSYNC
e07e: 4c c7 e3    JMP $e3c7     ; EX_RCRON
e081: 4c cb e3    JMP $e3cb     ; EX_RCROFF
e084: 4c cf e3    JMP $e3cf     ; EX_IRQON
e087: 4c d3 e3    JMP $e3d3     ; EX_IRQOFF
e08a: 4c e2 e3    JMP $e3e2     ; EX_BGON
e08d: 4c e5 e3    JMP $e3e5     ; EX_BGOFF
e090: 4c e8 e3    JMP $e3e8     ; EX_SPRON
e093: 4c eb e3    JMP $e3eb     ; EX_SPROFF
e096: 4c ee e3    JMP $e3ee     ; EX_DSPON
e099: 4c f3 e3    JMP $e3f3     ; EX_DSPOFF
e09c: 4c f8 e3    JMP $e3f8     ; EX_DMAMOD
e09f: 4c 0b e4    JMP $e40b     ; EX_SPRDMA
e0a2: 4c da e5    JMP $e5da     ; EX_SATCLR
e0a5: 4c 3c e6    JMP $e63c     ; EX_SPRPUT
e0a8: 4c 1f e4    JMP $e41f     ; EX_SETRCR
e0ab: 4c 2f e4    JMP $e42f     ; EX_SETRED
e0ae: 4c 46 e4    JMP $e446     ; EX_SETWRT
e0b1: 4c 5d e4    JMP $e45d     ; EX_SETDMA
e0b4: 4c 21 e6    JMP $e621     ; EX_BINBCD
e0b7: 4c 00 e6    JMP $e600     ; EX_BCDBIN
e0ba: 4c 7e e6    JMP $e67e     ; EX_RND
e0bd: 4c c6 fd    JMP $fdc6     ; MA_MUL8U
e0c0: 4c bf fd    JMP $fdbf     ; MA_MUL8S
e0c3: 4c d4 fd    JMP $fdd4     ; MA_MUL16U
e0c6: 4c e2 fd    JMP $fde2     ; MA_DIV16U?
e0c9: 4c e9 fd    JMP $fde9     ; MA_DIV16S?
e0cc: 4c f0 fd    JMP $fdf0     ; MA_SQRT
e0cf: 4c fe fd    JMP $fdfe     ; MA_SIN
e0d2: 4c f7 fd    JMP $fdf7     ; MA_COS
e0d5: 4c 05 fe    JMP $fe05     ; MA_ATNI
e0d8: 4c 0c fe    JMP $fe0c     ; PSG_BIOS
e0db: 4c 57 fe    JMP $fe57     ; GRP_BIOS
e0de: 4c 92 fe    JMP $fe92     ; EX_MEMOPEN
e0e1: 4c cf e6    JMP $e6cf
e0e4: 4c 09 e5    JMP $e509     ; EX_COLORCMD
e0e7: 4c 30 f7    JMP $f730
e0ea: 4c 6c f7    JMP $f76c
e0ed: 4c cd fd    JMP $fdcd     ; MA_MUL16S
e0f0: 4c db fd    JMP $fddb     ; MA_CBASIS

CD_BOOT:

e0f3: 78          SEI           ; disable interruptions
e0f4: d4          CSH           ; set hi speed for cpu
e0f5: d8          CLD           ; clear decimal flag
e0f6: a2 ff       LDX #$ff      ; X = $ff
e0f8: 9a          TXS           ; S = $ff
e0f9: 8a          TXA           ; A = $ff
e0fa: 53 01       TAM #$01      ; MMR1 = $ff, hardware

e0fc: a9 f8       LDA #$f8      
e0fe: 53 02       TAM #$02      ; MMR2 = $f8, 8kb scratch pad

e100: 44 38       BSR $e13a     ; init_mmap

e102: a9 01       LDA #$01
e104: 53 40       TAM #$40      ; MMR7 = $01

e106: 20 0f cb    JSR $cb0f     ; 01:proc_01
					  ; this function inits cd, adpcm, io stuff and display 
					  ; the main picture

e109: 20 60 c8    JSR $c860     ; 01:proc_02

e10c: aa          TAX
e10d: f0 09       BEQ $e118
e10f: 44 29       BSR $e13a     ; init_mmap

e111: a9 03       LDA #$03
e113: 53 40       TAM #$40
e115: 4c 78 cf    JMP $cf78

e118: 20 a9 f0    JSR $f0a9     ; CD_CONTNTS

e11b: 44 2f       BSR $e14c     ; search for Code track

e11d: 90 0d       BCC $e12c     ; if carry cleared, we've not found a code track
				; so let's fire the Cd player

e11f: a9 01       LDA #$01
e121: 53 40       TAM #$40
				; display load error message?
e123: 20 03 cb    JSR $cb03     ; 01:proc_03
				; reset system?
e126: 20 54 cb    JSR $cb54     ; 01:proc_04
e129: 4c 09 e1    JMP $e109

				; this is probably the entry point for the CD
				; audio player.
e12c: a9 04       LDA #$04
e12e: 44 0d       BSR $e13d
e130: 4c 00 40    JMP $4000

e133: a9 17       LDA #$17
e135: 44 06       BSR $e13d
e137: 4c 00 40    JMP $4000

init_mmap:
				; sets up some memory mapping
e13a: ad f5 ff    LDA $fff5     ; A = #$80

e13d: 53 04       TAM #$04
e13f: 1a          INC a
e140: 53 08       TAM #$08
e142: 1a          INC a
e143: 53 10       TAM #$10
e145: 1a          INC a
e146: 53 20       TAM #$20
e148: 1a          INC a
e149: 53 40       TAM #$40
e14b: 60          RTS

				; this routine appears to loop through each
				; track on the CD looking for the first data
				; track.

e14c: ad 6a 22    LDA $226a     ; first Cd track (BCD)

e14f: 48          PHA

e150: 85 f9       STA $f9       ; _ah = # of track to check

e152: a9 02       LDA #$02
e154: 85 f8       STA $f8       ; _al = 2, mode check track info

e156: a9 56       LDA #$56
e158: 85 fa       STA $fa
e15a: a9 22       LDA #$22
e15c: 85 fb       STA $fb       ; set BX to $2256
				; buffer containing result

e15e: 20 f1 ef    JSR $eff1     ; CD_DINFO

e161: 68          PLA
				; check for data track?
e162: 93 04 59 22 TST #$04, $2259
e166: d0 0e       BNE $e176

e168: cd 6b 22    CMP $226b     ; compare the current track number witht
				; last track number

e16b: b0 07       BCS $e174     ; if we've checked the last track, go on

e16d: f8          SED           ; else, add one in BCD mode and go on
e16e: 18          CLC
e16f: 69 01       ADC #$01
e171: d8          CLD

e172: 80 db       BRA $e14f     ; almost beginning of this routine (w/o init)

e174: 18          CLC           ; No code track found value

EX_JOYREP:
				; it's an RTS???
e175: 60          RTS           ; zeo : YES  !!!
				; I'd would tend to say there were a 
				; misconception. Maybe this would have done what's
				; integrated to hardware now, who knows ?


				; this routine appears to start a game CD
				; zeo: it's called when a code track is encountered

e176: 8d 69 22    STA $2269     ; store the current track number (containing code)
				; in ($2269)

				; does weird stuff (CD address calculation?)
e179: 20 17 cc    JSR $cc17     ; zeo : I cut one of my balls if this is not
				; a routine that convert MSF value in lba one
				; convert the value at ($2256-$2258)
				; I think the result is in ($20F8-$20FA)

e17c: 73 f8 20 74 22 03 00    TII $20f8, $2274, $0003
				; store the address of the first sector of 
				; code track to ($2274) (zeo, ?)

e183: 73 f8 20 77 22 03 00    TII $20f8, $2277, $0003
				; also store the same value at ($2277)

e18a: 64 fc       STZ $fc
e18c: 64 fd       STZ $fd
e18e: 64 fe       STZ $fe       ; ($fc-$fe) = 0

e190: a9 00       LDA #$00
e192: 85 fa       STA $fa
e194: a9 28       LDA #$28
e196: 85 fb       STA $fb       ; _BX = $2800

e198: a9 01       LDA #$01
e19a: 85 ff       STA $ff       ; _dh = 1

e19c: 1a          INC a
e19d: 85 f8       STA $f8
e19f: 64 f9       STZ $f9       ; _AX = 2

e1a1: 20 05 ec    JSR $ec05     ; CD_READ
				; read two sectors from beginning of code
				; track, and store them at $2800


				; this block appears to check some sort of
				; signature.
e1a4: a9 1f       LDA #$1f
e1a6: 53 40       TAM #$40
				; from the CD boot block
e1a8: a9 00       LDA #$00
e1aa: 85 ec       STA $ec
e1ac: a9 28       LDA #$28
e1ae: 85 ed       STA $ed       ; ($ec-$ed) = $2800
				; place where sectors have been read

				; with what?
e1b0: a9 e1       LDA #$e1
e1b2: 85 ee       STA $ee
e1b4: a9 da       LDA #$da
e1b6: 85 ef       STA $ef       ; ($ee-ef) = $dae1
				; constant array in Cd system (zeo ?)

				; some 0x04d5 bytes long?
e1b8: a9 d5       LDA #$d5
e1ba: 85 fc       STA $fc
e1bc: a9 04       LDA #$04
e1be: 85 fd       STA $fd       ; _CX = $4D5

e1c0: b2 ec       LDA ($ec)
e1c2: d2 ee       CMP ($ee)
e1c4: d0 43       BNE $e209     ; compare read sector and signature, 
				; go to $e209 on failure

e1c6: e6 ec       INC $ec
e1c8: d0 02       BNE $e1cc
e1ca: e6 ed       INC $ed       ; ($ec-$ed) ++

e1cc: e6 ee       INC $ee
e1ce: d0 02       BNE $e1d2
e1d0: e6 ef       INC $ef       ; ($ee-$ef) ++

e1d2: a5 fc       LDA $fc
e1d4: d0 02       BNE $e1d8
e1d6: c6 fd       DEC $fd
e1d8: c6 fc       DEC $fc       ; _CX --

e1da: a5 fc       LDA $fc
e1dc: 05 fd       ORA $fd
e1de: d0 e0       BNE $e1c0     ; if _CX!=0 continue checking signature

				; at this point the signature appears okay.
				; this appears to make sure that the next 0x4a
				; bytes are zero
e1e0: a9 4a       LDA #$4a
e1e2: 85 fc       STA $fc
e1e4: a9 00       LDA #$00
e1e6: 85 fd       STA $fd       ; _CX = $4A

e1e8: b2 ec       LDA ($ec)
e1ea: d0 1d       BNE $e209     ; is this byte nul ?
				; if not, quit with error value in carry

e1ec: e6 ec       INC $ec
e1ee: d0 02       BNE $e1f2
e1f0: e6 ed       INC $ed       ; ($ec-$ed) ++

e1f2: e6 ee       INC $ee
e1f4: d0 02       BNE $e1f8
e1f6: e6 ef       INC $ef       ; ($ee-$ef) ++ (zeo : useless ?)

e1f8: a5 fc       LDA $fc
e1fa: d0 02       BNE $e1fe
e1fc: c6 fd       DEC $fd
e1fe: c6 fc       DEC $fc       ; _CX --

e200: a5 fc       LDA $fc
e202: 05 fd       ORA $fd
e204: d0 e2       BNE $e1e8     ; if _CX != 0, continue checking nullity


				; ??? this is an address in the CD boot block
e206: 20 26 2b    JSR $2b26     ; zeo : certainly execute boot code


e209: 38          SEC           ; signal we've found a Code track
				; or that signature is incorrect (zeo)

e20a: 60          RTS


				; an error handler, perhaps?
				; this looks like it decides if an error
				; condition is fatal
e20b: c9 06       CMP #$06
e20d: f0 54       BEQ $e263     ; => ret_loc with success return value
e20f: c9 02       CMP #$02
e211: d0 50       BNE $e263     ; => ret_loc with success return value

				; copies command buffer to a backup buffer?
e213: a0 09       LDY #$09
e215: b9 4c 22    LDA $224c, Y
e218: 99 91 22    STA $2291, Y
e21b: 88          DEY
e21c: 10 f7       BPL $e215

e21e: 20 53 f0    JSR $f053     ; load ($227c) and ($227d) with info bufer[2] & [9]
					; from command 0x03

e221: ad 7c 22    LDA $227c     ; $227c = unknown (result code?)
e224: f0 3d       BEQ $e263     ; ($227c) = 0 e.g. when command 3 not implemented
					; or when error issuing command

e226: c9 04       CMP #$04
e228: d0 05       BNE $e22f
e22a: 8d 47 22    STA $2247     ; ($2247) = ($227c)
e22d: 80 34       BRA $e263

e22f: c9 0b       CMP #$0b
e231: f0 32       BEQ $e265
e233: c9 0d       CMP #$0d
e235: f0 2e       BEQ $e265

e237: c9 11       CMP #$11
e239: f0 28       BEQ $e263
e23b: c9 15       CMP #$15
e23d: f0 24       BEQ $e263
e23f: c9 16       CMP #$16
e241: f0 20       BEQ $e263
e243: c9 1c       CMP #$1c
e245: f0 1e       BEQ $e265
e247: c9 1d       CMP #$1d
e249: f0 1a       BEQ $e265
e24b: c9 20       CMP #$20
e24d: f0 16       BEQ $e265
e24f: c9 21       CMP #$21
e251: f0 12       BEQ $e265
e253: c9 22       CMP #$22
e255: f0 0e       BEQ $e265
e257: c9 25       CMP #$25
e259: f0 0a       BEQ $e265
e25b: c9 2a       CMP #$2a
e25d: f0 06       BEQ $e265
e25f: c9 2c       CMP #$2c
e261: f0 02       BEQ $e265

e263: 18          CLC
e264: 60          RTS

e265: 38          SEC
e266: 60          RTS

EX_SCRSIZ:

e267: 29 07       AND #$07
e269: 0a          ASL a
e26a: 0a          ASL a
e26b: 0a          ASL a
e26c: 0a          ASL a
e26d: a8          TAY           ; Y = (A&7) << 4
e26e: a9 8f       LDA #$8f      ; A = $8f
e270: 80 05       BRA $e277

EX_DOTMOD:

e272: 29 8f       AND #$8f
e274: a8          TAY           ; Y = (A & $8f)
e275: a9 70       LDA #$70      ; A = $70

e277: 2d 42 22    AND $2242
e27a: 8d 42 22    STA $2242     ; ($2242) &= A

e27d: 98          TYA           ; Y = A, maybe A recover 'initial' value

e27e: 0d 42 22    ORA $2242
e281: 8d 42 22    STA $2242     ; ($2242) |= A

e284: a9 09       LDA #$09
e286: 85 f7       STA $f7
e288: 8d 00 00    STA $0000     ; set VDC mode 9 (don't remember what is for, [zeo] )

e28b: ad 42 22    LDA $2242
e28e: 8d 02 00    STA $0002     ; send the 'cooked' byte as data

e291: 60          RTS

e292: 62          CLA
e293: a2 20       LDX #$20
e295: a0 1e       LDY #$1e
e297: 44 04       BSR $e29d
e299: a9 01       LDA #$01
e29b: 38          SEC
e29c: 60          RTS

EX_SCRMOD:

e29d: 8d 44 22    STA $2244
e2a0: 29 05       AND #$05
e2a2: 8d 44 22    STA $2244
e2a5: 8e 45 22    STX $2245
e2a8: 8c 46 22    STY $2246
e2ab: ad 46 22    LDA $2246
e2ae: c9 0a       CMP #$0a
e2b0: 90 e0       BCC $e292
e2b2: c9 1f       CMP #$1f
e2b4: b0 dc       BCS $e292
e2b6: 93 01 44 22 TST #$01, $2244
e2ba: d0 42       BNE $e2fe
e2bc: ad 45 22    LDA $2245
e2bf: c9 0a       CMP #$0a
e2c1: 90 cf       BCC $e292
e2c3: c9 23       CMP #$23
e2c5: b0 cb       BCS $e292
e2c7: 44 78       BSR $e341
e2c9: a9 0a       LDA #$0a
e2cb: 85 f7       STA $f7
e2cd: 8d 00 00    STA $0000
e2d0: 13 02       ST1 #$02
e2d2: ad 45 22    LDA $2245
e2d5: aa          TAX
e2d6: ca          DEX
e2d7: 4a          LSR a
e2d8: 49 ff       EOR #$ff
e2da: 18          CLC
e2db: 69 13       ADC #$13
e2dd: 8d 03 00    STA $0003
e2e0: 18          CLC
e2e1: 6d 45 22    ADC $2245
e2e4: 49 ff       EOR #$ff
e2e6: a8          TAY
e2e7: a9 0b       LDA #$0b
e2e9: 85 f7       STA $f7
e2eb: 8d 00 00    STA $0000
e2ee: 8e 02 00    STX $0002
e2f1: 98          TYA
e2f2: 18          CLC
e2f3: 69 27       ADC #$27
e2f5: 8d 03 00    STA $0003
e2f8: 62          CLA
e2f9: 20 72 e2    JSR $e272
e2fc: 18          CLC
e2fd: 60          RTS

e2fe: ad 45 22    LDA $2245
e301: c9 10       CMP #$10
e303: 90 8d       BCC $e292
e305: c9 2d       CMP #$2d
e307: b0 89       BCS $e292
e309: 44 36       BSR $e341
e30b: a9 0a       LDA #$0a
e30d: 85 f7       STA $f7
e30f: 8d 00 00    STA $0000
e312: 13 03       ST1 #$03
e314: ad 45 22    LDA $2245
e317: aa          TAX
e318: ca          DEX
e319: 4a          LSR a
e31a: 49 ff       EOR #$ff
e31c: 18          CLC
e31d: 69 19       ADC #$19
e31f: 8d 03 00    STA $0003
e322: 18          CLC
e323: 6d 45 22    ADC $2245
e326: 49 ff       EOR #$ff
e328: a8          TAY
e329: a9 0b       LDA #$0b
e32b: 85 f7       STA $f7
e32d: 8d 00 00    STA $0000
e330: 8e 02 00    STX $0002
e333: 98          TYA
e334: 18          CLC
e335: 69 35       ADC #$35
e337: 8d 03 00    STA $0003
e33a: a9 0a       LDA #$0a
e33c: 20 72 e2    JSR $e272
e33f: 18          CLC
e340: 60          RTS
e341: a9 0c       LDA #$0c
e343: 85 f7       STA $f7
e345: 8d 00 00    STA $0000
e348: 13 02       ST1 #$02
e34a: ad 46 22    LDA $2246
e34d: 0a          ASL a
e34e: 0a          ASL a
e34f: 0a          ASL a
e350: aa          TAX
e351: ca          DEX
e352: 4a          LSR a
e353: 49 ff       EOR #$ff
e355: 18          CLC
e356: 69 88       ADC #$88
e358: 8d 03 00    STA $0003
e35b: a9 0d       LDA #$0d
e35d: 85 f7       STA $f7
e35f: 8d 00 00    STA $0000
e362: 8e 02 00    STX $0002
e365: 23 00       ST2 #$00
e367: a9 0e       LDA #$0e
e369: 85 f7       STA $f7
e36b: 8d 00 00    STA $0000
e36e: 8a          TXA
e36f: 1a          INC a
e370: 1a          INC a
e371: 4a          LSR a
e372: 69 7d       ADC #$7d
e374: 8d 02 00    STA $0002
e377: 23 00       ST2 #$00
e379: ad 44 22    LDA $2244
e37c: 49 04       EOR #$04
e37e: 8d 00 04    STA $0400
e381: 60          RTS

EX_IMODE:

; set R/W auto increment value
; A = $00, increment by 1
;     $01,                      32
;       $02,                    64
;       $03,                    128

e382: 37 f4       RMB3 $f4
e384: 47 f4       RMB4 $f4      ; ($f4) |= 0x18

e386: 0a          ASL a
e387: 0a          ASL a
e388: 0a          ASL a
e389: 29 18       AND #$18
e38b: 05 f4       ORA $f4
e38d: 85 f4       STA $f4       ; ($f4) |= A << 3;

e38f: 80 17       BRA $e3a8

EX_VMODE:

e391: b7 f4       SMB3 $f4
e393: ad 42 22    LDA $2242
e396: 29 30       AND #$30
e398: f0 0c       BEQ $e3a6
e39a: c7 f4       SMB4 $f4
e39c: 29 01       AND #$01
e39e: d0 08       BNE $e3a8
e3a0: 37 f4       RMB3 $f4
e3a2: 80 04       BRA $e3a8

EX_HMODE:

e3a4: 37 f4       RMB3 $f4
e3a6: 47 f4       RMB4 $f4

e3a8: a9 05       LDA #$05
e3aa: 85 f7       STA $f7
e3ac: 8d 00 00    STA $0000
e3af: a5 f4       LDA $f4
e3b1: 8d 03 00    STA $0003
e3b4: 60          RTS

EX_VSYNC:

e3b5: 9f f5 0e    BBS1 $f5, $e3c6       ; if ($f5 & 0x02), exit

e3b8: 58          CLI                   ; enable interrupt ?

e3b9: bf f3 02    BBS3 $f3, $e3be       ; if ($f3 & 0x08), don't enable IRQ

e3bc: 44 11       BSR $e3cf     ; EX_IRQON

e3be: ad 41 22    LDA $2241     ; A = ($2241)

e3c1: cd 41 22    CMP $2241
e3c4: f0 fb       BEQ $e3c1     ; while (A==($2241=)) do ;

e3c6: 60          RTS

EX_RCRON:

e3c7: a7 f3       SMB2 $f3      ; ($f3) |= 0x04
e3c9: 80 0a       BRA $e3d5

EX_RCROFF:

e3cb: 27 f3       RMB2 $f3      ; ($f3) &= ~0x04
e3cd: 80 06       BRA $e3d5

EX_IRQON:

e3cf: b7 f3       SMB3 $f3      ; ($f3) |= 0x04
e3d1: 80 02       BRA $e3d5

EX_IRQOFF:

e3d3: 37 f3       RMB3 $f3      ; ($f3) &= ~ 0x04

e3d5: a9 05       LDA #$05
e3d7: 85 f7       STA $f7
e3d9: 8d 00 00    STA $0000     ; set VDC mode 5 (?)

e3dc: a5 f3       LDA $f3       ; send data byte
e3de: 8d 02 00    STA $0002

e3e1: 60          RTS

EX_BGON:

e3e2: f7 f3       SMB7 $f3      ; ($f3) |= 128
e3e4: 60          RTS

EX_BGOFF:

e3e5: 77 f3       RMB7 $f3      ; ($f3) &= ~128
e3e7: 60          RTS

EX_SPRON:

e3e8: e7 f3       SMB6 $f3
e3ea: 60          RTS

EX_SPROFF:

e3eb: 67 f3       RMB6 $f3
e3ed: 60          RTS

EX_DSPON:

e3ee: e7 f3       SMB6 $f3
e3f0: f7 f3       SMB7 $f3
e3f2: 60          RTS

EX_DSPOFF:

e3f3: 67 f3       RMB6 $f3
e3f5: 77 f3       RMB7 $f3
e3f7: 60          RTS

EX_DMAMOD:

e3f8: 29 1f       AND #$1f
e3fa: 8d 43 22    STA $2243
e3fd: a9 0f       LDA #$0f
e3ff: 85 f7       STA $f7
e401: 8d 00 00    STA $0000
e404: ad 43 22    LDA $2243
e407: 8d 02 00    STA $0002
e40a: 60          RTS

EX_SPRDMA:

e40b: a9 13       LDA #$13
e40d: 85 f7       STA $f7
e40f: 8d 00 00    STA $0000
e412: ad 14 22    LDA $2214
e415: 8d 02 00    STA $0002
e418: ad 15 22    LDA $2215
e41b: 8d 03 00    STA $0003
e41e: 60          RTS

EX_SETRCR:

e41f: 48          PHA
e420: a9 06       LDA #$06
e422: 85 f7       STA $f7
e424: 8d 00 00    STA $0000
e427: 68          PLA
e428: 8d 02 00    STA $0002
e42b: 8e 03 00    STX $0003
e42e: 60          RTS

EX_SETRED:

e42f: 48          PHA
e430: a9 01       LDA #$01
e432: 85 f7       STA $f7
e434: 8d 00 00    STA $0000
e437: 68          PLA
e438: 8d 02 00    STA $0002
e43b: 8e 03 00    STX $0003
e43e: a9 02       LDA #$02
e440: 85 f7       STA $f7
e442: 8d 00 00    STA $0000
e445: 60          RTS

EX_SETWRT:

e446: 48          PHA
e447: a9 00       LDA #$00
e449: 85 f7       STA $f7
e44b: 8d 00 00    STA $0000
e44e: 68          PLA
e44f: 8d 02 00    STA $0002
e452: 8e 03 00    STX $0003
e455: a9 02       LDA #$02
e457: 85 f7       STA $f7
e459: 8d 00 00    STA $0000
e45c: 60          RTS

EX_SETDMA:

e45d: a5 f7       LDA $f7
e45f: 48          PHA
e460: a9 10       LDA #$10
e462: 85 f7       STA $f7
e464: 8d 00 00    STA $0000
e467: a5 fa       LDA $fa
e469: 8d 02 00    STA $0002
e46c: a5 fb       LDA $fb
e46e: 8d 03 00    STA $0003
e471: a9 11       LDA #$11
e473: 85 f7       STA $f7
e475: 8d 00 00    STA $0000
e478: a5 fe       LDA $fe
e47a: 8d 02 00    STA $0002
e47d: a5 ff       LDA $ff
e47f: 8d 03 00    STA $0003
e482: a9 12       LDA #$12
e484: 85 f7       STA $f7
e486: 8d 00 00    STA $0000
e489: a5 fc       LDA $fc
e48b: 8d 02 00    STA $0002
e48e: a5 fd       LDA $fd
e490: 8d 03 00    STA $0003
e493: 68          PLA
e494: 85 f7       STA $f7
e496: 8d 00 00    STA $0000
e499: 60          RTS

EX_JOYSNS:

e49a: a9 01       LDA #$01
e49c: 8d 00 10    STA $1000
e49f: a9 03       LDA #$03
e4a1: 8d 00 10    STA $1000
e4a4: c2          CLY
e4a5: a9 01       LDA #$01
e4a7: 8d 00 10    STA $1000
e4aa: 48          PHA
e4ab: 68          PLA
e4ac: ea          NOP
e4ad: ea          NOP
e4ae: b9 28 22    LDA $2228, Y
e4b1: 99 32 22    STA $2232, Y
e4b4: ad 00 10    LDA $1000
e4b7: 0a          ASL a
e4b8: 0a          ASL a
e4b9: 0a          ASL a
e4ba: 0a          ASL a
e4bb: 99 28 22    STA $2228, Y
e4be: 9c 00 10    STZ $1000
e4c1: 48          PHA
e4c2: 68          PLA
e4c3: ea          NOP
e4c4: ea          NOP
e4c5: ad 00 10    LDA $1000
e4c8: 29 0f       AND #$0f
e4ca: 19 28 22    ORA $2228, Y
e4cd: 49 ff       EOR #$ff
e4cf: 99 28 22    STA $2228, Y
e4d2: 59 32 22    EOR $2232, Y
e4d5: 39 28 22    AND $2228, Y
e4d8: 99 2d 22    STA $222d, Y
e4db: c8          INY
e4dc: c0 05       CPY #$05
e4de: 90 c5       BCC $e4a5
e4e0: c2          CLY
e4e1: ad 27 22    LDA $2227
e4e4: 39 04 e5    AND $e504, Y
e4e7: f0 15       BEQ $e4fe
e4e9: b9 2d 22    LDA $222d, Y
e4ec: c9 04       CMP #$04
e4ee: d0 0e       BNE $e4fe
e4f0: b9 28 22    LDA $2228, Y
e4f3: c9 0c       CMP #$0c
e4f5: d0 07       BNE $e4fe
e4f7: a9 80       LDA #$80
e4f9: 85 e7       STA $e7
e4fb: 6c 84 22    JMP ($2284)
e4fe: c8          INY
e4ff: c0 05       CPY #$05
e501: 90 de       BCC $e4e1
e503: 60          RTS

e504: 01 02       ORA ($02, X)
e506: 04 08       TSB $08
e508: 10 ad       BPL $e4b7

EX_COLORCMD:

e509: ad 1f 22    LDA $221f
e50c: d0 01       BNE $e50f
e50e: 60          RTS

e50a: 1f 22 d0    BBR1 $22, $e4dd
e50d: 01 60       ORA ($60, X)

e50f: 29 01       AND #$01
e511: f0 02       BEQ $e515
e513: d0 64       BNE $e579
e515: a9 e3       LDA #$e3
e517: 8d 86 22    STA $2286
e51a: a9 04       LDA #$04
e51c: 8d 89 22    STA $2289
e51f: 8d 8a 22    STA $228a
e522: a9 60       LDA #$60
e524: 8d 8d 22    STA $228d
e527: ad 22 22    LDA $2222
e52a: f0 21       BEQ $e54d
e52c: 9c 8c 22    STZ $228c
e52f: 0a          ASL a
e530: 0a          ASL a
e531: 0a          ASL a
e532: 0a          ASL a
e533: 2e 8c 22    ROL $228c
e536: 0a          ASL a
e537: 2e 8c 22    ROL $228c
e53a: 8d 8b 22    STA $228b
e53d: 73 20 22 87 22 02 00    TII $2220, $2287, $0002
e544: 9c 02 04    STZ $0402
e547: 9c 03 04    STZ $0403
e54a: 20 86 22    JSR $2286
e54d: ad 25 22    LDA $2225
e550: f0 23       BEQ $e575
e552: 9c 8c 22    STZ $228c
e555: 0a          ASL a
e556: 0a          ASL a
e557: 0a          ASL a
e558: 0a          ASL a
e559: 2e 8c 22    ROL $228c
e55c: 0a          ASL a
e55d: 2e 8c 22    ROL $228c
e560: 8d 8b 22    STA $228b
e563: 73 23 22 87 22 02 00    TII $2223, $2287, $0002
e56a: 9c 02 04    STZ $0402
e56d: a9 01       LDA #$01
e56f: 8d 03 04    STA $0403
e572: 20 86 22    JSR $2286
e575: 9c 1f 22    STZ $221f
e578: 60          RTS
e579: 73 d7 e5 86 22 03 00    TII $e5d7, $2286, $0003
e580: a9 60       LDA #$60
e582: 8d 8d 22    STA $228d
e585: ad 22 22    LDA $2222
e588: f0 21       BEQ $e5ab
e58a: 9c 8c 22    STZ $228c
e58d: 0a          ASL a
e58e: 0a          ASL a
e58f: 0a          ASL a
e590: 0a          ASL a
e591: 2e 8c 22    ROL $228c
e594: 0a          ASL a
e595: 2e 8c 22    ROL $228c
e598: 8d 8b 22    STA $228b
e59b: 73 20 22 89 22 02 00    TII $2220, $2289, $0002
e5a2: 9c 02 04    STZ $0402
e5a5: 9c 03 04    STZ $0403
e5a8: 20 86 22    JSR $2286
e5ab: ad 25 22    LDA $2225
e5ae: f0 23       BEQ $e5d3
e5b0: 9c 8c 22    STZ $228c
e5b3: 0a          ASL a
e5b4: 0a          ASL a
e5b5: 0a          ASL a
e5b6: 0a          ASL a
e5b7: 2e 8c 22    ROL $228c
e5ba: 0a          ASL a
e5bb: 2e 8c 22    ROL $228c
e5be: 8d 8b 22    STA $228b
e5c1: 73 23 22 89 22 02 00    TII $2223, $2289, $0002
e5c8: 9c 02 04    STZ $0402
e5cb: a9 01       LDA #$01
e5cd: 8d 03 04    STA $0403
e5d0: 20 86 22    JSR $2286
e5d3: 9c 1f 22    STZ $221f
e5d6: 60          RTS
e5d7: f3 04 04 ?? ?? ?? ??    TAI $0404, $????, $????

EX_SATCLR:

e5da: a9 00       LDA #$00
e5dc: 85 f7       STA $f7
e5de: 8d 00 00    STA $0000
e5e1: ad 14 22    LDA $2214
e5e4: 8d 02 00    STA $0002
e5e7: ad 15 22    LDA $2215
e5ea: 8d 03 00    STA $0003
e5ed: a9 02       LDA #$02
e5ef: 85 f7       STA $f7
e5f1: 8d 00 00    STA $0000
e5f4: 82          CLX
e5f5: 13 00       ST1 #$00
e5f7: 23 00       ST2 #$00
e5f9: ca          DEX
e5fa: d0 f9       BNE $e5f5
e5fc: 9c 16 22    STZ $2216
e5ff: 60          RTS

EX_BCDBIN:

e600: da          PHX           ; push X
e601: aa          TAX           ; save A value in X

e602: 29 f0       AND #$f0      ; take care of the higher digit
e604: c9 a0       CMP #$a0      ; check if it can be a BCD number
e606: b0 16       BCS $e61e     ; if not, exit
e608: 4a          LSR a         ; A <<= 1
e609: 85 ec       STA $ec       ; ($ec) = A
e60b: 4a          LSR a
e60c: 4a          LSR a         ; A <<= 2
e60d: 18          CLC
e60e: 65 ec       ADC $ec
e610: 85 ec       STA $ec       ; ($ec) = (Hi digit)*2+(Hi digit)*8
				; => ($ec) = (Hi digit) * 10

e612: 8a          TXA           ; A = initial argument

e613: 29 0f       AND #$0f      ; consider only lower digit

e615: c9 0a       CMP #$0a
e617: b0 05       BCS $e61e     ; if not BCD number, exit

e619: 18          CLC           ; else

e61a: 65 ec       ADC $ec       ; add previous result with this digit

e61c: aa          TAX           ; and store the result as the returning value

e61d: 18          CLC
e61e: 8a          TXA           ; restore A value
e61f: fa          PLX           ; restore X value
e620: 60          RTS

EX_BINBCD:

e621: c9 64       CMP #$64      ; compare argument with 100d
e623: b0 16       BCS $e63b     ; if not BCD convertible, exit

e625: da          PHX           ; save X value

e626: a2 ff       LDX #$ff      ; X = 255

e628: 38          SEC           ; set carrry flag

e629: e8          INX           ; X++
e62a: e9 0a       SBC #$0a      ; A -= 10
e62c: b0 fb       BCS $e629     ; while A>=0, continue
				; so that X contain A / 10

e62e: 69 0a       ADC #$0a      ; reajust A 'coz we've gone too far

e630: 22          SAX           ; A <-> X

e631: 0a          ASL a
e632: 0a          ASL a
e633: 0a          ASL a
e634: 0a          ASL a         ; A <<=4, the number of 'dizaine' (french word)
				; is placed in higher nibble

e635: 86 ec       STX $ec       ; place the lower digit in ($ec)
e637: 65 ec       ADC $ec       ; and add this result to A (that contains the
				; higher digit)

e639: fa          PLX           ; restore value for X
e63a: 18          CLC           ; np
e63b: 60          RTS

EX_SPRPUT:

e63c: ad 16 22    LDA $2216
e63f: c9 40       CMP #$40
e641: b0 3a       BCS $e67d
e643: 5a          PHY
e644: a9 00       LDA #$00
e646: 85 f7       STA $f7
e648: 8d 00 00    STA $0000
e64b: ad 16 22    LDA $2216
e64e: 0a          ASL a
e64f: 0a          ASL a
e650: 18          CLC
e651: 6d 14 22    ADC $2214
e654: 8d 02 00    STA $0002
e657: ad 15 22    LDA $2215
e65a: 69 00       ADC #$00
e65c: 8d 03 00    STA $0003
e65f: a9 02       LDA #$02
e661: 85 f7       STA $f7
e663: 8d 00 00    STA $0000
e666: c2          CLY
e667: b9 17 22    LDA $2217, Y
e66a: 8d 02 00    STA $0002
e66d: c8          INY
e66e: b9 17 22    LDA $2217, Y
e671: 8d 03 00    STA $0003
e674: c8          INY
e675: c0 08       CPY #$08
e677: d0 ee       BNE $e667
e679: ee 16 22    INC $2216
e67c: 7a          PLY
e67d: 60          RTS

EX_RND:

e67e: ad 4a 22    LDA $224a
e681: 2a          ROL a
e682: 2a          ROL a
e683: 2a          ROL a
e684: 4d 49 22    EOR $2249
e687: 6a          ROR a
e688: 08          PHP
e689: ad 4a 22    LDA $224a
e68c: 4d 49 22    EOR $2249
e68f: 8d 4a 22    STA $224a
e692: ad 4b 22    LDA $224b
e695: 4d 49 22    EOR $2249
e698: 8d 49 22    STA $2249
e69b: 28          PLP
e69c: 2e 49 22    ROL $2249
e69f: 2e 4a 22    ROL $224a
e6a2: ad 4a 22    LDA $224a
e6a5: 4d 49 22    EOR $2249
e6a8: 60          RTS

NMI:

e6a9: bf f5 01    BBS3 $f5, $e6ad       ; $f5 = some sort of irq enable flag?
e6ac: 40          RTI
e6ad: 6c 06 22    JMP ($2206)
e6b0: 6c 04 22    JMP ($2204)

TIMER:

e6b3: af f5 fa    BBS2 $f5, $e6b0       ; if ($f5 & 0x04), go to $e6b0 ?

e6b6: 48          PHA   ; store A, X, Y value
e6b7: da          PHX
e6b8: 5a          PHY

e6b9: 8d 03 14    STA $1403     ; set IRQ status but what does A is egal to ?

e6bc: a5 e6       LDA $e6
e6be: d0 0b       BNE $e6cb     ; if ($e6) != 0, exist right now

e6c0: e6 e6       INC $e6       ; ($e6) ++
e6c2: 58          CLI           ; reenable IRQ processing

e6c3: a5 e7       LDA $e7
e6c5: d0 02       BNE $e6c9     ; if ($e7) != 0, zeroes ($e6) then exits

e6c7: 44 06       BSR $e6cf

e6c9: 64 e6       STZ $e6

e6cb: 7a          PLY   ; restore A, X, Y value
e6cc: fa          PLX
e6cd: 68          PLA

e6ce: 40          RTI

				; an unknown entry point via the jump table
				; also called in the Timer method

e6cf: 43 10       TMA #$10
e6d1: 48          PHA           ; push bank number of MMR4

e6d2: 43 20       TMA #$20
e6d4: 48          PHA           ; push bank number of MMR5

e6d5: 43 40       TMA #$40
e6d7: 48          PHA           ; push bank number of MMR6
							  
e6d8: ad eb 22    LDA $22eb     
e6db: 53 10       TAM #$10      ; set MMR4 to ($22eb) (set in PSG_BANK)

e6dd: ad ec 22    LDA $22ec
e6e0: 53 20       TAM #$20      ; set MMR5 to ($22ec) (set in PSG_BANK)

e6e2: a9 02       LDA #$02
e6e4: 53 40       TAM #$40      ; set MMR6 to 2

e6e6: ad df 22    LDA $22df
e6e9: f0 0f       BEQ $e6fa     ; if ($22df) == 0, skip a small part
					  ; can be "no sound" or such

e6eb: 20 12 cd    JSR $cd12
e6ee: c9 00       CMP #$00
e6f0: d0 08       BNE $e6fa       ; if returned value is null, perform ($22de) |= 0x40 else not

e6f2: ad de 22    LDA $22de
e6f5: 09 40       ORA #$40
e6f7: 8d de 22    STA $22de     ; ($22de) |= 0x40

e6fa: ad df 22    LDA $22df
e6fd: c9 01       CMP #$01
e6ff: f0 0f       BEQ $e710     ; if ($22df & 1), skip another small part

e701: 20 ef c2    JSR $c2ef
e704: c9 00       CMP #$00
e706: d0 08       BNE $e710       ; if returned value is null, perform ($22de) |= 0x80 else not

e708: ad de 22    LDA $22de
e70b: 09 80       ORA #$80
e70d: 8d de 22    STA $22de     ; ($22de) |= 0x80

e710: a5 e7       LDA $e7
e712: 29 01       AND #$01
e714: d0 0d       BNE $e723

e716: ad d4 22    LDA $22d4
e719: 30 08       BMI $e723

e71b: 8d 00 0c    STA $0c00     ; if ($22d4) & 0x80 != 0, 
					; set time reload to ($22d4) and
					; ($22d4) |= 0x80
e71e: 09 80       ORA #$80
e720: 8d d4 22    STA $22d4

e723: 68          PLA
e724: 53 40       TAM #$40

e726: 68          PLA
e727: 53 20       TAM #$20      ; restore all banks that have been re for PSG purposes

e729: 68          PLA
e72a: 53 10       TAM #$10

e72c: ad ed 22    LDA $22ed
e72f: 8d 00 08    STA $0800

e732: 60          RTS

e733: 6c 00 22    JMP ($2200)

IRQ2/BRK:

e736: 8f f5 fa    BBS0 $f5, $e733       ; $f5 = some sort of irq enable flag?
					; if ($f5 & 1), exit

e739: 48          PHA
e73a: da          PHX
e73b: 5a          PHY
e73c: 44 04       BSR $e742
e73e: 7a          PLY
e73f: fa          PLX
e740: 68          PLA
e741: 40          RTI

e742: ad 02 18    LDA $1802
e745: 2d 03 18    AND $1803
e748: 05 f2       ORA $f2
e74a: 85 f2       STA $f2
				; something to do with ADPCM?
e74c: 2f f2 64    BBR2 $f2, $e7b3
				; something to do with ADPCM?
e74f: a9 04       LDA #$04
e751: 1c 02 18    TRB $1802
e754: a9 04       LDA #$04
e756: 14 f2       TRB $f2

e758: 58          CLI
e759: ad 9e 22    LDA $229e
e75c: 0d 9f 22    ORA $229f
e75f: 0d a0 22    ORA $22a0
e762: f0 4f       BEQ $e7b3
e764: ad 00 18    LDA $1800
e767: 29 80       AND #$80
e769: f0 08       BEQ $e773
e76b: 9c a4 22    STZ $22a4
e76e: 20 ce f6    JSR $f6ce
e771: 80 40       BRA $e7b3
e773: 20 ee f0    JSR $f0ee     ; reset_cd_arg_buffer
				; command 0x08: read sectors
e776: a9 08       LDA #$08
e778: 8d 4c 22    STA $224c

e77b: ad a1 22    LDA $22a1
e77e: 8d 4d 22    STA $224d
e781: ad a2 22    LDA $22a2
e784: 8d 4e 22    STA $224e
e787: ad a3 22    LDA $22a3
e78a: 8d 4f 22    STA $224f
e78d: a2 10       LDX #$10
e78f: ad 9f 22    LDA $229f
e792: 0d a0 22    ORA $22a0
e795: d0 08       BNE $e79f
e797: ad 9e 22    LDA $229e
e79a: c9 10       CMP #$10
e79c: b0 01       BCS $e79f
e79e: aa          TAX
e79f: 8a          TXA
e7a0: 8d 9d 22    STA $229d
e7a3: 8d 50 22    STA $2250
e7a6: a9 01       LDA #$01
e7a8: 8d a4 22    STA $22a4     ; cd mutex
e7ab: 20 05 e9    JSR $e905
e7ae: a9 60       LDA #$60
e7b0: 0c 02 18    TSB $1802

e7b3: 6f f2 0f    BBR6 $f2, $e7c5
e7b6: a9 40       LDA #$40
e7b8: 1c 02 18    TRB $1802
e7bb: a9 40       LDA #$40
e7bd: 14 f2       TRB $f2
e7bf: 58          CLI
e7c0: a9 02       LDA #$02
e7c2: 8d 0b 18    STA $180b

e7c5: 5f f2 65    BBR5 $f2, $e82d
					; something to do with CD data?
e7c8: a9 20       LDA #$20
e7ca: 1c 02 18    TRB $1802
e7cd: a9 20       LDA #$20
e7cf: 14 f2       TRB $f2
e7d1: 58          CLI
e7d2: ad a4 22    LDA $22a4
e7d5: f0 03       BEQ $e7da
e7d7: 9c 0b 18    STZ $180b
e7da: ad 01 18    LDA $1801
e7dd: 8d 7b 22    STA $227b
e7e0: f0 06       BEQ $e7e8
e7e2: 9c a4 22    STZ $22a4
e7e5: 20 ce f6    JSR $f6ce
e7e8: a9 80       LDA #$80
e7ea: 0c 02 18    TSB $1802
e7ed: 93 40 00 18 TST #$40, $1800
e7f1: d0 fa       BNE $e7ed
e7f3: a9 80       LDA #$80
e7f5: 1c 02 18    TRB $1802
e7f8: ad 00 18    LDA $1800
e7fb: 29 f8       AND #$f8
e7fd: c9 f8       CMP #$f8
e7ff: d0 f7       BNE $e7f8
e801: ad 01 18    LDA $1801
e804: a9 80       LDA #$80
e806: 0c 02 18    TSB $1802
e809: 93 40 00 18 TST #$40, $1800
e80d: d0 fa       BNE $e809
e80f: a9 80       LDA #$80
e811: 1c 02 18    TRB $1802
e814: 93 80 00 18 TST #$80, $1800
e818: d0 fa       BNE $e814
e81a: ad a4 22    LDA $22a4
e81d: f0 0e       BEQ $e82d
e81f: 9c a4 22    STZ $22a4
e822: 20 8c f6    JSR $f68c
e825: 9c 9d 22    STZ $229d
e828: a9 04       LDA #$04
e82a: 0c 02 18    TSB $1802

e82d: 4f f2 12    BBR4 $f2, $e842
e830: a9 10       LDA #$10
e832: 1c 02 18    TRB $1802
e835: a9 10       LDA #$10
e837: 14 f2       TRB $f2
e839: 58          CLI
e83a: 20 5a f3    JSR $f35a
e83d: a9 10       LDA #$10
e83f: 0c 02 18    TSB $1802

e842: 3f f2 21    BBR3 $f2, $e866
e845: a9 0c       LDA #$0c
e847: 1c 02 18    TRB $1802
e84a: a9 08       LDA #$08
e84c: 14 f2       TRB $f2
e84e: a9 60       LDA #$60
e850: 1c 0d 18    TRB $180d
e853: 20 ce f6    JSR $f6ce
e856: 58          CLI
e857: ad a5 22    LDA $22a5
e85a: f0 0a       BEQ $e866
e85c: ad 0c 18    LDA $180c
e85f: 29 08       AND #$08
e861: d0 f9       BNE $e85c
e863: 20 f5 f5    JSR $f5f5
e866: 60          RTS

e867: 6c 0a 22    JMP ($220a)
e86a: 6c 08 22    JMP ($2208)
e86d: 6c 02 22    JMP ($2202)

IRQ1:

e870: 9f f5 fa    BBS1 $f5, $e86d       ; $f5 = some sort of irq enable flag?
					; if ($f5 & 2), goto ($2202)

e873: 48          PHA                   ; save value of A, X, Y
e874: da          PHX
e875: 5a          PHY

e876: ad 00 00    LDA $0000
e879: 85 f6       STA $f6
e87b: 5f f6 3b    BBR5 $f6, $e8b9
e87e: 03 05       ST0 #$05
e880: a5 f3       LDA $f3
e882: 8d 02 00    STA $0002
e885: a5 f4       LDA $f4
e887: 8d 03 00    STA $0003
e88a: ee 41 22    INC $2241
e88d: df f5 24    BBS5 $f5, $e8b4
e890: 03 07       ST0 #$07
e892: 73 0c 22 02 00 02 00    TII $220c, $0002, $0002
e899: 03 08       ST0 #$08
e89b: 73 10 22 02 00 02 00    TII $2210, $0002, $0002
e8a2: 20 09 e5    JSR $e509
e8a5: ee 49 22    INC $2249
e8a8: a5 e7       LDA $e7
e8aa: c9 01       CMP #$01
e8ac: d0 03       BNE $e8b1
e8ae: 20 cf e6    JSR $e6cf
e8b1: 20 9a e4    JSR $e49a
e8b4: 4f f5 02    BBR4 $f5, $e8b9
e8b7: 44 b1       BSR $e86a

e8b9: 2f f6 1e    BBR2 $f6, $e8da
e8bc: ff f5 16    BBS7 $f5, $e8d5
e8bf: 44 a5       BSR $e866
e8c1: 44 a3       BSR $e866
e8c3: 03 07       ST0 #$07
e8c5: 73 0e 22 02 00 02 00    TII $220e, $0002, $0002
e8cc: 03 08       ST0 #$08
e8ce: 73 12 22 02 00 02 00    TII $2212, $0002, $0002
e8d5: 6f f5 02    BBR6 $f5, $e8da
e8d8: 44 8d       BSR $e867
e8da: a5 f7       LDA $f7
e8dc: 8d 00 00    STA $0000

e8df: 7a          PLY           ; restore value of A, X, Y
e8e0: fa          PLX
e8e1: 68          PLA

e8e2: 40          RTI

CD_RESET:

				; $1804 |= 0x02?
e8e3: a9 02       LDA #$02
e8e5: 0c 04 18    TSB $1804

				; delay for a while
e8e8: a0 0a       LDY #$0a
e8ea: a2 3b       LDX #$3b
e8ec: ca          DEX
e8ed: d0 fd       BNE $e8ec
e8ef: 88          DEY
e8f0: d0 f8       BNE $e8ea

				; $1804 = $1804 & 0xfd (~0x02)
e8f2: ad 04 18    LDA $1804
e8f5: 29 fd       AND #$fd
e8f7: 8d 04 18    STA $1804

				; delay for some more
e8fa: a2 77       LDX #$77
e8fc: ca          DEX
e8fd: d0 fd       BNE $e8fc

e8ff: 60          RTS

; this appears to be a major CD access routine
; it is probably for issuing commands to the CD system
; zeo: command to send must be at $224c

				; while ($22a4) {} /* do nothing */
e900: ad a4 22    LDA $22a4     ; $22a4 = ??
e903: d0 fb       BNE $e900

				; the block of code from $e908-$e942 seems to
				; be concerned with getting $1800 & 0x80 to
				; be in a specific state, after which it jmps
				; to $e944
e905: 9c 9b 22    STZ $229b
e908: a9 81       LDA #$81
e90a: 8d 01 18    STA $1801
e90d: 93 80 00 18 TST #$80, $1800
e911: f0 31       BEQ $e944
e913: a9 60       LDA #$60
e915: 1c 02 18    TRB $1802
e918: 8d 00 18    STA $1800

				; some sort of delay loop
e91b: a2 95       LDX #$95
e91d: a9 ed       LDA #$ed
e91f: 3a          DEC a
e920: d0 fd       BNE $e91f
e922: ea          NOP
e923: ea          NOP
e924: ea          NOP
e925: ca          DEX
e926: d0 f5       BNE $e91d

e928: a9 ff       LDA #$ff
e92a: 8d 01 18    STA $1801
e92d: 93 40 00 18 TST #$40, $1800
e931: f0 d5       BEQ $e908
e933: 20 27 ea    JSR $ea27
e936: 93 40 00 18 TST #$40, $1800
e93a: d0 f7       BNE $e933
e93c: 93 80 00 18 TST #$80, $1800
e940: d0 f4       BNE $e936
e942: 80 c4       BRA $e908

e944: 8d 00 18    STA $1800
e947: 82          CLX
				; wait for $1800 & 0x40?
				; with a timeout?
e948: ad 00 18    LDA $1800
e94b: 29 40       AND #$40
e94d: d0 0b       BNE $e95a
				; another delay loop
e94f: a9 5a       LDA #$5a
e951: 3a          DEC a
e952: d0 fd       BNE $e951
e954: ea          NOP
e955: ca          DEX

e956: d0 f0       BNE $e948
e958: 80 ae       BRA $e908
				; CD command routine?
e95a: 9c 7a 22    STZ $227a
e95d: 82          CLX

				; this section could tell us a bit about
				; what the $1800 return values mean
				; this routine appears to send command bytes
				; to the CD controller over port $1801 until
				; the status register indicates something
				; (probably that it has received the command
				; or that an error has occurred) when this
				; happens control goes to $e98a. there is no
				; other way out of this routine
e95e: ad 00 18    LDA $1800
e961: 29 f8       AND #$f8
e963: 8d 7a 22    STA $227a
				; zeo : $227a contain sort of status

				; if ($1800 & 0xf8) == 0xd0 then issue command
e966: c9 d0       CMP #$d0
e968: f0 10       BEQ $e97a

				; else if ($1800 & 0xb8) == (0x98 or 0x88 or
				; 0x80) do something else
e96a: 29 b8       AND #$b8
e96c: c9 98       CMP #$98
e96e: f0 1a       BEQ $e98a
e970: c9 88       CMP #$88
e972: f0 16       BEQ $e98a
e974: c9 80       CMP #$80
e976: f0 12       BEQ $e98a
				; else loop back to check status again
e978: 80 e4       BRA $e95e

				; send command
e97a: bd 4c 22    LDA $224c, X
e97d: e8          INX
e97e: 8d 01 18    STA $1801
e981: ea          NOP
e982: ea          NOP
e983: ea          NOP
e984: ea          NOP
e985: 20 27 ea    JSR $ea27     ; zeo : wait for ack ?
e988: 80 d4       BRA $e95e

				; this section is probably for command dispatch
e98a: ad a4 22    LDA $22a4     ; cd mutex?
e98d: 0d 48 22    ORA $2248
e990: d0 32       BNE $e9c4     ; zeo : ret_location

e992: ad 4c 22    LDA $224c
e995: c9 d9       CMP #$d9
e997: d0 0b       BNE $e9a4     ; zeo : if ($224c) != 0xd9 then skip _al testing
e999: ad 4d 22    LDA $224d
e99c: c9 01       CMP #$01      ; zeo : if ($224d) [original value of _al ?]
					; if egal to 1 or 2, exits the function
e99e: f0 24       BEQ $e9c4     ; zeo : ret_location
e9a0: c9 02       CMP #$02
e9a2: f0 20       BEQ $e9c4     ; zeo : ret_location

e9a4: ae 41 22    LDX $2241

e9a7: ad 00 18    LDA $1800
e9aa: 29 f8       AND #$f8
e9ac: 8d 7a 22    STA $227a     ; zeo : usual status storing
e9af: 89 40       BIT #$40
e9b1: d0 11       BNE $e9c4     ; zeo : ret_location

e9b3: 8a          TXA           ; zeo : A = original value of $2241 ?
e9b4: 38          SEC
e9b5: ed 41 22    SBC $2241
e9b8: 49 ff       EOR #$ff
e9ba: 1a          INC a
e9bb: c9 fe       CMP #$fe
e9bd: 90 e8       BCC $e9a7
e9bf: a9 01       LDA #$01

e9c1: 8d 9b 22    STA $229b     ; ($229b) = 1
e9c4: 60          RTS
				; here ends the routine beginning at $e900


				; this could be an error-recovery routine
				; zeo : I really doubt, it's always called
				; even when all is OK. I was thinking in a
				; error test rather, since it can oblige the
				; reading function to be called again
				

e9c5: ad 9b 22    LDA $229b   ; if all ok, this could be 0 (It was 
					; at least once)
e9c8: f0 09       BEQ $e9d3
e9ca: 9c 9b 22    STZ $229b
e9cd: 20 e3 e8    JSR $e8e3     ; CD_RESET
e9d0: a9 06       LDA #$06      ; error return value
e9d2: 60          RTS

e9d3: 20 dc e9    JSR $e9dc   ; normal way
e9d6: d0 03       BNE $e9db   ; 0 was also once on the normal way
e9d8: 9c 7c 22    STZ $227c   ; so ($227c) was cleared
e9db: 60          RTS

e9dc: 9c 7b 22    STZ $227b
				; while (($227a = ($1800 & 0xf8)) != 0xd8) {}
e9df: ad 00 18    LDA $1800
e9e2: 29 f8       AND #$f8
e9e4: 8d 7a 22    STA $227a
e9e7: c9 d8       CMP #$d8
e9e9: d0 f4       BNE $e9df

				; read a byte from the CD data register at
				; $1801, store it at $227b, and acknowledge it
e9eb: ad 01 18    LDA $1801
e9ee: 8d 7b 22    STA $227b

e9f1: 44 42       BSR $ea35     ; ($1802) |= 0x80, ack ?

e9f3: 93 40 00 18 TST #$40, $1800
e9f7: d0 fa       BNE $e9f3     ; wait for 6th bit of $1800 to be set

e9f9: 44 34       BSR $ea2f     ; ($1802) &= ~0x80, end ack ?

e9fb: ad 00 18    LDA $1800
e9fe: 29 f8       AND #$f8
ea00: 8d 7a 22    STA $227a
ea03: c9 f8       CMP #$f8
ea05: f0 06       BEQ $ea0d     ; if ($1800) & 0xf8 == 0xf8, 

ea07: c9 d8       CMP #$d8
ea09: d0 f0       BNE $e9fb     ; if ($1800) & 0xf8 == 0xd8, continue

ea0b: 80 d2       BRA $e9df

				; read a byte from the CD data register at
				; $1801, store it at $227a, and acknowledge it
ea0d: ad 01 18    LDA $1801
ea10: 8d 7a 22    STA $227a

ea13: 44 20       BSR $ea35     ; begin ack ?

ea15: 93 40 00 18 TST #$40, $1800
ea19: d0 fa       BNE $ea15

ea1b: 44 12       BSR $ea2f     ; end ack ?

ea1d: 93 80 00 18 TST #$80, $1800
ea21: d0 fa       BNE $ea1d

ea23: ad 7b 22    LDA $227b     ; return value (should be 2 for OK ?, hmm, it depends)
ea26: 60          RTS

				; unknown procedure:
				; sets 0x80 bit of $1802
				; waits until !($1800 & 0x40)
				; clears 0x80 bit of $1802
				; probably some form of flow control or
				; handshaking
				; zeo : wait for ack ?
ea27: 44 0c       BSR $ea35
ea29: 93 40 00 18 TST #$40, $1800
ea2d: d0 fa       BNE $ea29

ea2f: a9 80       LDA #$80
ea31: 1c 02 18    TRB $1802
ea34: 60          RTS

ea35: a9 80       LDA #$80
ea37: 0c 02 18    TSB $1802
ea3a: 60          RTS

				; this appears to be a data read routine
				; number of bytes to read in $f8-$f9
				; buffer address in $fa-$fb
ea3b: ad 00 18    LDA $1800
ea3e: 29 f8       AND #$f8
ea40: 8d 7a 22    STA $227a
ea43: c9 c8       CMP #$c8
ea45: f0 06       BEQ $ea4d
ea47: c9 d8       CMP #$d8
ea49: f0 1c       BEQ $ea67
ea4b: 80 ee       BRA $ea3b
				; read and store data byte
ea4d: ad 01 18    LDA $1801
ea50: 92 fa       STA ($fa)
				; acknowledge data transfer
ea52: 44 d3       BSR $ea27
				; increment data buffer pointer
ea54: e6 fa       INC $fa
ea56: d0 02       BNE $ea5a
ea58: e6 fb       INC $fb
				; DJNZ.W ($f8 (buffer length), $ea3b)
ea5a: a5 f8       LDA $f8
ea5c: d0 02       BNE $ea60
ea5e: c6 f9       DEC $f9
ea60: 3a          DEC a
ea61: 85 f8       STA $f8
ea63: 05 f9       ORA $f9
ea65: d0 d4       BNE $ea3b
				; burn off the rest of the data in the sector?
				; handle an error condition?
ea67: ad 00 18    LDA $1800
ea6a: 29 f8       AND #$f8
ea6c: 8d 7a 22    STA $227a
ea6f: 29 b8       AND #$b8
ea71: c9 88       CMP #$88      ; what does 0x88 mean in this context?
ea73: d0 03       BNE $ea78
ea75: 4c 5e eb    JMP $eb5e
ea78: 60          RTS

				; zeo : sector data read routine
				; Read AX sectors and copies them 
				; to (BX) (local address)
				; the address has already been send,
				; just copying there
				; Set ($227A) with ($1800) & 0xF8 (as usual)
				; And A = ($227A)
ea79: ad 00 18    LDA $1800
ea7c: 29 f8       AND #$f8
ea7e: 8d 7a 22    STA $227a
ea81: c9 c8       CMP #$c8
ea83: f0 06       BEQ $ea8b ; common assignation and test for ready
ea85: c9 d8       CMP #$d8
ea87: f0 34       BEQ $eabd ; maybe not ready or error
ea89: 80 ee       BRA $ea79 ; try again

ea8b: a5 f8       LDA $f8
ea8d: 05 f9       ORA $f9
ea8f: f0 24       BEQ $eab5 ; test if AX (nb of sector) is nul
				    ; if so, exit the function  

ea91: a2 03       LDX #$03
ea93: ca          DEX
ea94: d0 fd       BNE $ea93 ; little waiting loop

ea96: c2          CLY
ea97: a2 08       LDX #$08 ; here, Y is the lower byte index
				   ; X will be a kind of upper byte index
				   ; not really a index since it doesn't happen
				   ; in the destination nor source of copying
				   ; rather a count ( 8 * 256 => 2048, sizeof(sector))) 

ea99: ad 08 18    LDA $1808     ; load data
ea9c: 91 fa       STA ($fa), Y  ; copy it

				; if (!--datacnt) return
ea9e: a5 f8       LDA $f8
eaa0: d0 02       BNE $eaa4
eaa2: c6 f9       DEC $f9
eaa4: 3a          DEC a
eaa5: 85 f8       STA $f8
eaa7: 05 f9       ORA $f9
eaa9: f0 0a       BEQ $eab5 ; if (--BX) exit

eaab: c8          INY
eaac: d0 eb       BNE $ea99 ; if not, let's continue

eaae: e6 fb       INC $fb       ; if (Y==0), then it's time to take care of X
eab0: ca          DEX
eab1: d0 e6       BNE $ea99   ; X!=0 -> we go on
eab3: 80 c4       BRA $ea79   ; X==0 -> we read a sector, we continue at 
					; the beginning of the function with another

eab5: ad 00 18    LDA $1800
eab8: 29 f8       AND #$f8
eaba: 8d 7a 22    STA $227a  ; as usual, ($227a) = (A = ($1800) | 0xf8)
eabd: 60          RTS


					; zeo : routine that writes to VRAM
					;

eabe: ad 00 18    LDA $1800
eac1: 29 f8       AND #$f8
eac3: 8d 7a 22    STA $227a     ; usual status storing

eac6: c9 c8       CMP #$c8
eac8: f0 06       BEQ $ead0
eaca: c9 d8       CMP #$d8
eacc: f0 37       BEQ $eb05
eace: 80 ee       BRA $eabe

ead0: a2 03       LDX #$03
ead2: ca          DEX           ; little waiting loop
ead3: d0 fd       BNE $ead2

ead5: c2          CLY
ead6: a2 04       LDX #$04
ead8: ad 08 18    LDA $1808
eadb: 8d 02 00    STA $0002     ; write to VRAM, no incrementation ?
eade: ea          NOP
eadf: ea          NOP
eae0: ea          NOP
eae1: ea          NOP
eae2: ea          NOP
eae3: ea          NOP
eae4: ea          NOP
eae5: ea          NOP
eae6: ad 08 18    LDA $1808
eae9: 8d 03 00    STA $0003     ; write again to VRAM but with incrementation ?

eaec: a5 f8       LDA $f8
eaee: 38          SEC
eaef: e9 02       SBC #$02
eaf1: 85 f8       STA $f8       
eaf3: a5 f9       LDA $f9
eaf5: e9 00       SBC #$00
eaf7: 85 f9       STA $f9       ; this piece of code make _ax -= 2

eaf9: 05 f8       ORA $f8
eafb: f0 08       BEQ $eb05     ; if ax == 0 goto eb05
eafd: 88          DEY
eafe: d0 d8       BNE $ead8     ; while not finished, go on
eb00: ca          DEX
eb01: d0 d5       BNE $ead8     ; while not finished, go on
eb03: 80 b9       BRA $eabe

eb05: ad 00 18    LDA $1800
eb08: 29 f8       AND #$f8
eb0a: 8d 7a 22    STA $227a     ; usual status storing

eb0d: 29 b8       AND #$b8
eb0f: c9 88       CMP #$88
eb11: d0 02       BNE $eb15     ; if ($1800 & 0xb8)!=0x88 exit function
					; if not emptied buffer, let's empty it now
				
eb13: 80 49       BRA $eb5e     ; zeo : empty buffer func
eb15: 60          RTS

				; this looks like an exciting data read routine
				; it appears to read from the CD directly to
				; video memory
eb16: a9 02       LDA #$02
eb18: 85 fa       STA $fa
eb1a: a9 00       LDA #$00
eb1c: 85 fb       STA $fb

eb1e: ad 00 18    LDA $1800
eb21: 29 f8       AND #$f8
eb23: 8d 7a 22    STA $227a
eb26: c9 c8       CMP #$c8
eb28: f0 06       BEQ $eb30
eb2a: c9 d8       CMP #$d8
eb2c: f0 2f       BEQ $eb5d
eb2e: 80 ee       BRA $eb1e

eb30: ad 01 18    LDA $1801
eb33: 92 fa       STA ($fa)
eb35: 20 27 ea    JSR $ea27
eb38: a5 fa       LDA $fa
eb3a: 49 01       EOR #$01
eb3c: 85 fa       STA $fa

eb3e: a5 f8       LDA $f8
eb40: 38          SEC
eb41: e9 01       SBC #$01
eb43: 85 f8       STA $f8
eb45: a5 f9       LDA $f9
eb47: e9 00       SBC #$00
eb49: 85 f9       STA $f9
eb4b: 05 f8       ORA $f8
eb4d: d0 cf       BNE $eb1e

eb4f: ad 00 18    LDA $1800
eb52: 29 f8       AND #$f8
eb54: 8d 7a 22    STA $227a
eb57: 29 b8       AND #$b8
eb59: c9 88       CMP #$88
eb5b: f0 01       BEQ $eb5e
eb5d: 60          RTS

				; this appears to be a useful data ignoring
				; routine.
				; zeo : used to empty buffer
eb5e: ad 00 18    LDA $1800
eb61: 29 f8       AND #$f8
eb63: 8d 7a 22    STA $227a     ; usual status storing

eb66: c9 c8       CMP #$c8
eb68: f0 06       BEQ $eb70       ; zeo : there are still data in there ...

eb6a: c9 d8       CMP #$d8
eb6c: f0 1d       BEQ $eb8b       ; zeo : no more datat to read, we can go

eb6e: 80 ee       BRA $eb5e

				; a delay loop
eb70: a2 05       LDX #$05
eb72: ca          DEX
eb73: d0 fd       BNE $eb72

eb75: c2          CLY
eb76: a2 08       LDX #$08
eb78: ad 08 18    LDA $1808
eb7b: ea          NOP
eb7c: ea          NOP
eb7d: ea          NOP
eb7e: ea          NOP
eb7f: ea          NOP
eb80: ea          NOP
eb81: ea          NOP
eb82: ea          NOP
eb83: c8          INY
eb84: d0 f2       BNE $eb78
eb86: ca          DEX
eb87: d0 ef       BNE $eb78
eb89: 80 d3       BRA $eb5e

eb8b: ad 7a 22    LDA $227a
eb8e: 60          RTS

CD_BASE:

eb8f: a5 fb       LDA $fb               ; A = _bh
eb91: f0 34       BEQ $ebc7             ; if (_bh == 0) goto $ebc7
						; i.e. use given al:ah:bl for beginning
						; setting

eb93: ef fb 15    BBS6 $fb, $ebab
eb96: a5 f8       LDA $f8
eb98: 85 f9       STA $f9
eb9a: a9 02       LDA #$02
eb9c: 85 f8       STA $f8       ; this piece of code ask to put the 
eb9e: a9 56       LDA #$56      ; beginning address of track _al
eba0: 85 fa       STA $fa       ; into ($2256)
eba2: a9 22       LDA #$22      ; then jump to the convertion part
eba4: 85 fb       STA $fb
eba6: 20 f1 ef    JSR $eff1     ; CD_DINFO
eba9: 80 0f       BRA $ebba

ebab: a5 f8       LDA $f8       ; just put al:ah:bl to ($2256)
ebad: 8d 56 22    STA $2256     ; then convert
ebb0: a5 f9       LDA $f9
ebb2: 8d 57 22    STA $2257
ebb5: a5 fa       LDA $fa
ebb7: 8d 58 22    STA $2258

; this piece of code convert MSF address in ($2256) to LBA one in al:ah:bl

ebba: 43 40       TMA #$40
ebbc: 48          PHA
ebbd: a9 01       LDA #$01              ; set bank 8 to 1, I (zeo) really don't
ebbf: 53 40       TAM #$40              ; see any interest in it

ebc1: 20 17 cc    JSR $cc17             ; zeo : convertion from MSF address in ($2256)
						; to LBA one in al:ah:bl

ebc4: 68          PLA                   ; then restore bank 8 value
ebc5: 53 40       TAM #$40

; set addresses with al:ah:bl

ebc7: 9f fc 0f    BBS1 $fc, $ebd9       ; if (_cl & 2) skip setting first 
						; code address begin

; set 1st code track address with al:ah:bl

ebca: a5 f8       LDA $f8
ebcc: 8d 74 22    STA $2274
ebcf: a5 f9       LDA $f9
ebd1: 8d 75 22    STA $2275
ebd4: a5 fa       LDA $fa
ebd6: 8d 76 22    STA $2276

ebd9: 8f fc 0f    BBS0 $fc, $ebeb       ; if (_cl & 1) skip setting first
						; code address begin

; set 2nd code track address with al:ah:bl

ebdc: a5 f8       LDA $f8
ebde: 8d 77 22    STA $2277
ebe1: a5 f9       LDA $f9
ebe3: 8d 78 22    STA $2278
ebe6: a5 fa       LDA $fa
ebe8: 8d 79 22    STA $2279

ebeb: 60          RTS

CD_EXEC:

ebec: a5 fa       LDA $fa       ; _bl
ebee: 8d 82 22    STA $2282
ebf1: a5 fb       LDA $fb       ; _bh
ebf3: 8d 83 22    STA $2283
ebf6: 44 0d       BSR $ec05     ; CD_READ
ebf8: c9 00       CMP #$00
ebfa: f0 03       BEQ $ebff
ebfc: 4c f3 e0    JMP $e0f3     ; CD_BOOT
ebff: a2 ff       LDX #$ff
ec01: 9a          TXS
ec02: 6c 82 22    JMP ($2282)


CD_READ:

;
; $F8 (word) = size (in sectors?)
; $FA (word) = logical destination address
; $FC-$FE = source address?
; $FF = destination type?
;
;
;

ec05: 9c 73 22    STZ $2273
ec08: 20 09 f3    JSR $f309     ; regsave

				; clear command buffer
ec0b: 20 ee f0    JSR $f0ee     ; reset_cd_arg_buffer

				; set command 0x08 (read)
ec0e: a9 08       LDA #$08
ec10: 8d 4c 22    STA $224c

				; do some wierd stuff with an unknown buffer
				; zeo : adding relative offset from 'cd registers'
				; to first sector of 1st or 2nd data track
ec13: 20 04 f1    JSR $f104     ; proc02

				; copies some registers into the command buffer
ec16: a2 04       LDX #$04
ec18: a0 01       LDY #$01
ec1a: 20 27 f3    JSR $f327     ; copy_($f8-$fa)+X_to_($224c-$224e)+Y

				; figure out destination address type
ec1d: a5 ff       LDA $ff       ; _dh
				; if 0x02 or less, local read
ec1f: c9 02       CMP #$02
ec21: 90 0e       BCC $ec31
				; if 0xff, VRAM, size in sectors
ec23: c9 ff       CMP #$ff
ec25: f0 52       BEQ $ec79
				; if not 0xfe, direct bank read
ec27: c9 fe       CMP #$fe
ec29: d0 03       BNE $ec2e
				; if 0xfe, VRAM, size in bytes
ec2b: 4c bb ec    JMP $ecbb
ec2e: 4c 03 ed    JMP $ed03

				; local read
				; check for size in bytes?
ec31: a5 ff       LDA $ff       ; _dh
ec33: f0 0e       BEQ $ec43

				; convert size in sectors to size in bytes
ec35: a5 f8       LDA $f8       ; _al
ec37: 8d 80 22    STA $2280
ec3a: 0a          ASL a
ec3b: 0a          ASL a
ec3c: 0a          ASL a
ec3d: 85 f9       STA $f9       ; _ah
ec3f: 64 f8       STZ $f8       ; _al
ec41: 80 03       BRA $ec46

ec43: 20 9f ed    JSR $ed9f     ; proc04

				; check data length for 0?
ec46: ad 80 22    LDA $2280
ec49: f0 2b       BEQ $ec76
				; store number of sectors to read in command
				; buffer, and call cdrom command dispatcher
ec4b: 8d 50 22    STA $2250
ec4e: 20 00 e9    JSR $e900

				; if (result != 0xc8) signal error
ec51: c9 c8       CMP #$c8
ec53: d0 0a       BNE $ec5f
				; read sector data
ec55: 20 79 ea    JSR $ea79

				; if (result != 0xc8) signal error
ec58: c9 c8       CMP #$c8
ec5a: d0 03       BNE $ec5f
				; eb5e == data ignoring routine?
ec5c: 20 5e eb    JSR $eb5e

				; e9c5 == error handling routine?
ec5f: 20 c5 e9    JSR $e9c5

ec62: c9 00       CMP #$00
ec64: f0 06       BEQ $ec6c
ec66: 20 0b e2    JSR $e20b

ec69: 90 08       BCC $ec73
ec6b: 60          RTS

ec6c: a5 f8       LDA $f8       ; _al
ec6e: 05 f9       ORA $f9       ; _ah
ec70: d0 01       BNE $ec73
ec72: 60          RTS
ec73: 4c f1 ec    JMP $ecf1

				; return code 0x22: bad data length?
ec76: a9 22       LDA #$22
ec78: 60          RTS

ec79: a5 f8       LDA $f8
ec7b: f0 f9       BEQ $ec76
ec7d: 8d 50 22    STA $2250
ec80: 20 00 e9    JSR $e900
ec83: c9 c8       CMP #$c8
ec85: d0 20       BNE $eca7     ; zeo : not done if all right (not sure)
ec87: a5 f8       LDA $f8       ;
ec89: 0a          ASL a         ;  this part of code
ec8a: 0a          ASL a         ;  convert nb of block in _al
ec8b: 0a          ASL a         ;  to number of bytes in _ax
ec8c: 85 f9       STA $f9       ;
ec8e: 64 f8       STZ $f8       ; 
ec90: a9 00       LDA #$00
ec92: 85 f7       STA $f7       
ec94: 8d 00 00    STA $0000
ec97: 20 37 f3    JSR $f337     ; prepare the offset to write to in video mem
					; and set $2272 to 1
ec9a: a9 02       LDA #$02
ec9c: 85 f7       STA $f7
ec9e: 8d 00 00    STA $0000
eca1: 20 be ea    JSR $eabe
eca4: 9c 72 22    STZ $2272
eca7: 20 c5 e9    JSR $e9c5
ecaa: c9 00       CMP #$00
ecac: f0 06       BEQ $ecb4
ecae: 20 0b e2    JSR $e20b

ecb1: 90 3e       BCC $ecf1
ecb3: 60          RTS
ecb4: a5 f8       LDA $f8
ecb6: 05 f9       ORA $f9
ecb8: d0 37       BNE $ecf1
ecba: 60          RTS

				; read to VRAM, size in bytes
				; convert bytes to sectors
ecbb: 20 9f ed    JSR $ed9f     ; proc04
				; if data length is 0, abort
ecbe: ad 80 22    LDA $2280
ecc1: f0 b3       BEQ $ec76
				; issue read command
ecc3: 8d 50 22    STA $2250
ecc6: 20 00 e9    JSR $e900

ecc9: c9 c8       CMP #$c8
eccb: d0 17       BNE $ece4

eccd: a9 00       LDA #$00
eccf: 85 f7       STA $f7       ; f7 = cur VDP reg?
ecd1: 8d 00 00    STA $0000
				; load address into VDP?
ecd4: 20 37 f3    JSR $f337
				; set VDP reg to data write address
ecd7: a9 02       LDA #$02
ecd9: 85 f7       STA $f7
ecdb: 8d 00 00    STA $0000

ecde: 20 16 eb    JSR $eb16     ; $eb16 = data read routine?
ece1: 9c 72 22    STZ $2272
				; check error status
ece4: 20 c5 e9    JSR $e9c5
ece7: c9 00       CMP #$00
ece9: f0 c9       BEQ $ecb4
eceb: 20 0b e2    JSR $e20b

ecee: 90 01       BCC $ecf1
ecf0: 60          RTS

ecf1: 20 18 f3    JSR $f318     ; regload
					; zeo : entry point of error recovery function ?

ecf4: ad 7c 22    LDA $227c
ecf7: c9 10       CMP #$10
ecf9: 90 05       BCC $ed00

ecfb: a9 01       LDA #$01
ecfd: 8d 73 22    STA $2273     ; ($2273) = 1
ed00: 4c 0b ec    JMP $ec0b     ; goto CD_READ again without clearing ($2273)
					; and reg saving

					; zeo : beginning of read to MMR# routine

ed03: a6 f8       LDX $f8
ed05: f0 04       BEQ $ed0b     ; zeo : if no sector (nb_to_read == 0)
					; asked to read, exit with 0x22 return value

ed07: c9 07       CMP #$07
ed09: 30 03       BMI $ed0e     ; if A<7 (i.e. only 'normal' MMR asked to
					; be filled) then go on else ...

ed0b: a9 22       LDA #$22      ; return with 0x22 value (no reading done ?)
ed0d: 60          RTS

ed0e: aa          TAX           ; X = number of MMR to fill

ed0f: a9 01       LDA #$01
ed11: 0a          ASL a
ed12: ca          DEX
ed13: d0 fc       BNE $ed11     ; zeo : trick to fill A with 2^X ?

ed15: 8d 8f 22    STA $228f     ; ($228f) = bit mask correspnoding to the MMR ?
ed18: a9 43       LDA #$43
ed1a: 8d 8e 22    STA $228e     ; ($228e) = opcode of TMAi
ed1d: a9 60       LDA #$60
ed1f: 8d 90 22    STA $2290     ; ($2290) = opcode of RTS
ed22: 20 8e 22    JSR $228e     ; so load A with the Xth MMR
					; thanks to a self modificable piece of code

ed25: 8d 68 22    STA $2268     ; ($2268) = number of the current bank of the MMR
ed28: a5 fa       LDA $fa
ed2a: 85 fe       STA $fe       ; _dl = _bl (bank number)
ed2c: a5 f8       LDA $f8
ed2e: 8d 50 22    STA $2250     ; ($2250) = _al (number of block)
ed31: 4a          LSR a
ed32: 4a          LSR a         ; A >>= 2 (A /= 4)
ed33: 8d 80 22    STA $2280     ; ($2280) = number of block to read / 4
					; i.e. number of banks to fill

ed36: a5 f8       LDA $f8
ed38: 29 03       AND #$03
ed3a: 8d 81 22    STA $2281     ; ($2281) = number of block to read % 4

ed3d: 20 00 e9    JSR $e900     ; issue command
ed40: 09 40       ORA #$40
ed42: c9 c8       CMP #$c8
ed44: d0 3c       BNE $ed82     ; zeo : error ?

ed46: ad 80 22    LDA $2280     
ed49: f0 06       BEQ $ed51     ; zeo : if no more bank to fill comletely fo there

ed4b: a9 20       LDA #$20
ed4d: 85 f9       STA $f9       ; _ah = 0x20

ed4f: 80 0a       BRA $ed5b     ; so that ax will be set to 0x2000

ed51: ad 81 22    LDA $2281     ; here, no more bank got to be filled completely
ed54: f0 2c       BEQ $ed82     ; any incomplete bank to fill ?
					; in any case, ax will be set to ($2281) * 2048
					; (the nb of bytes to read)

ed56: 0a          ASL a
ed57: 0a          ASL a
ed58: 0a          ASL a
ed59: 85 f9       STA $f9
ed5b: 64 f8       STZ $f8       ; ax = number of bytes (from al = nb of sector)

ed5d: a5 ff       LDA $ff       ; A = _dh (the number of the MMR)
ed5f: 0a          ASL a
ed60: 0a          ASL a
ed61: 0a          ASL a
ed62: 0a          ASL a
ed63: 0a          ASL a
ed64: 85 fb       STA $fb
ed66: 64 fa       STZ $fa       ; zeo : BX = address to write (MMR first byte)
					; => address of related MMR ?
ed68: a9 53       LDA #$53
ed6a: 8d 8e 22    STA $228e
ed6d: a5 fe       LDA $fe       ; A = _dl
ed6f: 20 8e 22    JSR $228e     ; self modified code again
					; that load MMR with _dl value in fact
					; _dl = bank number to write to 

ed72: 20 79 ea    JSR $ea79     ; copy AX sectors to (BX)
					; i.e.

ed75: 09 40       ORA #$40
ed77: c9 c8       CMP #$c8
ed79: d0 07       BNE $ed82     ; zeo : error ?
	
ed7b: e6 fe       INC $fe       ; _dl ++
ed7d: ce 80 22    DEC $2280     ; nb_of_bank --
ed80: 10 c4       BPL $ed46     ; if any remaining, continue

ed82: 20 c5 e9    JSR $e9c5     ; zeo : error checking
ed85: c9 00       CMP #$00
ed87: f0 08       BEQ $ed91     ; zeo : if not pb, go on ?

ed89: 20 0b e2    JSR $e20b

ed8c: b0 03       BCS $ed91
ed8e: 4c f1 ec    JMP $ecf1

ed91: 48          PHA
ed92: a9 53       LDA #$53
ed94: 8d 8e 22    STA $228e
ed97: ad 68 22    LDA $2268     
ed9a: 20 8e 22    JSR $228e     ; self modificable code
ed9d: 68          PLA           ; that restore the original bank setting (?)

ed9e: 60          RTS

proc04:
; unknown
				; this routine appears (from the context in
				; which it is called) to convert a size in
				; bytes to a size in sectors
ed9f: a9 01       LDA #$01
eda1: 8d 81 22    STA $2281
eda4: a5 f9       LDA $f9       ; _ah (size high byte)
eda6: 4a          LSR a
eda7: 90 03       BCC $edac
eda9: 9c 81 22    STZ $2281

edac: 4a          LSR a
edad: 90 03       BCC $edb2
edaf: 9c 81 22    STZ $2281

edb2: 4a          LSR a
edb3: 90 03       BCC $edb8
edb5: 9c 81 22    STZ $2281

edb8: 8d 80 22    STA $2280
edbb: a5 f8       LDA $f8       ; _al (size low byte)
edbd: f0 03       BEQ $edc2
edbf: 9c 81 22    STZ $2281

edc2: ad 81 22    LDA $2281
edc5: d0 03       BNE $edca
edc7: ee 80 22    INC $2280
edca: 60          RTS

CD_SEEK:

edcb: 9c 73 22    STZ $2273
edce: 20 09 f3    JSR $f309     ; regsave
edd1: 20 ee f0    JSR $f0ee     ; reset_cd_arg_buffer

				; command 0x08: read sectors
edd4: a9 08       LDA #$08
edd6: 8d 4c 22    STA $224c

edd9: 20 04 f1    JSR $f104     ; proc02

eddc: a2 04       LDX #$04
edde: a0 01       LDY #$01
ede0: 20 27 f3    JSR $f327     ; copy_($f8-$fa)+X_to_($224c-$224e)+Y

ede3: a9 01       LDA #$01
ede5: 8d 50 22    STA $2250   ; ($2250) = 1

ede8: 20 00 e9    JSR $e900   ; send command to CD ports
edeb: c9 c8       CMP #$c8
eded: d0 03       BNE $edf2

edef: 20 5e eb    JSR $eb5e   ; empty buffer routine

edf2: 20 c5 e9    JSR $e9c5
edf5: c9 00       CMP #$00
edf7: f0 05       BEQ $edfe   ; routine at e9c5 return 0, then can quit

edf9: 20 0b e2    JSR $e20b

edfc: 90 01       BCC $edff
edfe: 60          RTS
edff: 20 18 f3    JSR $f318     ; regload
ee02: ad 7c 22    LDA $227c
ee05: c9 10       CMP #$10
ee07: 90 c8       BCC $edd1
ee09: a9 01       LDA #$01
ee0b: 8d 73 22    STA $2273
ee0e: 80 c1       BRA $edd1

CD_PLAY:

ee10: 20 09 f3    JSR $f309     ; regsave
ee13: 20 ee f0    JSR $f0ee     ; reset_cd_arg_buffer

ee16: a5 fb       LDA $fb       ; _bh
ee18: 29 c0       AND #$c0      ; only keep the 2 upper bits
ee1a: c9 c0       CMP #$c0
ee1c: f0 37       BEQ $ee55       ; go there if _bh & c0 = c0

ee1e: c9 80       CMP #$80
ee20: d0 04       BNE $ee26       ; if upper bit if _bh reset, _AX = 0

ee22: 64 f9       STZ $f9
ee24: 64 fa       STZ $fa
ee26: 8d 55 22    STA $2255       ; store _bh in $2255

				; command 0xd8: play?
ee29: a9 d8       LDA #$d8
ee2b: 8d 4c 22    STA $224c       ; set command to send

ee2e: a5 fb       LDA $fb       ; _bh
ee30: d0 08       BNE $ee3a       ; jump there if (_bh != 0)

ee32: 82          CLX             ; if (_bh == 0)
ee33: a0 03       LDY #$03        ; copy address in _AX:_bl to arg2,3,4
ee35: 20 27 f3    JSR $f327     ; copy_($f8-$fa)+X_to_($224c-$224e)+Y
ee38: 80 06       BRA $ee40

ee3a: 82          CLX             ; if (_bh != 0)
ee3b: a0 02       LDY #$02        ; copy address in _AX:_bl to arg1,2,3
ee3d: 20 27 f3    JSR $f327     ; copy_($f8-$fa)+X_to_($224c-$224e)+Y

				; issue play command
ee40: 20 00 e9    JSR $e900

ee43: 20 c5 e9    JSR $e9c5
ee46: c9 00       CMP #$00
ee48: f0 0b       BEQ $ee55
ee4a: 20 0b e2    JSR $e20b

ee4d: 90 01       BCC $ee50
ee4f: 60          RTS           ; all right, exiting

ee50: 20 18 f3    JSR $f318     ; regload
ee53: 80 be       BRA $ee13

ee55: a5 fb       LDA $fb     ; jump here if 2 upper bits of _bh set
ee57: 29 01       AND #$01    
ee59: f0 02       BEQ $ee5d   ; then the 0th bit of _bh must also be reset
ee5b: 62          CLA           ; else A=0 and we quit the function
ee5c: 60          RTS
ee5d: 20 ee f0    JSR $f0ee     ; reset_cd_arg_buffer

				; command 0xd9: play?
ee60: a9 d9       LDA #$d9
ee62: 8d 4c 22    STA $224c

ee65: a5 ff       LDA $ff       ; zeo: what can be the use of _dh here ?
ee67: 29 07       AND #$07
ee69: 8d 4d 22    STA $224d   ; why is it split in nibbles ?

ee6c: a5 ff       LDA $ff
ee6e: 29 c0       AND #$c0
ee70: 8d 55 22    STA $2255

ee73: d0 09       BNE $ee7e
ee75: a2 04       LDX #$04
ee77: a0 03       LDY #$03
ee79: 20 27 f3    JSR $f327     ; copy_($f8-$fa)+X_to_($224c-$224e)+Y
ee7c: 80 40       BRA $eebe

ee7e: c9 c0       CMP #$c0
ee80: f0 11       BEQ $ee93
ee82: c9 80       CMP #$80
ee84: d0 04       BNE $ee8a
ee86: 64 fd       STZ $fd
ee88: 64 fe       STZ $fe
ee8a: a2 04       LDX #$04
ee8c: a0 02       LDY #$02
ee8e: 20 27 f3    JSR $f327     ; copy_($f8-$fa)+X_to_($224c-$224e)+Y
ee91: 80 2b       BRA $eebe
ee93: ad 6c 22    LDA $226c
ee96: 8d 6f 22    STA $226f
ee99: ad 6d 22    LDA $226d
ee9c: 8d 70 22    STA $2270
ee9f: ad 6e 22    LDA $226e
eea2: 8d 71 22    STA $2271

eea5: 44 5b       BSR $ef02     ; zeo : subtract 2 frames from ($226f-$2271) ?

eea7: ad 6f 22    LDA $226f
eeaa: 8d 4e 22    STA $224e     ; set the result as the first arg of the 
eead: ad 70 22    LDA $2270     ; play request to the CD
eeb0: 8d 4f 22    STA $224f
eeb3: ad 71 22    LDA $2271
eeb6: 8d 50 22    STA $2250

eeb9: a9 40       LDA #$40
eebb: 8d 55 22    STA $2255
eebe: 20 00 e9    JSR $e900
eec1: c9 d8       CMP #$d8
eec3: f0 20       BEQ $eee5
eec5: ad 4d 22    LDA $224d
eec8: c9 04       CMP #$04
eeca: d0 03       BNE $eecf
eecc: ad 9c 22    LDA $229c
eecf: 8d 9c 22    STA $229c
eed2: c9 01       CMP #$01
eed4: f0 85       BEQ $ee5b
eed6: c9 02       CMP #$02
eed8: d0 0b       BNE $eee5
eeda: 9c a4 22    STZ $22a4
eedd: a9 20       LDA #$20
eedf: 0c 02 18    TSB $1802
eee2: 4c 5b ee    JMP $ee5b
eee5: ad 4d 22    LDA $224d
eee8: c9 04       CMP #$04
eeea: d0 03       BNE $eeef
eeec: 8d 9c 22    STA $229c
eeef: 20 c5 e9    JSR $e9c5
eef2: c9 00       CMP #$00
eef4: f0 0b       BEQ $ef01
eef6: 20 0b e2    JSR $e20b

eef9: b0 06       BCS $ef01
eefb: 20 18 f3    JSR $f318     ; regload
eefe: 4c 55 ee    JMP $ee55
ef01: 60          RTS


			; Zeo : this routines seems to subtract 2 frames to
			; MSF address in ($226f-$2271)

ef02: 48          PHA
ef03: f8          SED
ef04: ad 71 22    LDA $2271
ef07: 38          SEC
ef08: e9 01       SBC #$01
ef0a: 8d 71 22    STA $2271
ef0d: c9 75       CMP #$75
ef0f: 90 20       BCC $ef31
ef11: a9 74       LDA #$74
ef13: 8d 71 22    STA $2271
ef16: ad 70 22    LDA $2270
ef19: 38          SEC
ef1a: e9 01       SBC #$01
ef1c: 8d 70 22    STA $2270
ef1f: c9 60       CMP #$60
ef21: 90 0e       BCC $ef31
ef23: a9 59       LDA #$59
ef25: 8d 70 22    STA $2270
ef28: ad 6f 22    LDA $226f
ef2b: 38          SEC
ef2c: e9 01       SBC #$01
ef2e: 8d 6f 22    STA $226f
ef31: d8          CLD
ef32: 68          PLA
ef33: 60          RTS

CD_SEARCH:

ef34: 20 09 f3    JSR $f309     ; regsave
ef37: 20 ee f0    JSR $f0ee     ; reset_cd_arg_buffer

				; command 0xd8: play?
ef3a: a9 d8       LDA #$d8
ef3c: 8d 4c 22    STA $224c

ef3f: a5 fb       LDA $fb       ; load _bh
ef41: 29 c0       AND #$c0      
ef43: 8d 55 22    STA $2255
ef46: d0 08       BNE $ef50     ; if (_bh & c0 != 0)
					; copy _AX:_bl to arg2,3,4
ef48: 82          CLX   
ef49: a0 03       LDY #$03
ef4b: 20 27 f3    JSR $f327     ; copy_($f8-$fa)+X_to_($224c-$224e)+Y
ef4e: 80 0e       BRA $ef5e

ef50: c9 80       CMP #$80      ; else if (_bh & c0 == 0)
					; if (_bh & c0 == 80)
ef52: d0 04       BNE $ef58
ef54: 64 f9       STZ $f9       ; clear _AX
ef56: 64 fa       STZ $fa

ef58: 82          CLX
ef59: a0 02       LDY #$02              ; then copy _AX:_bl to arg1,2,3
ef5b: 20 27 f3    JSR $f327     ; copy_($f8-$fa)+X_to_($224c-$224e)+Y

ef5e: a5 fb       LDA $fb
ef60: aa          TAX           ; X = _bh
ef61: 29 01       AND #$01      ; A = _bh & 1
ef63: 8d 48 22    STA $2248

ef66: 8a          TXA           ; A = _bh anew

ef67: 29 02       AND #$02
ef69: 4a          LSR a         ; A = (_bh & 2 != 0)

ef6a: 8d 4d 22    STA $224d     ; and this boolean is set as arg0

ef6d: 20 00 e9    JSR $e900

ef70: ad 48 22    LDA $2248     ; if (_bh & 1 != 0)
ef73: f0 0d       BEQ $ef82

ef75: 9c a4 22    STZ $22a4

ef78: a9 20       LDA #$20
ef7a: 0c 02 18    TSB $1802

ef7d: 9c 48 22    STZ $2248

ef80: 62          CLA
ef81: 60          RTS

ef82: 20 c5 e9    JSR $e9c5
ef85: c9 00       CMP #$00
ef87: f0 0a       BEQ $ef93
ef89: 20 0b e2    JSR $e20b

ef8c: b0 05       BCS $ef93
ef8e: 20 18 f3    JSR $f318     ; regload
ef91: 80 a4       BRA $ef37
ef93: 60          RTS

CD_PAUSE:

ef94: a9 56       LDA #$56
ef96: 85 fa       STA $fa       ; _bl
ef98: a9 22       LDA #$22
ef9a: 85 fb       STA $fb       ; _bh
ef9c: 44 21       BSR $efbf     ; CD_SUBQ
ef9e: ad 56 22    LDA $2256
efa1: c9 00       CMP #$00    ; check if already paused ?
efa3: f0 02       BEQ $efa7
efa5: 62          CLA         ; if so, just quit
efa6: 60          RTS
efa7: 20 ee f0    JSR $f0ee     ; reset_cd_arg_buffer

				; command 0xda: pause?
efaa: a9 da       LDA #$da
efac: 8d 4c 22    STA $224c

efaf: 20 00 e9    JSR $e900
efb2: 20 c5 e9    JSR $e9c5
efb5: c9 00       CMP #$00
efb7: f0 05       BEQ $efbe ; func at $e9c5 had returned 0, we can quit
efb9: 20 0b e2    JSR $e20b

efbc: 90 d6       BCC $ef94     ; CD_PAUSE
efbe: 60          RTS

CD_SUBQ:

efbf: 20 09 f3    JSR $f309     ; regsave
efc2: 20 ee f0    JSR $f0ee     ; reset_cd_arg_buffer

				; command 0xdd: read Q subchannel?
efc5: a9 dd       LDA #$dd
efc7: 8d 4c 22    STA $224c
				; parameter 0x0a: ??? (zeo : length of buffer to fill ?)
efca: a9 0a       LDA #$0a
efcc: 8d 4d 22    STA $224d
efcf: 20 00 e9    JSR $e900

efd2: c9 c8       CMP #$c8
efd4: d0 09       BNE $efdf

efd6: a9 0a       LDA #$0a
efd8: 85 f8       STA $f8
efda: 64 f9       STZ $f9
efdc: 20 3b ea    JSR $ea3b     ; copy 0xA bytes from the cd to _BX set as an
					; argument by the calling function

efdf: 20 c5 e9    JSR $e9c5
efe2: c9 00       CMP #$00
efe4: f0 0a       BEQ $eff0

efe6: 20 0b e2    JSR $e20b

efe9: b0 05       BCS $eff0

efeb: 20 18 f3    JSR $f318     ; regload
efee: 80 d2       BRA $efc2
eff0: 60          RTS

CD_DINFO:

eff1: 20 09 f3    JSR $f309     ; regsave
eff4: 20 ee f0    JSR $f0ee     ; reset_cd_arg_buffer
				; command 0xde: get directory info
eff7: a9 de       LDA #$de
eff9: 8d 4c 22    STA $224c

effc: a5 f8       LDA $f8       ; _al
effe: 8d 4d 22    STA $224d
f001: a5 f9       LDA $f9       ; _ah
f003: 8d 4e 22    STA $224e
f006: 20 00 e9    JSR $e900

f009: c9 c8       CMP #$c8
f00b: d0 09       BNE $f016

f00d: a9 04       LDA #$04
f00f: 85 f8       STA $f8
f011: 64 f9       STZ $f9
f013: 20 3b ea    JSR $ea3b

f016: 20 c5 e9    JSR $e9c5
f019: 48          PHA
f01a: 20 18 f3    JSR $f318     ; regload
f01d: 68          PLA
f01e: c9 00       CMP #$00
f020: f0 0a       BEQ $f02c
f022: 20 0b e2    JSR $e20b

f025: b0 05       BCS $f02c
f027: 20 18 f3    JSR $f318     ; regload
f02a: 80 c8       BRA $eff4
f02c: 60          RTS

EX_GETVER:

f02d: ae c2 fe    LDX $fec2
f030: ac c3 fe    LDY $fec3
f033: 60          RTS

EX_SETVEC:

f034: 08          PHP
f035: 78          SEI
f036: c9 06       CMP #$06
f038: d0 08       BNE $f042
f03a: 8e 84 22    STX $2284
f03d: 8c 85 22    STY $2285
f040: 80 0f       BRA $f051
f042: 48          PHA
f043: 5a          PHY
f044: da          PHX
f045: 0a          ASL a
f046: aa          TAX
f047: 68          PLA
f048: 9d 00 22    STA $2200, X
f04b: e8          INX
f04c: 68          PLA
f04d: 9d 00 22    STA $2200, X
f050: 68          PLA
f051: 28          PLP
f052: 60          RTS

				; this routine probably load the currect system
				; status from the CD system into a buffer
f053: 20 f9 f0    JSR $f0f9     ; proc04, clear 9 bytes at $2256, local
					; result buffer

f056: 20 ee f0    JSR $f0ee     ; reset_cd_arg_buffer

				; command 0x03: get system status?
f059: a9 03       LDA #$03
f05b: 8d 4c 22    STA $224c

f05e: a9 0a       LDA #$0a
f060: 8d 50 22    STA $2250

f063: 20 00 e9    JSR $e900

f066: c9 c8       CMP #$c8
f068: d0 11       BNE $f07b

				; load 10 bytes from CD system to $2256
f06a: a9 56       LDA #$56
f06c: 85 fa       STA $fa
f06e: a9 22       LDA #$22
f070: 85 fb       STA $fb       ; zeo : _BX = $2256

f072: a9 0a       LDA #$0a
f074: 85 f8       STA $f8
f076: 64 f9       STZ $f9       ; zeo : _AX = $000a (10d)
f078: 20 3b ea    JSR $ea3b

f07b: 20 c5 e9    JSR $e9c5
f07e: 48          PHA
f07f: c9 00       CMP #$00
f081: d0 0c       BNE $f08f

f083: ad 58 22    LDA $2258
f086: 8d 7d 22    STA $227d     ; zeo : ($227d) = info_buf[2]

f089: ad 5f 22    LDA $225f
f08c: 8d 7c 22    STA $227c     ; zeo : ($227c) = info_buf[9]

f08f: 68          PLA
f090: 60          RTS

				; a status check routine?
f091: 44 5b       BSR $f0ee     ; reset_cd_arg_buffer
				; command 0x00: reset? check status?
f093: a9 00       LDA #$00
f095: 8d 4c 22    STA $224c

f098: 20 00 e9    JSR $e900
f09b: 20 c5 e9    JSR $e9c5
f09e: c9 00       CMP #$00
f0a0: f0 05       BEQ $f0a7
f0a2: 20 0b e2    JSR $e20b

f0a5: 38          SEC
f0a6: 60          RTS
f0a7: 18          CLC
f0a8: 60          RTS

CD_CONTNTS:

f0a9: 64 f8       STZ $f8
f0ab: a9 56       LDA #$56
f0ad: 85 fa       STA $fa
f0af: a9 22       LDA #$22
f0b1: 85 fb       STA $fb
f0b3: 20 f1 ef    JSR $eff1     ; CD_DINFO
f0b6: c9 00       CMP #$00
f0b8: d0 33       BNE $f0ed

f0ba: ad 56 22    LDA $2256
f0bd: 8d 6a 22    STA $226a
f0c0: ad 57 22    LDA $2257
f0c3: 8d 6b 22    STA $226b

f0c6: a9 01       LDA #$01
f0c8: 85 f8       STA $f8
f0ca: a9 56       LDA #$56
f0cc: 85 fa       STA $fa
f0ce: a9 22       LDA #$22
f0d0: 85 fb       STA $fb
f0d2: 20 f1 ef    JSR $eff1     ; CD_DINFO
f0d5: c9 00       CMP #$00
f0d7: d0 14       BNE $f0ed

f0d9: 48          PHA
f0da: ad 56 22    LDA $2256
f0dd: 8d 6c 22    STA $226c
f0e0: ad 57 22    LDA $2257
f0e3: 8d 6d 22    STA $226d
f0e6: ad 58 22    LDA $2258
f0e9: 8d 6e 22    STA $226e
f0ec: 68          PLA

f0ed: 60          RTS

reset_cd_arg_buffer:
; clears 8 bytes at $224d-2254 to 0
; reset the local buffer

f0ee: da          PHX
f0ef: a2 09       LDX #$09
f0f1: 9e 4c 22    STZ $224c, X
f0f4: ca          DEX
f0f5: d0 fa       BNE $f0f1
f0f7: fa          PLX
f0f8: 60          RTS

proc04:
; clears 9 bytes at $2256-225f to 0

f0f9: da          PHX
f0fa: a2 09       LDX #$09
f0fc: 9e 56 22    STZ $2256, X
f0ff: ca          DEX
f100: 10 fa       BPL $f0fc
f102: fa          PLX
f103: 60          RTS

proc02:
; unknown

; zeo : we can think about an operation on lba (lsn) or msf address
; maybe add an address in dl:ch:cl in ($2274), it could be the way
; it finds the beginning of a track, or somewhere inside, if the
; beginning if known, ...
; also ($2273) *= 3

f104: ad 73 22    LDA $2273
f107: 0a          ASL a
f108: 18          CLC
f109: 6d 73 22    ADC $2273     ; ($2273)*= 3

f10c: a8          TAY           ; Y = ($2273)

f10d: a5 fe       LDA $fe       ; _dl
f10f: 18          CLC
f110: 79 76 22    ADC $2276, Y
f113: 85 fe       STA $fe       ; _dl
f115: a5 fd       LDA $fd       ; _ch
f117: 79 75 22    ADC $2275, Y
f11a: 85 fd       STA $fd       ; _ch
f11c: a5 fc       LDA $fc       ; _cl
f11e: 79 74 22    ADC $2274, Y
f121: 85 fc       STA $fc       ; _cl
f123: 60          RTS

EX_GETFNT:

f124: 20 e3 f1    JSR $f1e3
f127: 90 03       BCC $f12c
f129: a9 01       LDA #$01
f12b: 60          RTS
f12c: a9 a0       LDA #$a0
f12e: 85 fc       STA $fc
f130: a5 fb       LDA $fb
f132: 38          SEC
f133: e9 a0       SBC #$a0
f135: 10 0c       BPL $f143
f137: 43 20       TMA #$20
f139: 8d ba 22    STA $22ba
f13c: 43 40       TMA #$40
f13e: 8d bb 22    STA $22bb
f141: 80 0e       BRA $f151
f143: a9 60       LDA #$60
f145: 85 fc       STA $fc
f147: 43 08       TMA #$08
f149: 8d b8 22    STA $22b8
f14c: 43 10       TMA #$10
f14e: 8d b9 22    STA $22b9
f151: a5 f8       LDA $f8
f153: 85 ec       STA $ec
f155: a5 f9       LDA $f9
f157: 85 ed       STA $ed
f159: 64 ee       STZ $ee
f15b: 0f ff 1f    BBR0 $ff, $f17d
f15e: a2 08       LDX #$08
f160: 18          CLC
f161: a5 ec       LDA $ec
f163: 65 f8       ADC $f8
f165: 85 ec       STA $ec
f167: a5 ed       LDA $ed
f169: 65 f9       ADC $f9
f16b: 85 ed       STA $ed
f16d: 62          CLA
f16e: 65 ee       ADC $ee
f170: 85 ee       STA $ee
f172: ca          DEX
f173: d0 eb       BNE $f160
f175: 06 ec       ASL $ec
f177: 26 ed       ROL $ed
f179: 26 ee       ROL $ee
f17b: 80 0b       BRA $f188
f17d: a2 05       LDX #$05
f17f: 06 ec       ASL $ec
f181: 26 ed       ROL $ed
f183: 26 ee       ROL $ee
f185: ca          DEX
f186: d0 f7       BNE $f17f
f188: a5 ff       LDA $ff
f18a: 0a          ASL a
f18b: 1a          INC a
f18c: 65 ee       ADC $ee
f18e: 85 ee       STA $ee
f190: a5 ed       LDA $ed
f192: a2 05       LDX #$05
f194: 46 ee       LSR $ee
f196: 6a          ROR a
f197: ca          DEX
f198: d0 fa       BNE $f194
f19a: 85 ee       STA $ee
f19c: a5 ed       LDA $ed
f19e: 29 1f       AND #$1f
f1a0: 18          CLC
f1a1: 65 fc       ADC $fc
f1a3: 85 ed       STA $ed
f1a5: a5 ee       LDA $ee
f1a7: ff fc 07    BBS7 $fc, $f1b1
f1aa: 53 08       TAM #$08
f1ac: 1a          INC a
f1ad: 53 10       TAM #$10
f1af: 80 05       BRA $f1b6
f1b1: 53 20       TAM #$20
f1b3: 1a          INC a
f1b4: 53 40       TAM #$40
f1b6: 8f ff 0c    BBS0 $ff, $f1c5
f1b9: c2          CLY
f1ba: b1 ec       LDA ($ec), Y
f1bc: 91 fa       STA ($fa), Y
f1be: c8          INY
f1bf: c0 20       CPY #$20
f1c1: d0 f7       BNE $f1ba
f1c3: 80 03       BRA $f1c8
f1c5: 20 cc f2    JSR $f2cc
f1c8: ff fc 0c    BBS7 $fc, $f1d7
f1cb: ad b8 22    LDA $22b8
f1ce: 53 08       TAM #$08
f1d0: ad b9 22    LDA $22b9
f1d3: 53 10       TAM #$10
f1d5: 80 0a       BRA $f1e1
f1d7: ad ba 22    LDA $22ba
f1da: 53 20       TAM #$20
f1dc: ad bb 22    LDA $22bb
f1df: 53 40       TAM #$40
f1e1: 62          CLA
f1e2: 60          RTS
f1e3: a5 f9       LDA $f9
f1e5: 38          SEC
f1e6: e9 81       SBC #$81
f1e8: c9 6f       CMP #$6f
f1ea: b0 28       BCS $f214
f1ec: c9 1f       CMP #$1f
f1ee: 90 06       BCC $f1f6
f1f0: c9 3f       CMP #$3f
f1f2: 90 20       BCC $f214
f1f4: e9 40       SBC #$40
f1f6: 0a          ASL a
f1f7: 69 21       ADC #$21
f1f9: 85 f9       STA $f9
f1fb: a5 f8       LDA $f8
f1fd: 38          SEC
f1fe: e9 40       SBC #$40
f200: c9 bd       CMP #$bd
f202: b0 10       BCS $f214
f204: c9 3f       CMP #$3f
f206: f0 0c       BEQ $f214
f208: b0 01       BCS $f20b
f20a: 1a          INC a
f20b: c9 5f       CMP #$5f
f20d: b0 07       BCS $f216
f20f: 18          CLC
f210: 69 20       ADC #$20
f212: 80 07       BRA $f21b
f214: 38          SEC
f215: 60          RTS
f216: e6 f9       INC $f9
f218: 38          SEC
f219: e9 3e       SBC #$3e
f21b: 85 f8       STA $f8
f21d: a5 f9       LDA $f9
f21f: c9 23       CMP #$23
f221: f0 19       BEQ $f23c
f223: c9 26       CMP #$26
f225: f0 28       BEQ $f24f
f227: c9 27       CMP #$27
f229: f0 2e       BEQ $f259
f22b: c9 28       CMP #$28
f22d: 90 36       BCC $f265
f22f: c9 30       CMP #$30
f231: 90 e1       BCC $f214
f233: c9 50       CMP #$50
f235: b0 dd       BCS $f214
f237: 38          SEC
f238: e9 08       SBC #$08
f23a: 80 29       BRA $f265
f23c: a5 f8       LDA $f8
f23e: c9 61       CMP #$61
f240: 90 02       BCC $f244
f242: e9 06       SBC #$06
f244: c9 41       CMP #$41
f246: 90 02       BCC $f24a
f248: e9 07       SBC #$07
f24a: 38          SEC
f24b: e9 0f       SBC #$0f
f24d: 80 12       BRA $f261
f24f: a5 f8       LDA $f8
f251: c9 41       CMP #$41
f253: 90 0c       BCC $f261
f255: e9 08       SBC #$08
f257: 80 08       BRA $f261
f259: a5 f8       LDA $f8
f25b: c9 51       CMP #$51
f25d: 90 02       BCC $f261
f25f: e9 0f       SBC #$0f
f261: 85 f8       STA $f8
f263: a5 f9       LDA $f9
f265: 38          SEC
f266: e9 21       SBC #$21
f268: 0a          ASL a
f269: a8          TAY
f26a: a5 f8       LDA $f8
f26c: 38          SEC
f26d: e9 21       SBC #$21
f26f: 18          CLC
f270: 79 7e f2    ADC $f27e, Y
f273: 85 f8       STA $f8
f275: b9 7f f2    LDA $f27f, Y
f278: 69 00       ADC #$00
f27a: 85 f9       STA $f9
f27c: 18          CLC
f27d: 60          RTS
f27e: 00 00       BRK #$00
f280: 5e 00 6c    LSR $6c00, X
f283: 00 aa       BRK #$aa
f285: 00 fd       BRK #$fd
f287: 00 53       BRK #$53
f289: 01 83       ORA ($83, X)
f28b: 01 c5       ORA ($c5, X)
f28d: 01 23       ORA ($23, X)
f28f: 02          SXY
f290: 81 02       STA ($02, X)
f292: df 02 3d    BBS5 $02, $f2d2
f295: 03 9b       ST0 #$9b
f297: 03 f9       ST0 #$f9
f299: 03 57       ST0 #$57
f29b: 04 b5       TSB $b5
f29d: 04 13       TSB $13
f29f: 05 71       ORA $71
f2a1: 05 cf       ORA $cf
f2a3: 05 2d       ORA $2d
f2a5: 06 8b       ASL $8b
f2a7: 06 e9       ASL $e9
f2a9: 06 47       ASL $47
f2ab: 07 a5       RMB0 $a5
f2ad: 07 03       RMB0 $03
f2af: 08          PHP
f2b0: 61 08       ADC ($08, X)
f2b2: bf 08 1d    BBS3 $08, $f2d2
f2b5: 09 7b       ORA #$7b
f2b7: 09 d9       ORA #$d9
f2b9: 09 37       ORA #$37
f2bb: 0a          ASL a
f2bc: 95 0a       STA $0a, X
f2be: f3 0a 51 0b af 0b 0d    TAI $510a, $af0b, $0d0b
f2c5: 0c 6b 0c    TSB $0c6b
f2c8: c9 0c       CMP #$0c
f2ca: 27 0d       RMB2 $0d
f2cc: c2          CLY
f2cd: b1 ec       LDA ($ec), Y
f2cf: c8          INY
f2d0: 44 2e       BSR $f300
f2d2: b1 ec       LDA ($ec), Y
f2d4: c8          INY
f2d5: 48          PHA
f2d6: 29 f0       AND #$f0
f2d8: 44 26       BSR $f300
f2da: b1 ec       LDA ($ec), Y
f2dc: c8          INY
f2dd: 8d bd 22    STA $22bd
f2e0: 68          PLA
f2e1: a2 04       LDX #$04
f2e3: 0e bd 22    ASL $22bd
f2e6: 2a          ROL a
f2e7: ca          DEX
f2e8: d0 f9       BNE $f2e3
f2ea: 44 14       BSR $f300
f2ec: ad bd 22    LDA $22bd
f2ef: 29 f0       AND #$f0
f2f1: 44 0d       BSR $f300
f2f3: c0 12       CPY #$12
f2f5: 90 d6       BCC $f2cd
f2f7: 62          CLA
f2f8: a0 07       LDY #$07
f2fa: 91 fa       STA ($fa), Y
f2fc: 88          DEY
f2fd: 10 fb       BPL $f2fa
f2ff: 60          RTS
f300: 92 fa       STA ($fa)
f302: e6 fa       INC $fa
f304: d0 02       BNE $f308
f306: e6 fb       INC $fb
f308: 60          RTS

regsave:
; copies 8 bytes from $f8-ff to $2260-2267

f309: da          PHX
f30a: 48          PHA
f30b: a2 07       LDX #$07
f30d: b5 f8       LDA $f8, X
f30f: 9d 60 22    STA $2260, X
f312: ca          DEX
f313: 10 f8       BPL $f30d
f315: 68          PLA
f316: fa          PLX
f317: 60          RTS

regload:
; copies 8 bytes from $2260-2267 to $f8-ff

f318: da          PHX
f319: 48          PHA
f31a: a2 07       LDX #$07
f31c: bd 60 22    LDA $2260, X
f31f: 95 f8       STA $f8, X
f321: ca          DEX
f322: 10 f8       BPL $f31c
f324: 68          PLA
f325: fa          PLX
f326: 60          RTS

copy_($f8-$fa)+X_to_($224c-$224e)+Y:
; unknown
; copy ($f8-$fa)+X to ($224c-$224e)+Y

f327: b5 f8       LDA $f8, X
f329: 99 4c 22    STA $224c, Y
f32c: b5 f9       LDA $f9, X
f32e: 99 4d 22    STA $224d, Y
f331: b5 fa       LDA $fa, X
f333: 99 4e 22    STA $224e, Y
f336: 60          RTS

				; this routine appears to set the VDP address
				; in preparation for writing. It also does
				; stuff to $2272?
				; zeo : word at ($02) is set to bx (address)
f337: a9 01       LDA #$01
f339: 8d 72 22    STA $2272     ; ($2272) = 1
f33c: a5 fa       LDA $fa
f33e: 8d 02 00    STA $0002     ; ($02) = bl
f341: a5 fb       LDA $fb
f343: 8d 03 00    STA $0003     ; ($03) = bh
f346: 60          RTS

CD_STAT:

f347: c9 00       CMP #$00
f349: d0 06       BNE $f351
f34b: ad 00 18    LDA $1800     ; cd status register?
f34e: 29 80       AND #$80
f350: 60          RTS
f351: 4c 91 f0    JMP $f091

CD_SUBRD:

f354: 93 10 03 18 TST #$10, $1803       ; some sort of flags?
f358: f0 08       BEQ $f362
f35a: ad 07 18    LDA $1807     ; subchannel data?
f35d: 8d 7e 22    STA $227e
f360: 18          CLC
f361: 60          RTS
f362: 38          SEC           ; error if ($1803 & 0x10)
f363: 60          RTS

CD_PCMRD:

f364: 8d 05 18    STA $1805

f367: a2 1b       LDX #$1b
f369: ca          DEX           ; little waiting loop
f36a: d0 fd       BNE $f369

f36c: ae 05 18    LDX $1805
f36f: ac 06 18    LDY $1806

f372: ad 03 18    LDA $1803
f375: 29 02       AND #$02
f377: 4a          LSR a
f378: 60          RTS

CD_FADE:

f379: 29 0f       AND #$0f
f37b: 8d 0f 18    STA $180f
f37e: 60          RTS

AD_RESET:

f37f: a9 80       LDA #$80
f381: 8d 0d 18    STA $180d
f384: 9c 0d 18    STZ $180d

f387: 9c 0b 18    STZ $180b

f38a: a9 6f       LDA #$6f
f38c: 1c 02 18    TRB $1802

f38f: 9c 0e 18    STZ $180e
f392: 60          RTS

AD_TRANS:
				; test something
				; if ($180b & 3) { return error; }
f393: 93 03 0b 18 TST #$03, $180b
f397: f0 04       BEQ $f39d

				; return error
f399: a9 04       LDA #$04
f39b: 80 60       BRA $f3fd     ; return location

				; normal, ADPCM not busy
f39d: 9c 73 22    STZ $2273
f3a0: 20 09 f3    JSR $f309     ; regsave

f3a3: a5 ff       LDA $ff       ; A = _dh
f3a5: d0 0a       BNE $f3b1     ; if (_dh != 0) goto $f3b1

				; set ADPCM buffer address?
f3a7: a6 fa       LDX $fa
f3a9: a4 fb       LDY $fb
f3ab: 20 29 f7    JSR $f729     ; ad_write16
				; zeo : this writes _BX in the ratch value of ADPCM

				; do ADPCM stuff?
f3ae: 20 10 f7    JSR $f710     ; zeo: ($180d) |= 3 then ($180d) &= ~1
				  and  ($180d) &= ~2

				; clear command buffer
f3b1: 20 ee f0    JSR $f0ee     ; proc01

				; command 0x08: read sectors
f3b4: a9 08       LDA #$08
f3b6: 8d 4c 22    STA $224c

				; address conversions?
f3b9: 20 04 f1    JSR $f104     ; zeo : convert address relative to code track
					; to absolute sector address on CD
					; address in ($fc-$fe)

f3bc: a2 04       LDX #$04
f3be: a0 01       LDY #$01
f3c0: 20 27 f3    JSR $f327     ; copy_($f8-$fa)+X_to_($224c-$224e)+Y
					; copy absolute address to read from in ($224d-$224f)
					; i.e. args of read sector function

f3c3: a5 f8       LDA $f8       
f3c5: 8d 50 22    STA $2250     ; read (_al) sectors argument

				; issue command
f3c8: 20 00 e9    JSR $e900

				; ??? request attention?
				; ??? enable DMA?
f3cb: a9 02       LDA #$02
f3cd: 8d 0b 18    STA $180b     ; ($180B) = 0x02 (zeo : making a DMA function here
						works very well) 

				; this appears to be where DX is messing up
				; do {
				;   while (!($180c & 4)) { /* NOTHING */ }
f3d0: 93 04 0c 18 TST #$04, $180c
f3d4: d0 fa       BNE $f3d0
				; while (!($1803 & 0x20));
f3d6: ad 03 18    LDA $1803
f3d9: 29 20       AND #$20
f3db: f0 f3       BEQ $f3d0

				; ??? disable DMA?
f3dd: 9c 0b 18    STZ $180b

				; check error code?
f3e0: 20 c5 e9    JSR $e9c5
f3e3: c9 00       CMP #$00
f3e5: f0 16       BEQ $f3fd     ; ret_location

f3e7: 20 0b e2    JSR $e20b

f3ea: b0 11       BCS $f3fd
f3ec: 20 18 f3    JSR $f318     ; regload

f3ef: ad 7c 22    LDA $227c
f3f2: c9 10       CMP #$10
f3f4: 90 ad       BCC $f3a3
f3f6: a9 01       LDA #$01
f3f8: 8d 73 22    STA $2273
f3fb: 80 a6       BRA $f3a3
f3fd: 60          RTS

				; read a byte from ADPCM?
f3fe: ad 0c 18    LDA $180c     ; zeo : wait while highest bit of $180c is set
f401: 30 fb       BMI $f3fe     ; i.e. wait for data to be ready

f403: ad 0a 18    LDA $180a
f406: 60          RTS

AD_READ:
				; spinwait until ADPCM not busy
f407: 20 db f6    JSR $f6db
f40a: d0 fb       BNE $f407

				; set ADPCM buffer address?
f40c: a6 fc       LDX $fc
f40e: a4 fd       LDY $fd       ; X:Y = _CX (adpcm buffer address)
f410: 20 29 f7    JSR $f729     ; ad_write16 (set buffer address)

				; set 16-bit data as buffer address?
f413: 20 ff f6    JSR $f6ff

				; read a byte from ADPCM?
f416: 44 e6       BSR $f3fe ; zeo: hmm, the first value is discarded ?

				; dispatch on destination?
				; $ff == 0x00: read to memory
f418: a5 ff       LDA $ff
f41a: f0 07       BEQ $f423
				; $ff == 0xff: read to VRAM
f41c: c9 ff       CMP #$ff
f41e: f0 1d       BEQ $f43d
				; all else: ???
				; zeo : direct bank set ?
f420: 4c 6b f4    JMP $f46b

				; main read loop begins here
				; read a byte from ADPCM?

f423: 44 d9       BSR $f3fe     ; read a byte from ADPCM to A reg

f425: 92 fa       STA ($fa)
f427: e6 fa       INC $fa       ; all of this store one byte from ADPCM to
f429: d0 02       BNE $f42d     ; (_BX++)
f42b: e6 fb       INC $fb

f42d: a5 f8       LDA $f8
f42f: d0 02       BNE $f433
f431: c6 f9       DEC $f9
f433: c6 f8       DEC $f8
f435: a5 f8       LDA $f8
f437: 05 f9       ORA $f9
f439: d0 e8       BNE $f423     ; while (-- _AX) { = length}, continue

f43b: 62          CLA           ; A = 0, all fine
f43c: 60          RTS

f43d: a9 00       LDA #$00      ; Write ADPCM data to VRAM
f43f: 85 f7       STA $f7       ; ($f7) = 0
f441: 8d 00 00    STA $0000     ; set VDC reg to mem write position

f444: 20 f5 f6    JSR $f6f5   ; send _BX for write mem position and set _BX to 2

f447: a9 02       LDA #$02
f449: 85 f7       STA $f7       ; ($f7) = 2
f44b: 8d 00 00    STA $0000     ; set VDC reg to write mem action

f44e: 44 ae       BSR $f3fe     ; Read ADPCM data in A

f450: 92 fa       STA ($fa)     ; write once at $02, once at $03
f452: a5 fa       LDA $fa
f454: 49 01       EOR #$01      ; altern between $02 and $03 value in (_BX)
f456: 85 fa       STA $fa

f458: a5 f8       LDA $f8
f45a: d0 02       BNE $f45e
f45c: c6 f9       DEC $f9       ; _AX --
f45e: c6 f8       DEC $f8       

f460: a5 f8       LDA $f8
f462: 05 f9       ORA $f9       ; if (_AX != 0) continue
f464: d0 e8       BNE $f44e

f466: 9c 72 22    STZ $2272     ; hmm, ($2272) = 0, set to 1 before the writing
					; what can be it use
f469: 62          CLA           ; A = 0, all fine
f46a: 60          RTS

f46b: c9 07       CMP #$07
f46d: 30 03       BMI $f472     ; if A>= 07, quit with error value
f46f: a9 22       LDA #$22
f471: 60          RTS

f472: aa          TAX
f473: a9 01       LDA #$01

f475: 0a          ASL a
f476: ca          DEX
f477: d0 fc       BNE $f475     ; zeo : create mask corresponding to the MMR

f479: 8d 8f 22    STA $228f

f47c: a9 43       LDA #$43
f47e: 8d 8e 22    STA $228e

f481: a9 60       LDA #$60
f483: 8d 90 22    STA $2290

f486: 20 8e 22    JSR $228e     ; zeo : self modifying code, A = MMRi

f489: 8d 68 22    STA $2268     ; store old value for MMRi

f48c: a5 fa       LDA $fa       
f48e: 85 fe       STA $fe       ; _dl = _bl

f490: a5 ff       LDA $ff
f492: 0a          ASL a
f493: 0a          ASL a
f494: 0a          ASL a
f495: 0a          ASL a
f496: 0a          ASL a

f497: 85 fb       STA $fb
f499: 64 fa       STZ $fa

f49b: a9 53       LDA #$53
f49d: 8d 8e 22    STA $228e
f4a0: a5 fe       LDA $fe
f4a2: 20 8e 22    JSR $228e
f4a5: a2 20       LDX #$20
f4a7: c2          CLY
				; read byte from ADPCM
f4a8: 20 fe f3    JSR $f3fe
f4ab: 92 fa       STA ($fa)
f4ad: e6 fa       INC $fa
f4af: d0 02       BNE $f4b3
f4b1: e6 fb       INC $fb
f4b3: a5 f8       LDA $f8
f4b5: d0 02       BNE $f4b9
f4b7: c6 f9       DEC $f9
f4b9: c6 f8       DEC $f8
f4bb: a5 f8       LDA $f8
f4bd: 05 f9       ORA $f9
f4bf: f0 0a       BEQ $f4cb
f4c1: 88          DEY
f4c2: d0 e4       BNE $f4a8
f4c4: ca          DEX
f4c5: d0 e1       BNE $f4a8

f4c7: e6 fe       INC $fe       ; _dl ++
f4c9: 80 c5       BRA $f490

f4cb: a9 53       LDA #$53
f4cd: 8d 8e 22    STA $228e
f4d0: ad 68 22    LDA $2268
f4d3: 20 8e 22    JSR $228e
f4d6: 62          CLA
f4d7: 60          RTS

AD_WRITE:
				; usual error check
f4d8: ad 0b 18    LDA $180b
f4db: 29 03       AND #$03
f4dd: d0 3d       BNE $f51c

				; check for _CX == 0xffff?
				; _CX is normaly buffer address
f4df: a5 fc       LDA $fc
f4e1: 25 fd       AND $fd
f4e3: c9 ff       CMP #$ff
f4e5: f0 0a       BEQ $f4f1

				; set a buffer address?
f4e7: a6 fc       LDX $fc
f4e9: a4 fd       LDY $fd
f4eb: 20 29 f7    JSR $f729     ; ad_write16

				; set adpcm write mode?
f4ee: 20 10 f7    JSR $f710     ; hmm, set buffer address maybe (zeo)

f4f1: a5 ff       LDA $ff
f4f3: f0 07       BEQ $f4fc     ; if dh = 0, then it's local read

f4f5: c9 ff       CMP #$ff
f4f7: f0 24       BEQ $f51d     ; if dh = 0xFF, VRAM read

f4f9: 4c 52 f5    JMP $f552

				; copy memory->ADPCM
f4fc: b2 fa       LDA ($fa)     ; load (_BX)
f4fe: 8d 0a 18    STA $180a     ; save it in ADPCM

				; this is the same as part of the loop in
				; AD_TRANS that DX is breaking on
f501: 93 04 0c 18 TST #$04, $180c
f505: d0 fa       BNE $f501
				; couldn't it be an 'ack loop' ? (zeo)

f507: e6 fa       INC $fa
f509: d0 02       BNE $f50d
f50b: e6 fb       INC $fb       ; _BX ++ (src pos)

f50d: a5 f8       LDA $f8
f50f: d0 02       BNE $f513
f511: c6 f9       DEC $f9
f513: c6 f8       DEC $f8       ; _AX -- (length)

f515: a5 f8       LDA $f8
f517: 05 f9       ORA $f9
f519: d0 e1       BNE $f4fc     ; if (_AX != 0) continue

f51b: 62          CLA
f51c: 60          RTS

				; copy VRAM->ADPCM
f51d: a9 01       LDA #$01
f51f: 85 f7       STA $f7
f521: 8d 00 00    STA $0000     ; Set VDC reg 1 (set buffer)

f524: 20 f5 f6    JSR $f6f5     ; send _BX to VDC regs

f527: a9 02       LDA #$02
f529: 85 f7       STA $f7
f52b: 8d 00 00    STA $0000     ; set VDC reg 2 (send datas)

				; main write loop
f52e: 93 04 0c 18 TST #$04, $180c
f532: d0 fa       BNE $f52e     ; wait for ack ? (zeo)

f534: b2 fa       LDA ($fa)     ; load VRAM data
f536: 8d 0a 18    STA $180a     ; write in ADPCM

f539: a5 fa       LDA $fa
f53b: 49 01       EOR #$01
f53d: 85 fa       STA $fa       ; toggle between $0002 and $0003

f53f: a5 f8       LDA $f8
f541: d0 02       BNE $f545
f543: c6 f9       DEC $f9
f545: c6 f8       DEC $f8       ; _AX --

f547: a5 f8       LDA $f8
f549: 05 f9       ORA $f9
f54b: d0 e1       BNE $f52e     ; if (_AX != 0) continue

f54d: 9c 72 22    STZ $2272     ; ($2272) = 0 (!?)
f550: 62          CLA
f551: 60          RTS
				; some form of command/error check?
f552: c9 07       CMP #$07
f554: 30 04       BMI $f55a
f556: a9 22       LDA #$22
f558: 80 f7       BRA $f551
				; some other write mode?
f55a: aa          TAX
f55b: a9 01       LDA #$01
f55d: 0a          ASL a
f55e: ca          DEX
f55f: d0 fc       BNE $f55d
f561: 8d 8f 22    STA $228f
f564: a9 43       LDA #$43
f566: 8d 8e 22    STA $228e
f569: a9 60       LDA #$60
f56b: 8d 90 22    STA $2290
f56e: 20 8e 22    JSR $228e
f571: 8d 68 22    STA $2268
f574: a5 fa       LDA $fa
f576: 85 fe       STA $fe
f578: a5 ff       LDA $ff
f57a: 0a          ASL a
f57b: 0a          ASL a
f57c: 0a          ASL a
f57d: 0a          ASL a
f57e: 0a          ASL a
f57f: 85 fb       STA $fb
f581: 64 fa       STZ $fa
f583: a9 53       LDA #$53
f585: 8d 8e 22    STA $228e
f588: a5 fe       LDA $fe
f58a: 20 8e 22    JSR $228e
f58d: a2 20       LDX #$20
f58f: c2          CLY
f590: 93 04 0c 18 TST #$04, $180c
f594: d0 fa       BNE $f590
f596: b2 fa       LDA ($fa)
f598: 8d 0a 18    STA $180a
f59b: e6 fa       INC $fa
f59d: d0 02       BNE $f5a1
f59f: e6 fb       INC $fb
f5a1: a5 f8       LDA $f8
f5a3: d0 02       BNE $f5a7
f5a5: c6 f9       DEC $f9
f5a7: c6 f8       DEC $f8
f5a9: a5 f8       LDA $f8
f5ab: 05 f9       ORA $f9
f5ad: f0 0a       BEQ $f5b9
f5af: 88          DEY
f5b0: d0 de       BNE $f590
f5b2: ca          DEX
f5b3: d0 db       BNE $f590
f5b5: e6 fe       INC $fe
f5b7: 80 bf       BRA $f578
f5b9: a9 53       LDA #$53
f5bb: 8d 8e 22    STA $228e
f5be: ad 68 22    LDA $2268
f5c1: 20 8e 22    JSR $228e
f5c4: 62          CLA
f5c5: 60          RTS

AD_PLAY:
			; if ADPCM busy, return error code
f5c6: 20 db f6    JSR $f6db
f5c9: d0 53       BNE $f61e
				; check for repeat flag
f5cb: a5 fe       LDA $fe       ; _dl?
f5cd: 29 80       AND #$80
f5cf: 8d a5 22    STA $22a5
				; check if using old parameters
f5d2: a5 fe       LDA $fe       ; _dl?
f5d4: 29 7f       AND #$7f
f5d6: d0 3b       BNE $f613
				; playback start address?
f5d8: a5 fa       LDA $fa       ; _bl?
f5da: 8d a8 22    STA $22a8
f5dd: a5 fb       LDA $fb       ; _bh?
f5df: 8d a9 22    STA $22a9
				; playback buffer length?
f5e2: a5 f8       LDA $f8       ; _al?
f5e4: 8d a6 22    STA $22a6
f5e7: a5 f9       LDA $f9       ; _ah?
f5e9: 8d a7 22    STA $22a7
				; check sampling rate for validity?
f5ec: a5 ff       LDA $ff       ; _dh?
f5ee: c9 10       CMP #$10
f5f0: b0 2c       BCS $f61e
f5f2: 8d aa 22    STA $22aa     ; sampling rate?

				; set ADPCM buffer address?
f5f5: ae a8 22    LDX $22a8
f5f8: ac a9 22    LDY $22a9
f5fb: 20 29 f7    JSR $f729     ; ad_write16
				; set 16-bit data as buffer address?
f5fe: 20 ff f6    JSR $f6ff
				; set playback length?
f601: ae a6 22    LDX $22a6
f604: ac a7 22    LDY $22a7
f607: 20 29 f7    JSR $f729     ; ad_write16
				; lock settings into ADPCM controller?
f60a: 20 1e f7    JSR $f71e
				; set sampling rate
f60d: ad aa 22    LDA $22aa
f610: 8d 0e 18    STA $180e
				; start playing?
f613: a9 08       LDA #$08
f615: 0c 02 18    TSB $1802
f618: a9 60       LDA #$60
f61a: 8d 0d 18    STA $180d
f61d: 62          CLA
f61e: 60          RTS

AD_CPLAY:
			; if ADPCM busy, return error code
f61f: 20 db f6    JSR $f6db
f622: d0 67       BNE $f68b

f624: a5 f8       LDA $f8
f626: 8d 9e 22    STA $229e
f629: a5 f9       LDA $f9
f62b: 8d 9f 22    STA $229f
f62e: a5 fa       LDA $fa
f630: 8d a0 22    STA $22a0
f633: a5 fe       LDA $fe
f635: 18          CLC
f636: 6d 76 22    ADC $2276
f639: 8d a3 22    STA $22a3
f63c: a5 fd       LDA $fd
f63e: 6d 75 22    ADC $2275
f641: 8d a2 22    STA $22a2
f644: a5 fc       LDA $fc
f646: 6d 74 22    ADC $2274
f649: 8d a1 22    STA $22a1
f64c: 20 7f f3    JSR $f37f
f64f: a5 ff       LDA $ff
f651: c9 10       CMP #$10
f653: b0 36       BCS $f68b
f655: 8d 0e 18    STA $180e
f658: a9 20       LDA #$20
f65a: 85 f8       STA $f8
f65c: a9 00       LDA #$00
f65e: 85 ff       STA $ff
f660: 64 fa       STZ $fa
f662: 64 fb       STZ $fb
f664: 20 93 f3    JSR $f393
f667: c9 00       CMP #$00
f669: d0 20       BNE $f68b
f66b: a9 20       LDA #$20
f66d: 8d 9d 22    STA $229d
f670: 44 1a       BSR $f68c
f672: a9 ff       LDA #$ff
f674: 8d 08 18    STA $1808
f677: 8d 09 18    STA $1809
f67a: 20 1e f7    JSR $f71e
f67d: 9c a5 22    STZ $22a5
f680: a9 0c       LDA #$0c
f682: 0c 02 18    TSB $1802
f685: a9 60       LDA #$60
f687: 8d 0d 18    STA $180d
f68a: 62          CLA
f68b: 60          RTS

				; this looks like a utility routine
f68c: 18          CLC
f68d: ad a3 22    LDA $22a3
f690: 6d 9d 22    ADC $229d
f693: 8d a3 22    STA $22a3
f696: ad a2 22    LDA $22a2
f699: 69 00       ADC #$00
f69b: 8d a2 22    STA $22a2
f69e: ad a1 22    LDA $22a1
f6a1: 69 00       ADC #$00
f6a3: 8d a1 22    STA $22a1
f6a6: 38          SEC
f6a7: ad 9e 22    LDA $229e
f6aa: ed 9d 22    SBC $229d
f6ad: 8d 9e 22    STA $229e
f6b0: ad 9f 22    LDA $229f
f6b3: e9 00       SBC #$00
f6b5: 8d 9f 22    STA $229f
f6b8: ad a0 22    LDA $22a0
f6bb: e9 00       SBC #$00
f6bd: 8d a0 22    STA $22a0
f6c0: 60          RTS

AD_STOP:
				; $1802 &= ~0x0c;
f6c1: a9 0c       LDA #$0c
f6c3: 1c 02 18    TRB $1802
				; $180d &= ~0x60;
f6c6: a9 60       LDA #$60
f6c8: 1c 0d 18    TRB $180d
				; AD_repeat = 0;
f6cb: 9c a5 22    STZ $22a5
				; AD_xxx0 = 0;
f6ce: 9c 9d 22    STZ $229d
				; AD_xxx1 = 0;
f6d1: 9c 9e 22    STZ $229e
				; AD_xxx2 = 0;
f6d4: 9c 9f 22    STZ $229f
				; AD_xxx3 = 0;
f6d7: 9c a0 22    STZ $22a0

f6da: 60          RTS

AD_STAT:
				; if (!($180C & 1)) {
f6db: ad 0c 18    LDA $180c
f6de: 29 01       AND #$01
f6e0: d0 05       BNE $f6e7
				;     X = $1803 & 4;
f6e2: ad 03 18    LDA $1803
f6e5: 29 04       AND #$04
				; } else {
				;     X = 1;
				; }
f6e7: aa          TAX


				; if ($180d & 0x20) {
				;     A = $180d & 0x20;
f6e8: ad 0d 18    LDA $180d
f6eb: 29 20       AND #$20
f6ed: d0 05       BNE $f6f4
				; } else {
				;     A = $180c & 0x08;
f6ef: ad 0c 18    LDA $180c
f6f2: 29 08       AND #$08
				; }
f6f4: 60          RTS

f6f5: 20 37 f3    JSR $f337     ; send _BX to VDC data regs

f6f8: a9 02       LDA #$02      ; (_BX) = 0x0002
f6fa: 85 fa       STA $fa
f6fc: 64 fb       STZ $fb
f6fe: 60          RTS

f6ff: a9 08       LDA #$08
f701: 0c 0d 18    TSB $180d     ; ($180d) |= 0x08
f704: ad 0a 18    LDA $180a

				; a delay loop
f707: a9 05       LDA #$05
f709: 3a          DEC a
f70a: d0 fd       BNE $f709

f70c: a9 08       LDA #$08
f70e: 80 15       BRA $f725

				; this routine does weird stuff with ADPCM?
f710: a9 03       LDA #$03
f712: 0c 0d 18    TSB $180d     ; ($180D) |= 0x03

f715: a9 01       LDA #$01      
f717: 1c 0d 18    TRB $180d     ; ($180D) &= ~0x01

f71a: a9 02       LDA #$02      ; A = 2
f71c: 80 07       BRA $f725     ; => ($180D) &= ~0x02, then RTS

f71e: a9 10       LDA #$10
f720: 0c 0d 18    TSB $180d
f723: a9 10       LDA #$10

f725: 1c 0d 18    TRB $180d
f728: 60          RTS

ad_write16:
				; set some sort of buffer address?
f729: 8e 08 18    STX $1808
f72c: 8c 09 18    STY $1809
f72f: 60          RTS

				; an unknown entry point via the jump table
f730: 93 03 0b 18 TST #$03, $180b
f734: f0 03       BEQ $f739
f736: 38          SEC
f737: 80 32       BRA $f76b
				; command 0x08: read sectors
f739: a9 08       LDA #$08
f73b: 8d 4c 22    STA $224c

f73e: 20 04 f1    JSR $f104     ; proc02
f741: a5 fc       LDA $fc
f743: 8d 4d 22    STA $224d
f746: a5 fd       LDA $fd
f748: 8d 4e 22    STA $224e
f74b: a5 fe       LDA $fe
f74d: 8d 4f 22    STA $224f
f750: a5 f8       LDA $f8
f752: 8d 50 22    STA $2250
f755: 9c 51 22    STZ $2251
f758: a5 fa       LDA $fa
f75a: 8d c3 22    STA $22c3
f75d: a5 fb       LDA $fb
f75f: 8d c4 22    STA $22c4
f762: 9c c1 22    STZ $22c1
f765: a9 01       LDA #$01
f767: 8d c2 22    STA $22c2
f76a: 18          CLC
f76b: 60          RTS

				; an unknown entry point via the jump table
f76c: ad c2 22    LDA $22c2
f76f: f0 20       BEQ $f791
f771: c9 01       CMP #$01
f773: d0 04       BNE $f779
f775: 44 1c       BSR $f793
f777: 80 18       BRA $f791
f779: c9 02       CMP #$02
f77b: d0 04       BNE $f781
f77d: 44 3c       BSR $f7bb
f77f: 80 10       BRA $f791
f781: c9 03       CMP #$03
f783: d0 04       BNE $f789
f785: 44 68       BSR $f7ef
f787: 80 08       BRA $f791
f789: c9 04       CMP #$04
f78b: d0 04       BNE $f791
f78d: 20 09 f8    JSR $f809
f790: 60          RTS
f791: 18          CLC
f792: 60          RTS
f793: a9 81       LDA #$81
f795: 8d 01 18    STA $1801
f798: 93 80 00 18  TST #$80, $1800
f79c: d0 14       BNE $f7b2
f79e: 8d 00 18    STA $1800
f7a1: 82          CLX
f7a2: ad 00 18    LDA $1800
f7a5: 29 40       AND #$40
f7a7: d0 0c       BNE $f7b5
f7a9: a9 5a       LDA #$5a
f7ab: 3a          DEC a
f7ac: d0 fd       BNE $f7ab
f7ae: ea          NOP
f7af: ca          DEX
f7b0: d0 f0       BNE $f7a2
f7b2: a9 01       LDA #$01
f7b4: 60          RTS
f7b5: a9 02       LDA #$02
f7b7: 8d c2 22    STA $22c2
f7ba: 60          RTS
f7bb: ad 00 18    LDA $1800
f7be: 29 f8       AND #$f8
f7c0: 8d 7a 22    STA $227a
f7c3: c9 d0       CMP #$d0
f7c5: f0 0b       BEQ $f7d2
f7c7: 29 b8       AND #$b8
f7c9: c9 98       CMP #$98
f7cb: f0 1c       BEQ $f7e9
f7cd: c9 88       CMP #$88
f7cf: f0 14       BEQ $f7e5
f7d1: 60          RTS
f7d2: ae c1 22    LDX $22c1
f7d5: ee c1 22    INC $22c1
f7d8: bd 4c 22    LDA $224c, X
f7db: 8d 01 18    STA $1801
f7de: ea          NOP
f7df: ea          NOP
f7e0: ea          NOP
f7e1: ea          NOP
f7e2: 4c 27 ea    JMP $ea27
f7e5: a9 03       LDA #$03
f7e7: 80 02       BRA $f7eb
f7e9: a9 04       LDA #$04
f7eb: 8d c2 22    STA $22c2
f7ee: 60          RTS
f7ef: ad c3 22    LDA $22c3
f7f2: 8d 08 18    STA $1808
f7f5: ad c4 22    LDA $22c4
f7f8: 8d 09 18    STA $1809
f7fb: 20 10 f7    JSR $f710
f7fe: a9 02       LDA #$02
f800: 8d 0b 18    STA $180b
f803: a9 04       LDA #$04
f805: 8d c2 22    STA $22c2
f808: 60          RTS
f809: ad 00 18    LDA $1800
f80c: 29 f8       AND #$f8
f80e: 8d 7a 22    STA $227a
f811: c9 d8       CMP #$d8
f813: d0 41       BNE $f856
f815: 9c 0b 18    STZ $180b
f818: ad 01 18    LDA $1801
f81b: 8d 7b 22    STA $227b
f81e: 20 35 ea    JSR $ea35
f821: 93 40 00 18 TST #$40, $1800
f825: d0 fa       BNE $f821
f827: 20 2f ea    JSR $ea2f
f82a: ad 00 18    LDA $1800
f82d: 29 f8       AND #$f8
f82f: 8d 7a 22    STA $227a
f832: c9 f8       CMP #$f8
f834: d0 f4       BNE $f82a
f836: ad 01 18    LDA $1801
f839: 8d 7a 22    STA $227a
f83c: 20 35 ea    JSR $ea35
f83f: 93 40 00 18 TST #$40, $1800
f843: d0 fa       BNE $f83f
f845: 20 2f ea    JSR $ea2f
f848: 93 80 00 18 TST #$80, $1800
f84c: d0 fa       BNE $f848
f84e: 9c c2 22    STZ $22c2
f851: 38          SEC
f852: ad 7b 22    LDA $227b
f855: 60          RTS
f856: 18          CLC
f857: 60          RTS

BM_FORMAT:

f858: a0 0a       LDY #$0a
f85a: b9 ad f8    LDA $f8ad, Y
f85d: d1 f8       CMP ($f8), Y
f85f: d0 45       BNE $f8a6
f861: 88          DEY
f862: 10 f6       BPL $f85a
f864: 20 49 fc    JSR $fc49     ; bm_save
f867: a9 80       LDA #$80
f869: 85 ed       STA $ed
f86b: 64 ec       STZ $ec
f86d: a2 20       LDX #$20
f86f: c2          CLY
f870: 62          CLA
f871: 91 ec       STA ($ec), Y
f873: d1 ec       CMP ($ec), Y
f875: d0 08       BNE $f87f
f877: c8          INY
f878: d0 f7       BNE $f871
f87a: e6 ed       INC $ed
f87c: ca          DEX
f87d: d0 f0       BNE $f86f
f87f: 8c 04 80    STY $8004
f882: a5 ed       LDA $ed
f884: 8d 05 80    STA $8005
f887: a2 03       LDX #$03
f889: bd a9 f8    LDA $f8a9, X
f88c: 9d 00 80    STA $8000, X
f88f: ca          DEX
f890: 10 f7       BPL $f889
f892: a9 10       LDA #$10
f894: 8d 06 80    STA $8006
f897: a9 80       LDA #$80
f899: 8d 07 80    STA $8007
f89c: 9c 10 80    STZ $8010
f89f: 9c 11 80    STZ $8011
f8a2: 62          CLA
f8a3: 4c 7f fc    JMP $fc7f     ; bm_restore

f8a6: a9 01       LDA #$01
f8a8: 60          RTS

; zeo : Following byte represent string data

; it's "HUBM!BM FORMAT!" for comparison purposes

f8a9: 48          PHA
f8aa: 55 42       EOR $42, X
f8ac: 4d 21 42    EOR $4221
f8af: 4d 20 46    EOR $4620
f8b2: 4f 52 4d    BBR4 $52, $f902
f8b5: 41 54       EOR ($54, X)
f8b7: 21 ??       AND ($??, X)

BM_FREE:

f8b8: 20 32 fc    JSR $fc32
f8bb: ad 04 80    LDA $8004
f8be: 38          SEC
f8bf: ed 06 80    SBC $8006
f8c2: 85 fc       STA $fc
f8c4: ad 05 80    LDA $8005
f8c7: ed 07 80    SBC $8007
f8ca: 85 fd       STA $fd
f8cc: a5 fc       LDA $fc
f8ce: 38          SEC
f8cf: e9 12       SBC #$12
f8d1: 85 fc       STA $fc
f8d3: a5 fd       LDA $fd
f8d5: e9 00       SBC #$00
f8d7: 85 fd       STA $fd
f8d9: 10 04       BPL $f8df
f8db: 64 fc       STZ $fc
f8dd: 64 fd       STZ $fd
f8df: 62          CLA
f8e0: 4c 7f fc    JMP $fc7f     ; bm_restore

BM_READ:

f8e3: 20 32 fc    JSR $fc32
f8e6: 20 96 fb    JSR $fb96
f8e9: b0 60       BCS $f94b
f8eb: a0 01       LDY #$01
f8ed: a5 ff       LDA $ff
f8ef: d1 f0       CMP ($f0), Y
f8f1: d0 04       BNE $f8f7
f8f3: a5 fe       LDA $fe
f8f5: d2 f0       CMP ($f0)
f8f7: b0 4a       BCS $f943
f8f9: 20 fc fb    JSR $fbfc
f8fc: a0 02       LDY #$02
f8fe: b1 f0       LDA ($f0), Y
f900: c8          INY
f901: 18          CLC
f902: 65 ee       ADC $ee
f904: 85 ee       STA $ee
f906: b1 f0       LDA ($f0), Y
f908: 65 ef       ADC $ef
f90a: 05 ee       ORA $ee
f90c: 48          PHA
f90d: 20 46 fb    JSR $fb46
f910: 30 11       BMI $f923
f912: ad b3 22    LDA $22b3
f915: 38          SEC
f916: e5 ee       SBC $ee
f918: 8d b3 22    STA $22b3
f91b: ad b4 22    LDA $22b4
f91e: e5 ef       SBC $ef
f920: 8d b4 22    STA $22b4
f923: ad b3 22    LDA $22b3
f926: 85 fc       STA $fc
f928: ad b4 22    LDA $22b4
f92b: 85 fd       STA $fd
f92d: 0d b3 22    ORA $22b3
f930: f0 0b       BEQ $f93d
f932: a5 fa       LDA $fa
f934: 85 ee       STA $ee
f936: a5 fb       LDA $fb
f938: 85 ef       STA $ef
f93a: 20 17 fd    JSR $fd17
f93d: 68          PLA
f93e: d0 10       BNE $f950
f940: 4c 7f fc    JMP $fc7f     ; bm_restore
f943: 64 fd       STZ $fd
f945: 64 fc       STZ $fc
f947: 62          CLA
f948: 4c 7f fc    JMP $fc7f     ; bm_restore
f94b: a9 01       LDA #$01
f94d: 4c 7f fc    JMP $fc7f     ; bm_restore
f950: a9 02       LDA #$02
f952: 4c 7f fc    JMP $fc7f     ; bm_restore

BM_WRITE:

f955: 20 32 fc    JSR $fc32
f958: 20 96 fb    JSR $fb96
f95b: 90 08       BCC $f965
f95d: 20 e2 fa    JSR $fae2
f960: 90 03       BCC $f965
f962: 4c 15 fa    JMP $fa15
f965: 20 46 fb    JSR $fb46
f968: 10 03       BPL $f96d
f96a: 4c f5 f9    JMP $f9f5
f96d: a5 ee       LDA $ee
f96f: 8d b3 22    STA $22b3
f972: a5 ef       LDA $ef
f974: 8d b4 22    STA $22b4
f977: ad 06 80    LDA $8006
f97a: 18          CLC
f97b: 6d b3 22    ADC $22b3
f97e: 85 ee       STA $ee
f980: ad 07 80    LDA $8007
f983: 6d b4 22    ADC $22b4
f986: 85 ef       STA $ef
f988: a5 ee       LDA $ee
f98a: 18          CLC
f98b: 69 02       ADC #$02
f98d: 85 ec       STA $ec
f98f: a5 ef       LDA $ef
f991: 69 00       ADC #$00
f993: 85 ed       STA $ed
f995: ad 04 80    LDA $8004
f998: c5 ec       CMP $ec
f99a: ad 05 80    LDA $8005
f99d: e5 ed       SBC $ed
f99f: 90 74       BCC $fa15
f9a1: a5 ee       LDA $ee
f9a3: 8d 06 80    STA $8006
f9a6: a5 ef       LDA $ef
f9a8: 8d 07 80    STA $8007
f9ab: a0 01       LDY #$01
f9ad: b2 f0       LDA ($f0)
f9af: 18          CLC
f9b0: 65 f0       ADC $f0
f9b2: 85 ee       STA $ee
f9b4: 85 ec       STA $ec
f9b6: b1 f0       LDA ($f0), Y
f9b8: 65 f1       ADC $f1
f9ba: 85 ef       STA $ef
f9bc: 85 ed       STA $ed
f9be: a0 01       LDY #$01
f9c0: ad b3 22    LDA $22b3
f9c3: 18          CLC
f9c4: 72 f0       ADC ($f0)
f9c6: 92 f0       STA ($f0)
f9c8: ad b4 22    LDA $22b4
f9cb: 71 f0       ADC ($f0), Y
f9cd: 91 f0       STA ($f0), Y
f9cf: ad b3 22    LDA $22b3
f9d2: 18          CLC
f9d3: 65 ee       ADC $ee
f9d5: 85 ee       STA $ee
f9d7: ad b4 22    LDA $22b4
f9da: 65 ef       ADC $ef
f9dc: 85 ef       STA $ef
f9de: ad 06 80    LDA $8006
f9e1: 38          SEC
f9e2: e5 ec       SBC $ec
f9e4: 8d b3 22    STA $22b3
f9e7: ad 07 80    LDA $8007
f9ea: e5 ed       SBC $ed
f9ec: 8d b4 22    STA $22b4
f9ef: 20 d3 fc    JSR $fcd3
f9f2: 20 46 fb    JSR $fb46
f9f5: a5 fa       LDA $fa
f9f7: 85 ee       STA $ee
f9f9: a5 fb       LDA $fb
f9fb: 85 ef       STA $ef
f9fd: 20 2c fd    JSR $fd2c
fa00: 20 fc fb    JSR $fbfc
fa03: a0 02       LDY #$02
fa05: 62          CLA
fa06: 38          SEC
fa07: e5 ee       SBC $ee
fa09: 91 f0       STA ($f0), Y
fa0b: c8          INY
fa0c: 62          CLA
fa0d: e5 ef       SBC $ef
fa0f: 91 f0       STA ($f0), Y
fa11: 62          CLA
fa12: 4c 7f fc    JMP $fc7f     ; bm_restore
fa15: a9 01       LDA #$01
fa17: 4c 7f fc    JMP $fc7f     ; bm_restore

BM_DELETE:

fa1a: 20 32 fc    JSR $fc32
fa1d: 20 96 fb    JSR $fb96
fa20: b0 4b       BCS $fa6d
fa22: a5 f0       LDA $f0
fa24: 85 ee       STA $ee
fa26: a5 f1       LDA $f1
fa28: 85 ef       STA $ef
fa2a: b2 f0       LDA ($f0)
fa2c: 8d b3 22    STA $22b3
fa2f: a0 01       LDY #$01
fa31: b1 f0       LDA ($f0), Y
fa33: 8d b4 22    STA $22b4
fa36: a5 f0       LDA $f0
fa38: 18          CLC
fa39: 6d b3 22    ADC $22b3
fa3c: 85 ec       STA $ec
fa3e: a5 f1       LDA $f1
fa40: 6d b4 22    ADC $22b4
fa43: 85 ed       STA $ed
fa45: ad 06 80    LDA $8006
fa48: 38          SEC
fa49: e5 ec       SBC $ec
fa4b: 8d b3 22    STA $22b3
fa4e: ad 07 80    LDA $8007
fa51: e5 ed       SBC $ed
fa53: 8d b4 22    STA $22b4
fa56: ad 06 80    LDA $8006
fa59: 38          SEC
fa5a: f2 f0       SBC ($f0)
fa5c: 8d 06 80    STA $8006
fa5f: ad 07 80    LDA $8007
fa62: f1 f0       SBC ($f0), Y
fa64: 8d 07 80    STA $8007
fa67: 20 d3 fc    JSR $fcd3
fa6a: 4c 7f fc    JMP $fc7f     ; bm_restore
fa6d: a9 01       LDA #$01
fa6f: 4c 7f fc    JMP $fc7f     ; bm_restore

BM_FILES:

fa72: 20 32 fc    JSR $fc32
fa75: a9 10       LDA #$10
fa77: 85 f0       STA $f0
fa79: a9 80       LDA #$80
fa7b: 85 f1       STA $f1
fa7d: a5 f8       LDA $f8
fa7f: 8d b3 22    STA $22b3
fa82: 64 f8       STZ $f8
fa84: a0 01       LDY #$01
fa86: b2 f0       LDA ($f0)
fa88: 11 f0       ORA ($f0), Y
fa8a: f0 51       BEQ $fadd
fa8c: e6 f8       INC $f8
fa8e: ce b3 22    DEC $22b3
fa91: f0 11       BEQ $faa4
fa93: b1 f0       LDA ($f0), Y
fa95: 48          PHA
fa96: b2 f0       LDA ($f0)
fa98: 18          CLC
fa99: 65 f0       ADC $f0
fa9b: 85 f0       STA $f0
fa9d: 68          PLA
fa9e: 65 f1       ADC $f1
faa0: 85 f1       STA $f1
faa2: 80 e2       BRA $fa86
faa4: b2 f0       LDA ($f0)
faa6: 38          SEC
faa7: e9 10       SBC #$10
faa9: aa          TAX
faaa: b1 f0       LDA ($f0), Y
faac: e9 00       SBC #$00
faae: 48          PHA
faaf: da          PHX
fab0: a5 f0       LDA $f0
fab2: 18          CLC
fab3: 69 04       ADC #$04
fab5: 85 f0       STA $f0
fab7: a5 f1       LDA $f1
fab9: 69 00       ADC #$00
fabb: 85 f1       STA $f1
fabd: a5 fa       LDA $fa
fabf: 85 ee       STA $ee
fac1: a5 fb       LDA $fb
fac3: 85 ef       STA $ef
fac5: 20 7b fd    JSR $fd7b
fac8: c2          CLY
fac9: b1 f0       LDA ($f0), Y
facb: 91 ee       STA ($ee), Y
facd: c8          INY
face: c0 0c       CPY #$0c
fad0: 90 f7       BCC $fac9
fad2: 68          PLA
fad3: 91 ee       STA ($ee), Y
fad5: c8          INY
fad6: 68          PLA
fad7: 91 ee       STA ($ee), Y
fad9: 62          CLA
fada: 4c 7f fc    JMP $fc7f     ; bm_restore
fadd: a9 01       LDA #$01
fadf: 4c 7f fc    JMP $fc7f     ; bm_restore
fae2: ad 06 80    LDA $8006
fae5: 85 f0       STA $f0
fae7: ad 07 80    LDA $8007
faea: 85 f1       STA $f1
faec: ad 04 80    LDA $8004
faef: 38          SEC
faf0: e5 f0       SBC $f0
faf2: 85 ec       STA $ec
faf4: ad 05 80    LDA $8005
faf7: e5 f1       SBC $f1
faf9: 85 ed       STA $ed
fafb: a5 ee       LDA $ee
fafd: c9 10       CMP #$10
faff: a5 ef       LDA $ef
fb01: e9 00       SBC #$00
fb03: 90 3f       BCC $fb44
fb05: a5 f0       LDA $f0
fb07: 18          CLC
fb08: 69 04       ADC #$04
fb0a: 85 ec       STA $ec
fb0c: a5 f1       LDA $f1
fb0e: 69 00       ADC #$00
fb10: 85 ed       STA $ed
fb12: a5 f8       LDA $f8
fb14: 85 ee       STA $ee
fb16: a5 f9       LDA $f9
fb18: 85 ef       STA $ef
fb1a: 20 7b fd    JSR $fd7b
fb1d: c2          CLY
fb1e: b1 ee       LDA ($ee), Y
fb20: 91 ec       STA ($ec), Y
fb22: c8          INY
fb23: c0 0c       CPY #$0c
fb25: d0 f7       BNE $fb1e
fb27: ad 06 80    LDA $8006
fb2a: 18          CLC
fb2b: 69 10       ADC #$10
fb2d: 8d 06 80    STA $8006
fb30: ad 07 80    LDA $8007
fb33: 69 00       ADC #$00
fb35: 8d 07 80    STA $8007
fb38: a0 01       LDY #$01
fb3a: a9 10       LDA #$10
fb3c: 92 f0       STA ($f0)
fb3e: a9 00       LDA #$00
fb40: 91 f0       STA ($f0), Y
fb42: 18          CLC
fb43: 60          RTS
fb44: 38          SEC
fb45: 60          RTS
fb46: a5 fe       LDA $fe
fb48: 18          CLC
fb49: 65 fc       ADC $fc
fb4b: 85 ee       STA $ee
fb4d: a5 ff       LDA $ff
fb4f: 65 fd       ADC $fd
fb51: 85 ef       STA $ef
fb53: a5 ee       LDA $ee
fb55: 18          CLC
fb56: 69 10       ADC #$10
fb58: 85 ee       STA $ee
fb5a: a5 ef       LDA $ef
fb5c: 69 00       ADC #$00
fb5e: 85 ef       STA $ef
fb60: a0 01       LDY #$01
fb62: a5 ee       LDA $ee
fb64: 38          SEC
fb65: f2 f0       SBC ($f0)
fb67: 85 ee       STA $ee
fb69: a5 ef       LDA $ef
fb6b: f1 f0       SBC ($f0), Y
fb6d: 85 ef       STA $ef
fb6f: a5 f0       LDA $f0
fb71: 18          CLC
fb72: 69 10       ADC #$10
fb74: 85 ec       STA $ec
fb76: a5 f1       LDA $f1
fb78: 69 00       ADC #$00
fb7a: 85 ed       STA $ed
fb7c: a5 fe       LDA $fe
fb7e: 18          CLC
fb7f: 65 ec       ADC $ec
fb81: 85 ec       STA $ec
fb83: a5 ff       LDA $ff
fb85: 65 ed       ADC $ed
fb87: 85 ed       STA $ed
fb89: a5 fc       LDA $fc
fb8b: 8d b3 22    STA $22b3
fb8e: a5 fd       LDA $fd
fb90: 8d b4 22    STA $22b4
fb93: a5 ef       LDA $ef
fb95: 60          RTS
fb96: a5 f8       LDA $f8
fb98: 85 ee       STA $ee
fb9a: a5 f9       LDA $f9
fb9c: 85 ef       STA $ef
fb9e: 20 7b fd    JSR $fd7b
fba1: a9 10       LDA #$10
fba3: 85 f0       STA $f0
fba5: a9 80       LDA #$80
fba7: 85 f1       STA $f1
fba9: a0 01       LDY #$01
fbab: b2 f0       LDA ($f0)
fbad: 11 f0       ORA ($f0), Y
fbaf: f0 49       BEQ $fbfa
fbb1: a5 f0       LDA $f0
fbb3: 18          CLC
fbb4: 69 04       ADC #$04
fbb6: 85 f0       STA $f0
fbb8: a5 f1       LDA $f1
fbba: 69 00       ADC #$00
fbbc: 85 f1       STA $f1
fbbe: c2          CLY
fbbf: b1 ee       LDA ($ee), Y
fbc1: d1 f0       CMP ($f0), Y
fbc3: d0 14       BNE $fbd9
fbc5: c8          INY
fbc6: c0 0c       CPY #$0c
fbc8: 90 f5       BCC $fbbf
fbca: a5 f0       LDA $f0
fbcc: 38          SEC
fbcd: e9 04       SBC #$04
fbcf: 85 f0       STA $f0
fbd1: a5 f1       LDA $f1
fbd3: e9 00       SBC #$00
fbd5: 85 f1       STA $f1
fbd7: 18          CLC
fbd8: 60          RTS
fbd9: a5 f0       LDA $f0
fbdb: 38          SEC
fbdc: e9 04       SBC #$04
fbde: 85 f0       STA $f0
fbe0: a5 f1       LDA $f1
fbe2: e9 00       SBC #$00
fbe4: 85 f1       STA $f1
fbe6: a0 01       LDY #$01
fbe8: b1 f0       LDA ($f0), Y
fbea: 48          PHA
fbeb: b2 f0       LDA ($f0)
fbed: 18          CLC
fbee: 65 f0       ADC $f0
fbf0: 85 f0       STA $f0
fbf2: 68          PLA
fbf3: 65 f1       ADC $f1
fbf5: 85 f1       STA $f1
fbf7: 4c a9 fb    JMP $fba9
fbfa: 38          SEC
fbfb: 60          RTS
fbfc: a5 f0       LDA $f0
fbfe: 85 ec       STA $ec
fc00: a5 f1       LDA $f1
fc02: 85 ed       STA $ed
fc04: a0 01       LDY #$01
fc06: b2 ec       LDA ($ec)
fc08: 38          SEC
fc09: e9 04       SBC #$04
fc0b: 8d b3 22    STA $22b3
fc0e: b1 ec       LDA ($ec), Y
fc10: e9 00       SBC #$00
fc12: 8d b4 22    STA $22b4
fc15: 64 ee       STZ $ee
fc17: 64 ef       STZ $ef
fc19: a0 04       LDY #$04
fc1b: b1 ec       LDA ($ec), Y
fc1d: 18          CLC
fc1e: 65 ee       ADC $ee
fc20: 85 ee       STA $ee
fc22: 62          CLA
fc23: 65 ef       ADC $ef
fc25: 85 ef       STA $ef
fc27: c8          INY
fc28: d0 02       BNE $fc2c
fc2a: e6 ed       INC $ed
fc2c: 20 97 fd    JSR $fd97
fc2f: d0 ea       BNE $fc1b
fc31: 60          RTS

fc32: 44 15       BSR $fc49     ; bm_save
fc34: a2 03       LDX #$03
fc36: bd 00 80    LDA $8000, X
fc39: dd a9 f8    CMP $f8a9, X
fc3c: d0 04       BNE $fc42
fc3e: ca          DEX
fc3f: 10 f5       BPL $fc36
fc41: 60          RTS
fc42: 44 3b       BSR $fc7f     ; bm_restore
fc44: 68          PLA
fc45: 68          PLA
fc46: a9 ff       LDA #$ff
fc48: 60          RTS

bm_save:

fc49: 48          PHA
				; save mmu regs
fc4a: 43 01       TMA #$01
fc4c: 8d b5 22    STA $22b5
fc4f: 43 02       TMA #$02
fc51: 8d b6 22    STA $22b6
fc54: 43 04       TMA #$04
fc56: 8d b7 22    STA $22b7
fc59: 43 08       TMA #$08
fc5b: 8d b8 22    STA $22b8
fc5e: 43 10       TMA #$10
fc60: 8d b9 22    STA $22b9
fc63: 43 20       TMA #$20
fc65: 8d ba 22    STA $22ba
fc68: 43 40       TMA #$40
fc6a: 8d bb 22    STA $22bb
fc6d: 43 80       TMA #$80
fc6f: 8d bc 22    STA $22bc
				; load battery ram to $8000-9fff
fc72: a9 f7       LDA #$f7
fc74: 53 10       TAM #$10
				; sets the speed to "low". why?
fc76: 54          CSL
				; play with $1807. why?
fc77: 78          SEI
fc78: a9 80       LDA #$80
fc7a: 8d 07 18    STA $1807
fc7d: 68          PLA
fc7e: 60          RTS

bm_restore:

fc7f: 48          PHA
				; restore saved mmu regs
fc80: ad b5 22    LDA $22b5
fc83: 53 01       TAM #$01
fc85: ad b6 22    LDA $22b6
fc88: 53 02       TAM #$02
fc8a: ad b7 22    LDA $22b7
fc8d: 53 04       TAM #$04
fc8f: ad b8 22    LDA $22b8
fc92: 53 08       TAM #$08
fc94: ad b9 22    LDA $22b9
fc97: 53 10       TAM #$10
fc99: ad ba 22    LDA $22ba
fc9c: 53 20       TAM #$20
fc9e: ad bb 22    LDA $22bb
fca1: 53 40       TAM #$40
fca3: ad bc 22    LDA $22bc
fca6: 53 80       TAM #$80
fca8: ad 03 18    LDA $1803
				; sets the speed to "high".
fcab: d4          CSH
				; plays around with the VDP. why?
fcac: a9 05       LDA #$05
fcae: 8d 00 00    STA $0000
fcb1: a5 f3       LDA $f3
fcb3: 09 08       ORA #$08
fcb5: 8d 02 00    STA $0002
fcb8: ad 00 00    LDA $0000
fcbb: 29 20       AND #$20
fcbd: d0 f9       BNE $fcb8
fcbf: ad 00 00    LDA $0000
fcc2: 29 20       AND #$20
fcc4: f0 f9       BEQ $fcbf
fcc6: a5 f3       LDA $f3
fcc8: 8d 02 00    STA $0002
fccb: a5 f7       LDA $f7
fccd: 8d 00 00    STA $0000
fcd0: 68          PLA
fcd1: 58          CLI
fcd2: 60          RTS

fcd3: ad b3 22    LDA $22b3
fcd6: 0d b4 22    ORA $22b4
fcd9: f0 2a       BEQ $fd05
fcdb: 20 41 fd    JSR $fd41
fcde: c2          CLY
fcdf: 8a          TXA
fce0: d0 13       BNE $fcf5
fce2: b1 ec       LDA ($ec), Y
fce4: 91 ee       STA ($ee), Y
fce6: 98          TYA
fce7: d0 04       BNE $fced
fce9: c6 ed       DEC $ed
fceb: c6 ef       DEC $ef
fced: 88          DEY
fcee: 20 97 fd    JSR $fd97
fcf1: d0 ef       BNE $fce2
fcf3: f0 10       BEQ $fd05
fcf5: b1 ec       LDA ($ec), Y
fcf7: 91 ee       STA ($ee), Y
fcf9: c8          INY
fcfa: d0 04       BNE $fd00
fcfc: e6 ed       INC $ed
fcfe: e6 ef       INC $ef
fd00: 20 97 fd    JSR $fd97
fd03: d0 f0       BNE $fcf5
fd05: ad 06 80    LDA $8006
fd08: 85 ec       STA $ec
fd0a: ad 07 80    LDA $8007
fd0d: 85 ed       STA $ed
fd0f: a0 01       LDY #$01
fd11: 62          CLA
fd12: 92 ec       STA ($ec)
fd14: 91 ec       STA ($ec), Y
fd16: 60          RTS
fd17: 20 7b fd    JSR $fd7b
fd1a: c2          CLY
fd1b: b1 ec       LDA ($ec), Y
fd1d: 91 ee       STA ($ee), Y
fd1f: c8          INY
fd20: d0 04       BNE $fd26
fd22: e6 ed       INC $ed
fd24: e6 ef       INC $ef
fd26: 20 97 fd    JSR $fd97
fd29: d0 f0       BNE $fd1b
fd2b: 60          RTS
fd2c: 20 7b fd    JSR $fd7b
fd2f: c2          CLY
fd30: b1 ee       LDA ($ee), Y
fd32: 91 ec       STA ($ec), Y
fd34: c8          INY
fd35: d0 04       BNE $fd3b
fd37: e6 ed       INC $ed
fd39: e6 ef       INC $ef
fd3b: 20 97 fd    JSR $fd97
fd3e: d0 f0       BNE $fd30
fd40: 60          RTS
fd41: a5 ec       LDA $ec
fd43: 38          SEC
fd44: e5 ee       SBC $ee
fd46: a5 ed       LDA $ed
fd48: e5 ef       SBC $ef
fd4a: b0 2c       BCS $fd78
fd4c: 20 97 fd    JSR $fd97
fd4f: a5 ec       LDA $ec
fd51: 18          CLC
fd52: 6d b3 22    ADC $22b3
fd55: 85 ec       STA $ec
fd57: a5 ed       LDA $ed
fd59: 6d b4 22    ADC $22b4
fd5c: 85 ed       STA $ed
fd5e: a5 ee       LDA $ee
fd60: 18          CLC
fd61: 6d b3 22    ADC $22b3
fd64: 85 ee       STA $ee
fd66: a5 ef       LDA $ef
fd68: 6d b4 22    ADC $22b4
fd6b: 85 ef       STA $ef
fd6d: ee b3 22    INC $22b3
fd70: d0 03       BNE $fd75
fd72: ee b4 22    INC $22b4
fd75: a2 00       LDX #$00
fd77: 60          RTS
fd78: a2 02       LDX #$02
fd7a: 60          RTS
fd7b: a5 ef       LDA $ef
fd7d: 2a          ROL a
fd7e: 2a          ROL a
fd7f: 2a          ROL a
fd80: 2a          ROL a
fd81: 29 07       AND #$07
fd83: aa          TAX
fd84: bd b5 22    LDA $22b5, X
fd87: 53 20       TAM #$20
fd89: bd b6 22    LDA $22b6, X
fd8c: 53 40       TAM #$40
fd8e: a5 ef       LDA $ef
fd90: 29 1f       AND #$1f
fd92: 09 a0       ORA #$a0
fd94: 85 ef       STA $ef
fd96: 60          RTS
fd97: ad b3 22    LDA $22b3
fd9a: d0 03       BNE $fd9f
fd9c: ce b4 22    DEC $22b4
fd9f: ce b3 22    DEC $22b3
fda2: ad b3 22    LDA $22b3
fda5: 0d b4 22    ORA $22b4
fda8: 60          RTS

;
; map bank 3 to $c000
; and keep old bank value in ($22bb)
;

fda9: 48          PHA
fdaa: 43 40       TMA #$40
fdac: 8d bb 22    STA $22bb
fdaf: a9 03       LDA #$03
fdb1: 53 40       TAM #$40
fdb3: 68          PLA
fdb4: 60          RTS

;
; restore the old value for the bank to map $c000
;

fdb5: 08          PHP
fdb6: 48          PHA
fdb7: ad bb 22    LDA $22bb
fdba: 53 40       TAM #$40
fdbc: 68          PLA
fdbd: 28          PLP
fdbe: 60          RTS

MA_MUL8S:

fdbf: 44 e8       BSR $fda9
fdc1: 20 10 cd    JSR $cd10
fdc4: 80 ef       BRA $fdb5

MA_MUL8U:

fdc6: 44 e1       BSR $fda9
fdc8: 20 3a cd    JSR $cd3a
fdcb: 80 e8       BRA $fdb5

MA_MUL16S:

fdcd: 44 da       BSR $fda9
fdcf: 20 57 cd    JSR $cd57
fdd2: 80 e1       BRA $fdb5

MA_MUL16U:

fdd4: 44 d3       BSR $fda9
fdd6: 20 92 cd    JSR $cd92
fdd9: 80 da       BRA $fdb5

MA_CBASIS: ; zeo : not real name, find me a develo book and I'll tell you :)

fddb: 44 cc       BSR $fda9
fddd: 20 c3 cd    JSR $cdc3
fde0: 80 d3       BRA $fdb5

MA_DIV16U:

fde2: 44 c5       BSR $fda9
fde4: 20 db cd    JSR $cddb
fde7: 80 cc       BRA $fdb5

MA_DIV16S:

fde9: 44 be       BSR $fda9
fdeb: 20 2e ce    JSR $ce2e
fdee: 80 c5       BRA $fdb5

MA_SQRT:

fdf0: 44 b7       BSR $fda9
fdf2: 20 75 ce    JSR $ce75
fdf5: 80 be       BRA $fdb5

MA_COS:

fdf7: 44 b0       BSR $fda9
fdf9: 20 c3 ce    JSR $cec3
fdfc: 80 b7       BRA $fdb5

MA_SIN:

fdfe: 44 a9       BSR $fda9
fe00: 20 c8 ce    JSR $cec8
fe03: 80 b0       BRA $fdb5

MA_ATNI:

fe05: 44 a2       BSR $fda9
fe07: 20 d2 ce    JSR $ced2
fe0a: 80 a9       BRA $fdb5

PSG_BIOS:

fe0c: da          PHX
fe0d: 5a          PHY
fe0e: 43 40       TMA #$40
fe10: 48          PHA
fe11: a9 02       LDA #$02

fe13: 53 40       TAM #$40

fe15: a5 ff       LDA $ff
fe17: c9 15       CMP #$15
fe19: b0 07       BCS $fe22
fe1b: 0a          ASL a
fe1c: aa          TAX
fe1d: a5 f8       LDA $f8
fe1f: 20 2a fe    JSR $fe2a
fe22: a8          TAY
fe23: 68          PLA
fe24: 53 40       TAM #$40
fe26: 98          TYA
fe27: 7a          PLY
fe28: fa          PLX
fe29: 60          RTS

fe2a: 7c 2d fe    JMP ($fe2d, X)

			; this is data to implement a piece of code that looks like a switch()
			; statement ...

fe2d: 00 c0       .dw $c000     ; PSG_ON        (0)
fe2f: 19 c0       .dw $c019     ; PSG_OFF       (1)
fe31: 43 c0       .dw $c043     ; PSG_INIT      (2)
fe33: db c0       .dw $c0db     ; PSG_BANK      (3)
fe35: e6 c0       .dw $c0e6     ; PSG_TRACK     (4)
fe37: f1 c0       .dw $c0f1     ; PSG_FUNC5     (5)
fe39: fc c0       .dw $c0fc     ; PSG_FUNC6     (6)
fe3b: 07 c1       .dw $c107     ; PSG_FUNC7     (7)
fe3d: 12 c1       .dw $c112     ; PSG_FUNC8     (8)
fe3f: 1d c1       .dw $c11d     ; PSG_FUNC9     (9)
fe41: 28 c1       .dw $c128     ; PSG_FUNCA     (A)
fe43: 42 c1       .dw $c142     ; PSG_PLAY      (B)
fe45: 51 c1       .dw $c151     ; PSG_MSTAT     (C)
fe47: 6c c1       .dw $c16c     ; PSG_STAT2     (D)
fe49: 85 c1       .dw $c185     ; PSG_FUNCE     (E)
fe4b: ca c1       .dw $c1ca     ; PSG_FUNCF     (F)
fe4d: 21 c2       .dw $c221     ; PSG_ASTOP     (10)
fe4e: 4a c2       .dw $c24a     ; PSG_FUNC11    (11)
fe51: 7c c2       .dw $c27c     ; PSG_FUNC12    (12)
fe53: cd c2       .dw $c2cd     ; PSG_FDOUT     (13)
fe55: e9 c2       .dw $c2e9     ; PSG_FUNC14    (14)

GRP_BIOS:

fe57: 43 40       TMA #$40
fe59: 48          PHA
fe5a: a9 03       LDA #$03      ; map bank 3 at $c000
fe5c: 53 40       TAM #$40

fe5e: a5 ff       LDA $ff       
fe60: c9 11       CMP #$11
fe62: b0 05       BCS $fe69
fe64: 0a          ASL a
fe65: aa          TAX
fe66: 20 6d fe    JSR $fe6d     ; implement a switch with #$11 different functions
				; function number is in (_dh)

fe69: 68          PLA
fe6a: 53 40       TAM #$40      ; restore old mapping
fe6c: 60          RTS

fe6d: 7c 70 fe    JMP ($fe70, X)

				; Once more, an address jump table to implement switch()

fe70: f3 ca             .dw $caf3       ; VI_GINIT      (0)
fe72: 07 cb             .dw $cb07       ; VI_CASHCLR    (1)
fe74: ed cb             .dw $cbed       ; VI_STRTADR    (2)
fe76: b2 ca             .dw $cab2       ; VI_GETADRS    (3)
fe78: 29 c5             .dw $c529       ; VI_CLS        (4)
fe7a: a8 c1             .dw $c1a8       ; VI_PSET       (5)
fe7c: a2 c2             .dw $c2a2       ; VI_POINT      (6)
fe7e: 85 c0             .dw $c085       ; VI_LINE       (7)
fe80: 3c c0             .dw $c03c       ; VI_BOX        (8)
fe82: 67 c0             .dw $c067       ; VI_BOXF       (9)
fe84: 90 c3             .dw $c390       ; VI_FLOOD      (A)
fe86: 48 c4             .dw $c448       ; VI_PAINT      (B)
fe88: 14 cb             .dw $cb14       ; VI_GWINDOW    (C)
fe8a: 0e cb             .dw $cb0e       ; VI_GFONT      (D)
fe8c: f4 c7             .dw $c7f4       ; VI_PUTFONT    (E)
fe8e: f0 c6             .dw $c6f0       ; VI_SYMBOL     (F)
fe90: 71 cc             .dw $cc71       ; GRP_FUNC10(10)

EX_MEMOPEN:

fe92: ad c5 18    LDA $18c5   ; Check for super system
fe95: c9 aa       CMP #$aa
fe97: d0 0c       BNE $fea5

fe99: ad c6 18    LDA $18c6
fe9c: c9 55       CMP #$55
fe9e: d0 05       BNE $fea5

fea0: ae c7 18    LDX $18c7
fea3: 80 15       BRA $feba

fea5: ad c1 18    LDA $18c1
fea8: c9 aa       CMP #$aa
feaa: d0 13       BNE $febf

feac: ad c2 18    LDA $18c2
feaf: c9 55       CMP #$55
feb1: d0 0c       BNE $febf

feb3: ae c3 18    LDX $18c3   ; X = ($18C3)

feb6: 22          SAX
feb7: 09 80       ORA #$80    ; => X |= 0x80
feb9: 22          SAX

feba: ad f4 ff    LDA $fff4   ; A = ($fff4)
febd: 18          CLC
febe: 60          RTS

febf: 82          CLX
fec0: 38          SEC
fec1: 60          RTS

fec2: 03 00       dw 0x3000     ; version of the card, here 3.0

fec4: ff ...
ffdb: ... ff

ffdc: 4c 00 e9    JMP $e900

ffdf: 4c 3b ea    JMP $ea3b

ffe2: 4c 79 ea    JMP $ea79
ffe5: 4c be ea    JMP $eabe
ffe8: 4c 16 eb    JMP $eb16
ffeb: 4c 5e eb    JMP $eb5e
ffee: 4c c5 e9    JMP $e9c5
fff1: 4c dc e9    JMP $e9dc

fff4: 68          .db 68          ; return value for mem_open
fff5: 80          .db 80          ; init mapping bank

fff6: 36 e7       DW $e736      ; IRQ2/BRK vector
fff8: 70 e8       DW $e870      ; IRQ1 vector
fffa: b3 e6       DW $e6b3      ; TIMER vector
fffc: a9 e6       DW $e6a9      ; NMI vector
fffe: f3 e0       DW $e0f3      ; RESET vector

;---------------------------------------------------------------------------------