Actions

SCHG How-to

Port Sonic 3's Sound Driver to Sonic 1

From Sonic Retro

(Original guide by Kram1024)
Updated by User:Kram1024

You probably saw a quick and dirty way to do this on SSRG, but lets do it the proper way, the way that Sonic Team would do it.

Overview

First off, Sonic 3's sound driver has the V_Int reloader built into it so it is not needed. Some routines need replacement, sounds need fixing, and we need to replace the sounds and music.

Hivebrain Disassembly users, start here

if yours uses snasm68k, please move to one of the other choices since snasm68k doesnt understand these macros and has benn known to have compatibility issues with some versions of Windows and with Wine. AS Users: change "incbin" to "binclude".

Macros

Before going on with this guide, add these macros to the start of your disassembly:

; not in use until the banks are disassembled
; DAC bank pointers
zPtrDAC: macro addr
     dc.w ((((addr&$7FFF)+$8000)<<8)&$FF00)+(((addr&$7FFF)+$8000)>>8)
     endm

; pointers reserved for the driver
zPtrSpec: macro addr
     dc.w (((addr&$1FFF)>>$08)|((addr&$1FFF)<<$08))&$FFFF
     endm

; little endian pointers for music and SFX
z68kPtr: macro addr
     dc.w ((((addr&$FFFF)|$8000)>>$08)|(((addr&$FFFF)|$8000)<<$08))&$FFFF
     endm

Preparing to use Sonic 3/K/3K sound system

The Vertical Interrupt and Horizontal Interrupt need to be fixed, Since the Sonic 1/2 system uses them but the Sonic 3/K/3K system doesn't.

Prepare Vertical Interrupt Handler for new driver

Sonic 1 calls a early 68k smps driver in both the vertical blank routine and the horizontal blank routine, we don need this for the new driver, so we will have to make a few deletions here and there.

Sonic 2 also does this with it's compressed z80 driver, so if you are actually placing this in sonic 2, you might want to make a note of that.

first we will fix the vertical interrupt, by deleting this line:

		jsr	(sub_71B4C).l

under:

loc_B5E:				; XREF: loc_B88

Prepare Hoizontal Interrupt Handler for new driver

Now we locate:

loc_119E:				; XREF: PalToCRAM
		clr.b	($FFFFF64F).w
		movem.l	d0-a6,-(sp)
		bsr.w	Demo_Time
		jsr	(sub_71B4C).l
		movem.l	(sp)+,d0-a6
		rte	
; End of function PalToCRAM

See another familiar line? Yes, you've got it, do the same thing to it:

loc_119E:				; XREF: PalToCRAM
		clr.b	($FFFFF64F).w
		movem.l	d0-a6,-(sp)
		bsr.w	Demo_Time
 		movem.l	(sp)+,d0-a6
		rte	
; End of function PalToCRAM

That effectively disables the Sonic 1/2 style interrupt handler which we will not need and prevents a nasty error down the road.

Upgrading the Load Driver Routine

Okay, we disabled the driver's interrupt handler, wouldn't we want now to use the sonic3 driver instead? Here is where we start installing it. Locate:

; ---------------------------------------------------------------------------
; Subroutine to	load the sound driver
; ---------------------------------------------------------------------------

; ||||||||||||||| S U B	R O U T	I N E |||||||||||||||||||||||||||||||||||||||


SoundDriverLoad:			; XREF: GameClrRAM; TitleScreen
		nop	
		move.w	#$100,($A11100).l ; stop the Z80
		move.w	#$100,($A11200).l ; reset the Z80
		lea	(Kos_Z80).l,a0	; load sound driver
		lea	($A00000).l,a1
		bsr.w	KosDec		; decompress
		move.w	#0,($A11200).l
		nop	
		nop	
		nop	
		nop	
		move.w	#$100,($A11200).l ; reset the Z80
		move.w	#0,($A11100).l	; start	the Z80
		rts	
; End of function SoundDriverLoad

and replace it all with:

; ---------------------------------------------------------------------------
; Subroutine to	load the sound driver
; ---------------------------------------------------------------------------

; ||||||||||||||| S U B	R O U T	I N E |||||||||||||||||||||||||||||||||||||||

SoundDriverLoad:					; XREF: GameClrRAM;	TitleScreen
		nop
		move.w	#$100,($A11100).l	; Z80 bus request - Start
		move.w	#$100,($A11200).l	; Z80 stop reset
		lea	(DriverData).l,a0
		lea	($A00000).l,a1
		move.w	#DriverDataEnd-DriverData-1,d0

@loadDriver
		move.b	(a0)+,(a1)+
		dbf	d0,@loadDriver
		lea	(DriverPointers).l,a0
		lea	($A01300).l,a1
		move.w	#DriverPointersEnd-DriverPointers-1,d0

@loadPointers
		move.b	(a0)+,(a1)+
		dbf	d0,	@loadPointers
		lea	(UniversalVoiceBank).l,a0
		lea	($A017D8).l,a1
		move.w	#UniversalVoiceBankEnd-UniversalVoiceBank-1,d0

@loadUVB
		move.b	(a0)+,(a1)+
		dbf	d0,@loadUVB
		lea	(DriverResetData).l,a0
		lea	($A01C00).l,a1
		move.w	#DriverResetDataEnd-DriverResetData-1,d0

@loadResetData
		move.b	(a0)+,(a1)+
		dbf	d0,@loadResetData
		btst	#6,($FFFFFFF8).w
		beq.s	@restartZ80
		move.b	#1,($A01C02).l

@restartZ80
		move.w	#0,($A11200).l
		nop
		nop
		nop
		nop
		move.w	#$100,($A11200).l	; Z80 start reset
		move.w	#0,($A11100).l		; Z80 bus request - Stop
		rts
; End of function SoundDriverLoad


DriverResetData:
		dc.b	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
DriverResetDataEnd:

if you are using an as based disassembly replace @ with .

Upgrading the Playback Routines

Now we have the code to load the new driver, time to add the new playback routines.

Upgrade Music Routine

First the PlaySound routine, locate:

; ---------------------------------------------------------------------------
; Subroutine to	play a sound or	music track
; ---------------------------------------------------------------------------

; ||||||||||||||| S U B	R O U T	I N E |||||||||||||||||||||||||||||||||||||||


PlaySound:
		move.b	d0,($FFFFF00A).w
		rts	
; End of function PlaySound

and replace it completely with:

; ---------------------------------------------------------------------------
; Subroutine to	play a sound or	music track
; ---------------------------------------------------------------------------

; ||||||||||||||| S U B	R O U T	I N E |||||||||||||||||||||||||||||||||||||||


PlaySound:
		cmpi.w	#$FB,d0
		blt.s	PlayNotSpecialFlag
		bhi.s	TestForNormalSpeed
		move	#8,d0
		jmp	SetTempo

TestForNormalSpeed:
		cmpi.w	#$FC,d0
		bne.s	PlayNotSpecialFlag
		clr.w	d0
		jmp	SetTempo

PlayNotSpecialFlag:
		move.w	#$100,($A11100).l

PlaySoundZ80NotStopped:
		btst	#0,($A11100).l
		bne.s	PlaySoundZ80NotStopped	; loop until it says it's stopped
		move.b	d0,($A01C0A).l
		move.w	#0,($A11100).l
		rts
; End of function PlaySound

; ---------------------------------------------------------------------------
; Exclusive sound/music subroutine
; ---------------------------------------------------------------------------


; ||||||||||||||| S U B	R O U T	I N E |||||||||||||||||||||||||||||||||||||||



PlaySound_Ex:
		tst.b	4(A0)
		bpl.s	SkipPlaySound_Special

Do not be alarmed about the new sound routine that was added, it is equivalent to the PlaySound_Local routine (as a matter of fact, it is identical, why sonic1 does not already have it is beyond me, since it indeed does work in Sonic 1)

sound playback routines

now find:

; ---------------------------------------------------------------------------
; Subroutine to	play a special sound/music (E0-E4)
;
; E0 - Fade out
; E1 - Sega
; E2 - Speed up
; E3 - Normal speed
; E4 - Stop
; ---------------------------------------------------------------------------

; ||||||||||||||| S U B	R O U T	I N E |||||||||||||||||||||||||||||||||||||||


PlaySound_Special:
		move.b	d0,($FFFFF00B).w
		rts	
; End of function PlaySound_Special

; ===========================================================================
; ---------------------------------------------------------------------------
; Unused sound/music subroutine
; ---------------------------------------------------------------------------

PlaySound_Unk:
		move.b	d0,($FFFFF00C).w
		rts

and replace it entirely with:

; ---------------------------------------------------------------------------
; Subroutine to	play a special sound/music (FB-FF)
; ---------------------------------------------------------------------------

PlaySound_Special:
		move.w	#$100,($A11100).l

PlaySound_SpecialZ80NotStopped:
		btst	#0,($A11100).l
		bne.s	PlaySound_SpecialZ80NotStopped
		cmp.b	($A01C0B).l,d0
		beq.s	PlaySound_Special1
		tst.b	($A01C0B).l
		bne.s	PlaySound_Special0
		move.b	d0,($A01C0B).l
		move.w	#0,($A11100).l
		rts

PlaySound_Special0:
		move.b	d0,($A01C0C).l

PlaySound_Special1:
		move.w	#0,($A11100).l

SkipPlaySound_Special:
		rts
; End of function PlaySound_Special

; ---------------------------------------------------------------------------
; Subroutine to change the music tempo
; ---------------------------------------------------------------------------

SetTempo:
		move.w	#$100,($A11100).l

SetTempoZ80NotStopped:
		btst	#0,($A11100).l
		bne.s	SetTempoZ80NotStopped
		move.b	D0,($A01C08).l
		move.w	#0,($A11100).l
		rts

Upgrading Pause / Resume routines

Now the playback routines are fixed and we have a routine to set the tempo the way the sneakers do, which we will elaberate later on, but we still have to update the pause / resume routines to the sonic 3 equivilents.

Find:

; ---------------------------------------------------------------------------
; Subroutine to	pause the game
; ---------------------------------------------------------------------------

; ||||||||||||||| S U B	R O U T	I N E |||||||||||||||||||||||||||||||||||||||


PauseGame:				; XREF: Level_MainLoop; et al
		nop	
		tst.b	($FFFFFE12).w	; do you have any lives	left?
		beq.s	Unpause		; if not, branch
		tst.w	($FFFFF63A).w	; is game already paused?
		bne.s	loc_13BE	; if yes, branch
		btst	#7,($FFFFF605).w ; is Start button pressed?
		beq.s	Pause_DoNothing	; if not, branch

loc_13BE:
		move.w	#1,($FFFFF63A).w ; freeze time
		move.b	#1,($FFFFF003).w ; pause music

loc_13CA:
		move.b	#$10,($FFFFF62A).w
		bsr.w	WaitForVBla
		tst.b	($FFFFFFE1).w	; is slow-motion cheat on?
		beq.s	Pause_ChkStart	; if not, branch
		btst	#6,($FFFFF605).w ; is button A pressed?
		beq.s	Pause_ChkBC	; if not, branch
		move.b	#4,($FFFFF600).w ; set game mode to 4 (title screen)
		nop	
		bra.s	loc_1404
; ===========================================================================

Pause_ChkBC:				; XREF: PauseGame
		btst	#4,($FFFFF604).w ; is button B pressed?
		bne.s	Pause_SlowMo	; if yes, branch
		btst	#5,($FFFFF605).w ; is button C pressed?
		bne.s	Pause_SlowMo	; if yes, branch

Pause_ChkStart:				; XREF: PauseGame
		btst	#7,($FFFFF605).w ; is Start button pressed?
		beq.s	loc_13CA	; if not, branch

loc_1404:				; XREF: PauseGame
		move.b	#$80,($FFFFF003).w

Unpause:				; XREF: PauseGame
		move.w	#0,($FFFFF63A).w ; unpause the game

Pause_DoNothing:			; XREF: PauseGame
		rts	
; ===========================================================================

Pause_SlowMo:				; XREF: PauseGame
		move.w	#1,($FFFFF63A).w
		move.b	#$80,($FFFFF003).w
		rts	
; End of function PauseGame

and replace it completely with:

; ---------------------------------------------------------------------------
; Subroutine to	pause the game
; ---------------------------------------------------------------------------

; ||||||||||||||| S U B	R O U T	I N E |||||||||||||||||||||||||||||||||||||||


PauseGame:				; XREF: Level_MainLoop; et al
		nop
		tst.b	($FFFFFE12).w ; do you have any lives left
		beq	Unpause           ; if not, branch
		tst.w	($FFFFF63A).w ;is the game already paused?
		bne.s	PauseGame_AlreadyPaused ;if yes, branch
		move.b	($FFFFF605).w,d0 ;did you press start
		or.b	($FFFFF607).w,d0         ;on either controller?
		andi.b	#$80,d0
		beq	Pause_DoNothing         ;if not, branch

PauseGame_AlreadyPaused:	
		move.w	#1,($FFFFF63A).w ;unpause the game
		move.w	#$100,($A11100).l  ;stop the z80

PauseGameZ80NotStopped:
		btst	#0,($A11100).l
		bne.s	PauseGameZ80NotStopped
		move.b	#1,($A01C10).l ;unpause the music ;)
		move.w	#0,($A11100).l ;start the z80

PauseGameLoop:
		move.b	#$10,($FFFFF62A).w ;re-pause the game (used in slow-mo and frame advance)
		jsr	DelayProgram ;wait...
		tst.b	($FFFFFFE1).w ; Edit: the value is $FFFFFFE1 in Sonic 1 (slow-mo/frame advance mode)
		beq.s	Pause_ChkStart
		btst	#6,($FFFFF605).w ;is player 1 pressing either A?
		beq.s	Pause_ChkBC ;if not, branch
		move.b	#$4,($FFFFF600).w ; Go To Title Screen
		nop
		bra.s	PauseGame1 ;time to stop the z80 again

Pause_ChkBC:
		btst	#4,($FFFFF604).w ;did you press a?
		bne.s	Pause_SlowMo ;if so, branch
		btst	#5,($FFFFF605).w ;did you press b?
		bne.s	Pause_SlowMo ;if so, branch

Pause_ChkStart:
		btst	#4,($FFFFF605).w            ;did you press a?
		beq.s	PauseGame0           ;if yes, then paise the freaken game
		move.b	#$0,($FFFFF600).w  ;prepare to go to sega screen (level select is not 0xC0 in sonic1, but part of title screen code)
		bra.s	PauseGame1                   ;go to title screen

PauseGame0:
		move.b	($FFFFF605).w,d0  ;on controller 1?
		or.b	($FFFFF607).w,d0          ;or 2?
		andi.b	#$80,d0                 ;if not, no change
		beq.s	PauseGameLoop   ;in other words, don't pause

PauseGame1:
		move.w	#$100,($A11100).l  ;stop the z80

Pause_ChkStartZ80NotStopped:
		btst	#0,($A11100).l
		bne.s	Pause_ChkStartZ80NotStopped
		move.b	#$80,($A01C10).l ;pause the music
		move.w	#0,($A11100).l     ;start the z80

Unpause:
		move.w	#0,($FFFFF63A).w ;unpause the game

Pause_DoNothing:
		rts

Pause_SlowMo:
		move.w	#1,($FFFFF63A).w ;unpause the music for a frame
		move.w	#$100,($A11100).l  ;stop the z80

Pause_SlowMoZ80NotStopped:
		btst	#0,($A11100).l
		bne.s	Pause_SlowMoZ80NotStopped
		move.b	#$80,($A01C10).l ;pause the music again
		move.w	#0,($A11100).l ;start the z80
		rts
; End of function PauseGame

Replacing 68k driver with new Z80 driver

We need the sound driver itself if we are going to have any sound and music, so we locate:

		align 2

Go_SoundTypes:	dc.l SoundTypes		; XREF: Sound_Play
Go_SoundD0:	dc.l SoundD0Index	; XREF: Sound_D0toDF
Go_MusicIndex:	dc.l MusicIndex		; XREF: Sound_81to9F
Go_SoundIndex:	dc.l SoundIndex		; XREF: Sound_A0toCF
off_719A0:	dc.l byte_71A94		; XREF: Sound_81to9F
Go_PSGIndex:	dc.l PSG_Index		; XREF: sub_72926
; ---------------------------------------------------------------------------
; PSG instruments used in music
; ---------------------------------------------------------------------------
PSG_Index:	dc.l PSG1, PSG2, PSG3
		dc.l PSG4, PSG5, PSG6
		dc.l PSG7, PSG8, PSG9
PSG1:		binclude	sound\psg1.bin
PSG2:		binclude	sound\psg2.bin
PSG3:		binclude	sound\psg3.bin
PSG4:		binclude	sound\psg4.bin
PSG6:		binclude	sound\psg6.bin
PSG5:		binclude	sound\psg5.bin
PSG7:		binclude	sound\psg7.bin
PSG8:		binclude	sound\psg8.bin
PSG9:		binclude	sound\psg9.bin

byte_71A94:	dc.b 7,	$72, $73, $26, $15, 8, $FF, 5
; ---------------------------------------------------------------------------
; Music	Pointers
; ---------------------------------------------------------------------------
MusicIndex:	dc.l Music81, Music82
		dc.l Music83, Music84
		dc.l Music85, Music86
		dc.l Music87, Music88
		dc.l Music89, Music8A
		dc.l Music8B, Music8C
		dc.l Music8D, Music8E
		dc.l Music8F, Music90
		dc.l Music91, Music92
		dc.l Music93
; ---------------------------------------------------------------------------
; Type of sound	being played ($90 = music; $70 = normal	sound effect)
; ---------------------------------------------------------------------------
SoundTypes:	dc.b $90, $90, $90, $90, $90, $90, $90,	$90, $90, $90, $90, $90, $90, $90, $90,	$90
		dc.b $90, $90, $90, $90, $90, $90, $90,	$90, $90, $90, $90, $90, $90, $90, $90,	$80
		dc.b $70, $70, $70, $70, $70, $70, $70,	$70, $70, $68, $70, $70, $70, $60, $70,	$70
		dc.b $60, $70, $60, $70, $70, $70, $70,	$70, $70, $70, $70, $70, $70, $70, $7F,	$60
		dc.b $70, $70, $70, $70, $70, $70, $70,	$70, $70, $70, $70, $70, $70, $70, $70,	$80
		dc.b $80, $80, $80, $80, $80, $80, $80,	$80, $80, $80, $80, $80, $80, $80, $80,	$90
		dc.b $90, $90, $90, $90

; ||||||||||||||| S U B	R O U T	I N E |||||||||||||||||||||||||||||||||||||||


sub_71B4C:				; XREF: loc_B10; PalToCRAM
		move.w	#$100,($A11100).l ; stop the Z80
		nop	
		nop	
		nop	

loc_71B5A:
		btst	#0,($A11100).l
		bne.s	loc_71B5A

		btst	#7,($A01FFD).l
		beq.s	loc_71B82
		move.w	#0,($A11100).l	; start	the Z80
		nop	
		nop	
		nop	
		nop	
		nop	
		bra.s	sub_71B4C
; ===========================================================================

loc_71B82:
		lea	($FFF000).l,a6
		clr.b	$E(a6)
		tst.b	3(a6)		; is music paused?
		bne.w	loc_71E50	; if yes, branch
		subq.b	#1,1(a6)
		bne.s	loc_71B9E
		jsr	sub_7260C(pc)

loc_71B9E:
		move.b	4(a6),d0
		beq.s	loc_71BA8
		jsr	sub_72504(pc)

loc_71BA8:
		tst.b	$24(a6)
		beq.s	loc_71BB2
		jsr	sub_7267C(pc)

loc_71BB2:
		tst.w	$A(a6)		; is music or sound being played?
		beq.s	loc_71BBC	; if not, branch
		jsr	Sound_Play(pc)

loc_71BBC:
		cmpi.b	#$80,9(a6)
		beq.s	loc_71BC8
		jsr	Sound_ChkValue(pc)

loc_71BC8:
		lea	$40(a6),a5
		tst.b	(a5)
		bpl.s	loc_71BD4
		jsr	sub_71C4E(pc)

loc_71BD4:
		clr.b	8(a6)
		moveq	#5,d7

loc_71BDA:
		adda.w	#$30,a5
		tst.b	(a5)
		bpl.s	loc_71BE6
		jsr	sub_71CCA(pc)

loc_71BE6:
		dbf	d7,loc_71BDA

		moveq	#2,d7

loc_71BEC:
		adda.w	#$30,a5
		tst.b	(a5)
		bpl.s	loc_71BF8
		jsr	sub_72850(pc)

loc_71BF8:
		dbf	d7,loc_71BEC

		move.b	#$80,$E(a6)
		moveq	#2,d7

loc_71C04:
		adda.w	#$30,a5
		tst.b	(a5)
		bpl.s	loc_71C10
		jsr	sub_71CCA(pc)

loc_71C10:
		dbf	d7,loc_71C04

		moveq	#2,d7

loc_71C16:
		adda.w	#$30,a5
		tst.b	(a5)
		bpl.s	loc_71C22
		jsr	sub_72850(pc)

loc_71C22:
		dbf	d7,loc_71C16
		move.b	#$40,$E(a6)
		adda.w	#$30,a5
		tst.b	(a5)
		bpl.s	loc_71C38
		jsr	sub_71CCA(pc)

loc_71C38:
		adda.w	#$30,a5
		tst.b	(a5)
		bpl.s	loc_71C44
		jsr	sub_72850(pc)

loc_71C44:
		move.w	#0,($A11100).l	; start	the Z80
		rts	
; End of function sub_71B4C


; ||||||||||||||| S U B	R O U T	I N E |||||||||||||||||||||||||||||||||||||||


sub_71C4E:				; XREF: sub_71B4C
		subq.b	#1,$E(a5)
		bne.s	locret_71CAA
		move.b	#$80,8(a6)
		movea.l	4(a5),a4

loc_71C5E:
		moveq	#0,d5
		move.b	(a4)+,d5
		cmpi.b	#-$20,d5
		bcs.s	loc_71C6E
		jsr	sub_72A5A(pc)
		bra.s	loc_71C5E
; ===========================================================================

loc_71C6E:
		tst.b	d5
		bpl.s	loc_71C84
		move.b	d5,$10(a5)
		move.b	(a4)+,d5
		bpl.s	loc_71C84
		subq.w	#1,a4
		move.b	$F(a5),$E(a5)
		bra.s	loc_71C88
; ===========================================================================

loc_71C84:
		jsr	sub_71D40(pc)

loc_71C88:
		move.l	a4,4(a5)
		btst	#2,(a5)
		bne.s	locret_71CAA
		moveq	#0,d0
		move.b	$10(a5),d0
		cmpi.b	#$80,d0
		beq.s	locret_71CAA
		btst	#3,d0
		bne.s	loc_71CAC
		move.b	d0,($A01FFF).l

locret_71CAA:
		rts	
; ===========================================================================

loc_71CAC:
		subi.b	#$88,d0
		move.b	byte_71CC4(pc,d0.w),d0
		move.b	d0,($A000EA).l
		move.b	#$83,($A01FFF).l
		rts	
; End of function sub_71C4E

; ===========================================================================
byte_71CC4:	dc.b $12, $15, $1C, $1D, $FF, $FF

; ||||||||||||||| S U B	R O U T	I N E |||||||||||||||||||||||||||||||||||||||


sub_71CCA:				; XREF: sub_71B4C
		subq.b	#1,$E(a5)
		bne.s	loc_71CE0
		bclr	#4,(a5)
		jsr	sub_71CEC(pc)
		jsr	sub_71E18(pc)
		bra.w	loc_726E2
; ===========================================================================

loc_71CE0:
		jsr	sub_71D9E(pc)
		jsr	sub_71DC6(pc)
		bra.w	loc_71E24
; End of function sub_71CCA


; ||||||||||||||| S U B	R O U T	I N E |||||||||||||||||||||||||||||||||||||||


sub_71CEC:				; XREF: sub_71CCA
		movea.l	4(a5),a4
		bclr	#1,(a5)

loc_71CF4:
		moveq	#0,d5
		move.b	(a4)+,d5
		cmpi.b	#-$20,d5
		bcs.s	loc_71D04
		jsr	sub_72A5A(pc)
		bra.s	loc_71CF4
; ===========================================================================

loc_71D04:
		jsr	sub_726FE(pc)
		tst.b	d5
		bpl.s	loc_71D1A
		jsr	sub_71D22(pc)
		move.b	(a4)+,d5
		bpl.s	loc_71D1A
		subq.w	#1,a4
		bra.w	sub_71D60
; ===========================================================================

loc_71D1A:
		jsr	sub_71D40(pc)
		bra.w	sub_71D60
; End of function sub_71CEC


; ||||||||||||||| S U B	R O U T	I N E |||||||||||||||||||||||||||||||||||||||


sub_71D22:				; XREF: sub_71CEC
		subi.b	#$80,d5
		beq.s	loc_71D58
		add.b	8(a5),d5
		andi.w	#$7F,d5
		lsl.w	#1,d5
		lea	word_72790(pc),a0
		move.w	(a0,d5.w),d6
		move.w	d6,$10(a5)
		rts	
; End of function sub_71D22


; ||||||||||||||| S U B	R O U T	I N E |||||||||||||||||||||||||||||||||||||||


sub_71D40:				; XREF: sub_71C4E; sub_71CEC; sub_72878
		move.b	d5,d0
		move.b	2(a5),d1

loc_71D46:
		subq.b	#1,d1
		beq.s	loc_71D4E
		add.b	d5,d0
		bra.s	loc_71D46
; ===========================================================================

loc_71D4E:
		move.b	d0,$F(a5)
		move.b	d0,$E(a5)
		rts	
; End of function sub_71D40

; ===========================================================================

loc_71D58:				; XREF: sub_71D22
		bset	#1,(a5)
		clr.w	$10(a5)

; ||||||||||||||| S U B	R O U T	I N E |||||||||||||||||||||||||||||||||||||||


sub_71D60:				; XREF: sub_71CEC; sub_72878; sub_728AC
		move.l	a4,4(a5)
		move.b	$F(a5),$E(a5)
		btst	#4,(a5)
		bne.s	locret_71D9C
		move.b	$13(a5),$12(a5)
		clr.b	$C(a5)
		btst	#3,(a5)
		beq.s	locret_71D9C
		movea.l	$14(a5),a0
		move.b	(a0)+,$18(a5)
		move.b	(a0)+,$19(a5)
		move.b	(a0)+,$1A(a5)
		move.b	(a0)+,d0
		lsr.b	#1,d0
		move.b	d0,$1B(a5)
		clr.w	$1C(a5)

locret_71D9C:
		rts	
; End of function sub_71D60


; ||||||||||||||| S U B	R O U T	I N E |||||||||||||||||||||||||||||||||||||||


sub_71D9E:				; XREF: sub_71CCA; sub_72850
		tst.b	$12(a5)
		beq.s	locret_71DC4
		subq.b	#1,$12(a5)
		bne.s	locret_71DC4
		bset	#1,(a5)
		tst.b	1(a5)
		bmi.w	loc_71DBE
		jsr	sub_726FE(pc)
		addq.w	#4,sp
		rts	
; ===========================================================================

loc_71DBE:
		jsr	sub_729A0(pc)
		addq.w	#4,sp

locret_71DC4:
		rts	
; End of function sub_71D9E


; ||||||||||||||| S U B	R O U T	I N E |||||||||||||||||||||||||||||||||||||||


sub_71DC6:				; XREF: sub_71CCA; sub_72850
		addq.w	#4,sp
		btst	#3,(a5)
		beq.s	locret_71E16
		tst.b	$18(a5)
		beq.s	loc_71DDA
		subq.b	#1,$18(a5)
		rts	
; ===========================================================================

loc_71DDA:
		subq.b	#1,$19(a5)
		beq.s	loc_71DE2
		rts	
; ===========================================================================

loc_71DE2:
		movea.l	$14(a5),a0
		move.b	1(a0),$19(a5)
		tst.b	$1B(a5)
		bne.s	loc_71DFE
		move.b	3(a0),$1B(a5)
		neg.b	$1A(a5)
		rts	
; ===========================================================================

loc_71DFE:
		subq.b	#1,$1B(a5)
		move.b	$1A(a5),d6
		ext.w	d6
		add.w	$1C(a5),d6
		move.w	d6,$1C(a5)
		add.w	$10(a5),d6
		subq.w	#4,sp

locret_71E16:
		rts	
; End of function sub_71DC6



; ||||||||||||||| S U B	R O U T	I N E |||||||||||||||||||||||||||||||||||||||


sub_71E18:				; XREF: sub_71CCA
		btst	#1,(a5)
		bne.s	locret_71E48
		move.w	$10(a5),d6
		beq.s	loc_71E4A

loc_71E24:				; XREF: sub_71CCA
		move.b	$1E(a5),d0
		ext.w	d0
		add.w	d0,d6
		btst	#2,(a5)
		bne.s	locret_71E48
		move.w	d6,d1
		lsr.w	#8,d1
		move.b	#-$5C,d0
		jsr	sub_72722(pc)
		move.b	d6,d1
		move.b	#-$60,d0
		jsr	sub_72722(pc)

locret_71E48:
		rts	
; ===========================================================================

loc_71E4A:
		bset	#1,(a5)
		rts	
; End of function sub_71E18

; ===========================================================================

loc_71E50:				; XREF: sub_71B4C
		bmi.s	loc_71E94
		cmpi.b	#2,3(a6)
		beq.w	loc_71EFE
		move.b	#2,3(a6)
		moveq	#2,d3
		move.b	#-$4C,d0
		moveq	#0,d1

loc_71E6A:
		jsr	sub_7272E(pc)
		jsr	sub_72764(pc)
		addq.b	#1,d0
		dbf	d3,loc_71E6A

		moveq	#2,d3
		moveq	#$28,d0

loc_71E7C:
		move.b	d3,d1
		jsr	sub_7272E(pc)
		addq.b	#4,d1
		jsr	sub_7272E(pc)
		dbf	d3,loc_71E7C

		jsr	sub_729B6(pc)
		bra.w	loc_71C44
; ===========================================================================

loc_71E94:				; XREF: loc_71E50
		clr.b	3(a6)
		moveq	#$30,d3
		lea	$40(a6),a5
		moveq	#6,d4

loc_71EA0:
		btst	#7,(a5)
		beq.s	loc_71EB8
		btst	#2,(a5)
		bne.s	loc_71EB8
		move.b	#-$4C,d0
		move.b	$A(a5),d1
		jsr	sub_72722(pc)

loc_71EB8:
		adda.w	d3,a5
		dbf	d4,loc_71EA0

		lea	$220(a6),a5
		moveq	#2,d4

loc_71EC4:
		btst	#7,(a5)
		beq.s	loc_71EDC
		btst	#2,(a5)
		bne.s	loc_71EDC
		move.b	#-$4C,d0
		move.b	$A(a5),d1
		jsr	sub_72722(pc)

loc_71EDC:
		adda.w	d3,a5
		dbf	d4,loc_71EC4

		lea	$340(a6),a5
		btst	#7,(a5)
		beq.s	loc_71EFE
		btst	#2,(a5)
		bne.s	loc_71EFE
		move.b	#-$4C,d0
		move.b	$A(a5),d1
		jsr	sub_72722(pc)

loc_71EFE:
		bra.w	loc_71C44

; ---------------------------------------------------------------------------
; Subroutine to	play a sound or	music track
; ---------------------------------------------------------------------------

; ||||||||||||||| S U B	R O U T	I N E |||||||||||||||||||||||||||||||||||||||


Sound_Play:				; XREF: sub_71B4C
		movea.l	(Go_SoundTypes).l,a0
		lea	$A(a6),a1	; load music track number
		move.b	0(a6),d3
		moveq	#2,d4

loc_71F12:
		move.b	(a1),d0		; move track number to d0
		move.b	d0,d1
		clr.b	(a1)+
		subi.b	#$81,d0
		bcs.s	loc_71F3E
		cmpi.b	#$80,9(a6)
		beq.s	loc_71F2C
		move.b	d1,$A(a6)
		bra.s	loc_71F3E
; ===========================================================================

loc_71F2C:
		andi.w	#$7F,d0
		move.b	(a0,d0.w),d2
		cmp.b	d3,d2
		bcs.s	loc_71F3E
		move.b	d2,d3
		move.b	d1,9(a6)	; set music flag

loc_71F3E:
		dbf	d4,loc_71F12

		tst.b	d3
		bmi.s	locret_71F4A
		move.b	d3,0(a6)

locret_71F4A:
		rts	
; End of function Sound_Play


; ||||||||||||||| S U B	R O U T	I N E |||||||||||||||||||||||||||||||||||||||


Sound_ChkValue:				; XREF: sub_71B4C
		moveq	#0,d7
		move.b	9(a6),d7
		beq.w	Sound_E4
		bpl.s	locret_71F8C
		move.b	#$80,9(a6)	; reset	music flag
		cmpi.b	#$9F,d7
		bls.w	Sound_81to9F	; music	$81-$9F
		cmpi.b	#$A0,d7
		bcs.w	locret_71F8C
		cmpi.b	#$CF,d7
		bls.w	Sound_A0toCF	; sound	$A0-$CF
		cmpi.b	#$D0,d7
		bcs.w	locret_71F8C
		cmpi.b	#$E0,d7
		bcs.w	Sound_D0toDF	; sound	$D0-$DF
		cmpi.b	#$E4,d7
		bls.s	Sound_E0toE4	; sound	$E0-$E4

locret_71F8C:
		rts	
; ===========================================================================

Sound_E0toE4:				; XREF: Sound_ChkValue
		subi.b	#$E0,d7
		lsl.w	#2,d7
		jmp	Sound_ExIndex(pc,d7.w)
; ===========================================================================

Sound_ExIndex:
		bra.w	Sound_E0
; ===========================================================================
		bra.w	Sound_E1
; ===========================================================================
		bra.w	Sound_E2
; ===========================================================================
		bra.w	Sound_E3
; ===========================================================================
		bra.w	Sound_E4
; ===========================================================================
; ---------------------------------------------------------------------------
; Play "Say-gaa" PCM sound
; ---------------------------------------------------------------------------

Sound_E1:				; XREF: Sound_ExIndex
		move.b	#$88,($A01FFF).l
		move.w	#0,($A11100).l	; start	the Z80
		move.w	#$11,d1

loc_71FC0:
		move.w	#-1,d0

loc_71FC4:
		nop	
		dbf	d0,loc_71FC4

		dbf	d1,loc_71FC0

		addq.w	#4,sp
		rts	
; ===========================================================================
; ---------------------------------------------------------------------------
; Play music track $81-$9F
; ---------------------------------------------------------------------------

Sound_81to9F:				; XREF: Sound_ChkValue
		cmpi.b	#$88,d7		; is "extra life" music	played?
		bne.s	loc_72024	; if not, branch
		tst.b	$27(a6)
		bne.w	loc_721B6
		lea	$40(a6),a5
		moveq	#9,d0

loc_71FE6:
		bclr	#2,(a5)
		adda.w	#$30,a5
		dbf	d0,loc_71FE6

		lea	$220(a6),a5
		moveq	#5,d0

loc_71FF8:
		bclr	#7,(a5)
		adda.w	#$30,a5
		dbf	d0,loc_71FF8
		clr.b	0(a6)
		movea.l	a6,a0
		lea	$3A0(a6),a1
		move.w	#$87,d0

loc_72012:
		move.l	(a0)+,(a1)+
		dbf	d0,loc_72012

		move.b	#$80,$27(a6)
		clr.b	0(a6)
		bra.s	loc_7202C
; ===========================================================================

loc_72024:
		clr.b	$27(a6)
		clr.b	$26(a6)

loc_7202C:
		jsr	sub_725CA(pc)
		movea.l	(off_719A0).l,a4
		subi.b	#$81,d7
		move.b	(a4,d7.w),$29(a6)
		movea.l	(Go_MusicIndex).l,a4
		lsl.w	#2,d7
		movea.l	(a4,d7.w),a4
		moveq	#0,d0
		move.w	(a4),d0
		add.l	a4,d0
		move.l	d0,$18(a6)
		move.b	5(a4),d0
		move.b	d0,$28(a6)
		tst.b	$2A(a6)
		beq.s	loc_72068
		move.b	$29(a6),d0

loc_72068:
		move.b	d0,2(a6)
		move.b	d0,1(a6)
		moveq	#0,d1
		movea.l	a4,a3
		addq.w	#6,a4
		moveq	#0,d7
		move.b	2(a3),d7
		beq.w	loc_72114
		subq.b	#1,d7
		move.b	#-$40,d1
		move.b	4(a3),d4
		moveq	#$30,d6
		move.b	#1,d5
		lea	$40(a6),a1
		lea	byte_721BA(pc),a2

loc_72098:
		bset	#7,(a1)
		move.b	(a2)+,1(a1)
		move.b	d4,2(a1)
		move.b	d6,$D(a1)
		move.b	d1,$A(a1)
		move.b	d5,$E(a1)
		moveq	#0,d0
		move.w	(a4)+,d0
		add.l	a3,d0
		move.l	d0,4(a1)
		move.w	(a4)+,8(a1)
		adda.w	d6,a1
		dbf	d7,loc_72098
		cmpi.b	#7,2(a3)
		bne.s	loc_720D8
		moveq	#$2B,d0
		moveq	#0,d1
		jsr	sub_7272E(pc)
		bra.w	loc_72114
; ===========================================================================

loc_720D8:
		moveq	#$28,d0
		moveq	#6,d1
		jsr	sub_7272E(pc)
		move.b	#$42,d0
		moveq	#$7F,d1
		jsr	sub_72764(pc)
		move.b	#$4A,d0
		moveq	#$7F,d1
		jsr	sub_72764(pc)
		move.b	#$46,d0
		moveq	#$7F,d1
		jsr	sub_72764(pc)
		move.b	#$4E,d0
		moveq	#$7F,d1
		jsr	sub_72764(pc)
		move.b	#-$4A,d0
		move.b	#-$40,d1
		jsr	sub_72764(pc)

loc_72114:
		moveq	#0,d7
		move.b	3(a3),d7
		beq.s	loc_72154
		subq.b	#1,d7
		lea	$190(a6),a1
		lea	byte_721C2(pc),a2

loc_72126:
		bset	#7,(a1)
		move.b	(a2)+,1(a1)
		move.b	d4,2(a1)
		move.b	d6,$D(a1)
		move.b	d5,$E(a1)
		moveq	#0,d0
		move.w	(a4)+,d0
		add.l	a3,d0
		move.l	d0,4(a1)
		move.w	(a4)+,8(a1)
		move.b	(a4)+,d0
		move.b	(a4)+,$B(a1)
		adda.w	d6,a1
		dbf	d7,loc_72126

loc_72154:
		lea	$220(a6),a1
		moveq	#5,d7

loc_7215A:
		tst.b	(a1)
		bpl.w	loc_7217C
		moveq	#0,d0
		move.b	1(a1),d0
		bmi.s	loc_7216E
		subq.b	#2,d0
		lsl.b	#2,d0
		bra.s	loc_72170
; ===========================================================================

loc_7216E:
		lsr.b	#3,d0

loc_72170:
		lea	dword_722CC(pc),a0
		movea.l	(a0,d0.w),a0
		bset	#2,(a0)

loc_7217C:
		adda.w	d6,a1
		dbf	d7,loc_7215A

		tst.w	$340(a6)
		bpl.s	loc_7218E
		bset	#2,$100(a6)

loc_7218E:
		tst.w	$370(a6)
		bpl.s	loc_7219A
		bset	#2,$1F0(a6)

loc_7219A:
		lea	$70(a6),a5
		moveq	#5,d4

loc_721A0:
		jsr	sub_726FE(pc)
		adda.w	d6,a5
		dbf	d4,loc_721A0
		moveq	#2,d4

loc_721AC:
		jsr	sub_729A0(pc)
		adda.w	d6,a5
		dbf	d4,loc_721AC

loc_721B6:
		addq.w	#4,sp
		rts	
; ===========================================================================
byte_721BA:	dc.b 6,	0, 1, 2, 4, 5, 6, 0
		align 2
byte_721C2:	dc.b $80, $A0, $C0, 0
		align 2
; ===========================================================================
; ---------------------------------------------------------------------------
; Play normal sound effect
; ---------------------------------------------------------------------------

Sound_A0toCF:				; XREF: Sound_ChkValue
		tst.b	$27(a6)
		bne.w	loc_722C6
		tst.b	4(a6)
		bne.w	loc_722C6
		tst.b	$24(a6)
		bne.w	loc_722C6
		cmpi.b	#$B5,d7		; is ring sound	effect played?
		bne.s	Sound_notB5	; if not, branch
		tst.b	$2B(a6)
		bne.s	loc_721EE
		move.b	#$CE,d7		; play ring sound in left speaker

loc_721EE:
		bchg	#0,$2B(a6)	; change speaker

Sound_notB5:
		cmpi.b	#$A7,d7		; is "pushing" sound played?
		bne.s	Sound_notA7	; if not, branch
		tst.b	$2C(a6)
		bne.w	locret_722C4
		move.b	#$80,$2C(a6)

Sound_notA7:
		movea.l	(Go_SoundIndex).l,a0
		subi.b	#$A0,d7
		lsl.w	#2,d7
		movea.l	(a0,d7.w),a3
		movea.l	a3,a1
		moveq	#0,d1
		move.w	(a1)+,d1
		add.l	a3,d1
		move.b	(a1)+,d5
		move.b	(a1)+,d7
		subq.b	#1,d7
		moveq	#$30,d6

loc_72228:
		moveq	#0,d3
		move.b	1(a1),d3
		move.b	d3,d4
		bmi.s	loc_72244
		subq.w	#2,d3
		lsl.w	#2,d3
		lea	dword_722CC(pc),a5
		movea.l	(a5,d3.w),a5
		bset	#2,(a5)
		bra.s	loc_7226E
; ===========================================================================

loc_72244:
		lsr.w	#3,d3
		lea	dword_722CC(pc),a5
		movea.l	(a5,d3.w),a5
		bset	#2,(a5)
		cmpi.b	#$C0,d4
		bne.s	loc_7226E
		move.b	d4,d0
		ori.b	#$1F,d0
		move.b	d0,($C00011).l
		bchg	#5,d0
		move.b	d0,($C00011).l

loc_7226E:
		movea.l	dword_722EC(pc,d3.w),a5
		movea.l	a5,a2
		moveq	#$B,d0

loc_72276:
		clr.l	(a2)+
		dbf	d0,loc_72276

		move.w	(a1)+,(a5)
		move.b	d5,2(a5)
		moveq	#0,d0
		move.w	(a1)+,d0
		add.l	a3,d0
		move.l	d0,4(a5)
		move.w	(a1)+,8(a5)
		move.b	#1,$E(a5)
		move.b	d6,$D(a5)
		tst.b	d4
		bmi.s	loc_722A8
		move.b	#$C0,$A(a5)
		move.l	d1,$20(a5)

loc_722A8:
		dbf	d7,loc_72228

		tst.b	$250(a6)
		bpl.s	loc_722B8
		bset	#2,$340(a6)

loc_722B8:
		tst.b	$310(a6)
		bpl.s	locret_722C4
		bset	#2,$370(a6)

locret_722C4:
		rts	
; ===========================================================================

loc_722C6:
		clr.b	0(a6)
		rts	
; ===========================================================================
dword_722CC:	dc.l $FFF0D0
		dc.l 0
		dc.l $FFF100
		dc.l $FFF130
		dc.l $FFF190
		dc.l $FFF1C0
		dc.l $FFF1F0
		dc.l $FFF1F0
dword_722EC:	dc.l $FFF220
		dc.l 0
		dc.l $FFF250
		dc.l $FFF280
		dc.l $FFF2B0
		dc.l $FFF2E0
		dc.l $FFF310
		dc.l $FFF310
; ===========================================================================
; ---------------------------------------------------------------------------
; Play GHZ waterfall sound
; ---------------------------------------------------------------------------

Sound_D0toDF:				; XREF: Sound_ChkValue
		tst.b	$27(a6)
		bne.w	locret_723C6
		tst.b	4(a6)
		bne.w	locret_723C6
		tst.b	$24(a6)
		bne.w	locret_723C6
		movea.l	(Go_SoundD0).l,a0
		subi.b	#$D0,d7
		lsl.w	#2,d7
		movea.l	(a0,d7.w),a3
		movea.l	a3,a1
		moveq	#0,d0
		move.w	(a1)+,d0
		add.l	a3,d0
		move.l	d0,$20(a6)
		move.b	(a1)+,d5
		move.b	(a1)+,d7
		subq.b	#1,d7
		moveq	#$30,d6

loc_72348:
		move.b	1(a1),d4
		bmi.s	loc_7235A
		bset	#2,$100(a6)
		lea	$340(a6),a5
		bra.s	loc_72364
; ===========================================================================

loc_7235A:
		bset	#2,$1F0(a6)
		lea	$370(a6),a5

loc_72364:
		movea.l	a5,a2
		moveq	#$B,d0

loc_72368:
		clr.l	(a2)+
		dbf	d0,loc_72368

		move.w	(a1)+,(a5)
		move.b	d5,2(a5)
		moveq	#0,d0
		move.w	(a1)+,d0
		add.l	a3,d0
		move.l	d0,4(a5)
		move.w	(a1)+,8(a5)
		move.b	#1,$E(a5)
		move.b	d6,$D(a5)
		tst.b	d4
		bmi.s	loc_72396
		move.b	#$C0,$A(a5)

loc_72396:
		dbf	d7,loc_72348

		tst.b	$250(a6)
		bpl.s	loc_723A6
		bset	#2,$340(a6)

loc_723A6:
		tst.b	$310(a6)
		bpl.s	locret_723C6
		bset	#2,$370(a6)
		ori.b	#$1F,d4
		move.b	d4,($C00011).l
		bchg	#5,d4
		move.b	d4,($C00011).l

locret_723C6:
		rts	
; End of function Sound_ChkValue

; ===========================================================================
		dc.l $FFF100
		dc.l $FFF1F0
		dc.l $FFF250
		dc.l $FFF310
		dc.l $FFF340
		dc.l $FFF370

; ||||||||||||||| S U B	R O U T	I N E |||||||||||||||||||||||||||||||||||||||


Snd_FadeOut1:				; XREF: Sound_E0
		clr.b	0(a6)
		lea	$220(a6),a5
		moveq	#5,d7

loc_723EA:
		tst.b	(a5)
		bpl.w	loc_72472
		bclr	#7,(a5)
		moveq	#0,d3
		move.b	1(a5),d3
		bmi.s	loc_7243C
		jsr	sub_726FE(pc)
		cmpi.b	#4,d3
		bne.s	loc_72416
		tst.b	$340(a6)
		bpl.s	loc_72416
		lea	$340(a6),a5
		movea.l	$20(a6),a1
		bra.s	loc_72428
; ===========================================================================

loc_72416:
		subq.b	#2,d3
		lsl.b	#2,d3
		lea	dword_722CC(pc),a0
		movea.l	a5,a3
		movea.l	(a0,d3.w),a5
		movea.l	$18(a6),a1

loc_72428:
		bclr	#2,(a5)
		bset	#1,(a5)
		move.b	$B(a5),d0
		jsr	sub_72C4E(pc)
		movea.l	a3,a5
		bra.s	loc_72472
; ===========================================================================

loc_7243C:
		jsr	sub_729A0(pc)
		lea	$370(a6),a0
		cmpi.b	#$E0,d3
		beq.s	loc_7245A
		cmpi.b	#$C0,d3
		beq.s	loc_7245A
		lsr.b	#3,d3
		lea	dword_722CC(pc),a0
		movea.l	(a0,d3.w),a0

loc_7245A:
		bclr	#2,(a0)
		bset	#1,(a0)
		cmpi.b	#$E0,1(a0)
		bne.s	loc_72472
		move.b	$1F(a0),($C00011).l

loc_72472:
		adda.w	#$30,a5
		dbf	d7,loc_723EA

		rts	
; End of function Snd_FadeOut1


; ||||||||||||||| S U B	R O U T	I N E |||||||||||||||||||||||||||||||||||||||


Snd_FadeOut2:				; XREF: Sound_E0
		lea	$340(a6),a5
		tst.b	(a5)
		bpl.s	loc_724AE
		bclr	#7,(a5)
		btst	#2,(a5)
		bne.s	loc_724AE
		jsr	loc_7270A(pc)
		lea	$100(a6),a5
		bclr	#2,(a5)
		bset	#1,(a5)
		tst.b	(a5)
		bpl.s	loc_724AE
		movea.l	$18(a6),a1
		move.b	$B(a5),d0
		jsr	sub_72C4E(pc)

loc_724AE:
		lea	$370(a6),a5
		tst.b	(a5)
		bpl.s	locret_724E4
		bclr	#7,(a5)
		btst	#2,(a5)
		bne.s	locret_724E4
		jsr	loc_729A6(pc)
		lea	$1F0(a6),a5
		bclr	#2,(a5)
		bset	#1,(a5)
		tst.b	(a5)
		bpl.s	locret_724E4
		cmpi.b	#-$20,1(a5)
		bne.s	locret_724E4
		move.b	$1F(a5),($C00011).l

locret_724E4:
		rts	
; End of function Snd_FadeOut2

; ===========================================================================
; ---------------------------------------------------------------------------
; Fade out music
; ---------------------------------------------------------------------------

Sound_E0:				; XREF: Sound_ExIndex
		jsr	Snd_FadeOut1(pc)
		jsr	Snd_FadeOut2(pc)
		move.b	#3,6(a6)
		move.b	#$28,4(a6)
		clr.b	$40(a6)
		clr.b	$2A(a6)
		rts	

; ||||||||||||||| S U B	R O U T	I N E |||||||||||||||||||||||||||||||||||||||


sub_72504:				; XREF: sub_71B4C
		move.b	6(a6),d0
		beq.s	loc_72510
		subq.b	#1,6(a6)
		rts	
; ===========================================================================

loc_72510:
		subq.b	#1,4(a6)
		beq.w	Sound_E4
		move.b	#3,6(a6)
		lea	$70(a6),a5
		moveq	#5,d7

loc_72524:
		tst.b	(a5)
		bpl.s	loc_72538
		addq.b	#1,9(a5)
		bpl.s	loc_72534
		bclr	#7,(a5)
		bra.s	loc_72538
; ===========================================================================

loc_72534:
		jsr	sub_72CB4(pc)

loc_72538:
		adda.w	#$30,a5
		dbf	d7,loc_72524

		moveq	#2,d7

loc_72542:
		tst.b	(a5)
		bpl.s	loc_72560
		addq.b	#1,9(a5)
		cmpi.b	#$10,9(a5)
		bcs.s	loc_72558
		bclr	#7,(a5)
		bra.s	loc_72560
; ===========================================================================

loc_72558:
		move.b	9(a5),d6
		jsr	sub_7296A(pc)

loc_72560:
		adda.w	#$30,a5
		dbf	d7,loc_72542

		rts	
; End of function sub_72504


; ||||||||||||||| S U B	R O U T	I N E |||||||||||||||||||||||||||||||||||||||


sub_7256A:				; XREF: Sound_E4; sub_725CA
		moveq	#2,d3
		moveq	#$28,d0

loc_7256E:
		move.b	d3,d1
		jsr	sub_7272E(pc)
		addq.b	#4,d1
		jsr	sub_7272E(pc)
		dbf	d3,loc_7256E

		moveq	#$40,d0
		moveq	#$7F,d1
		moveq	#2,d4

loc_72584:
		moveq	#3,d3

loc_72586:
		jsr	sub_7272E(pc)
		jsr	sub_72764(pc)
		addq.w	#4,d0
		dbf	d3,loc_72586

		subi.b	#$F,d0
		dbf	d4,loc_72584

		rts	
; End of function sub_7256A

; ===========================================================================
; ---------------------------------------------------------------------------
; Stop music
; ---------------------------------------------------------------------------

Sound_E4:				; XREF: Sound_ChkValue; Sound_ExIndex; sub_72504
		moveq	#$2B,d0
		move.b	#$80,d1
		jsr	sub_7272E(pc)
		moveq	#$27,d0
		moveq	#0,d1
		jsr	sub_7272E(pc)
		movea.l	a6,a0
		move.w	#$E3,d0

loc_725B6:
		clr.l	(a0)+
		dbf	d0,loc_725B6

		move.b	#$80,9(a6)	; set music to $80 (silence)
		jsr	sub_7256A(pc)
		bra.w	sub_729B6

; ||||||||||||||| S U B	R O U T	I N E |||||||||||||||||||||||||||||||||||||||


sub_725CA:				; XREF: Sound_ChkValue
		movea.l	a6,a0
		move.b	0(a6),d1
		move.b	$27(a6),d2
		move.b	$2A(a6),d3
		move.b	$26(a6),d4
		move.w	$A(a6),d5
		move.w	#$87,d0

loc_725E4:
		clr.l	(a0)+
		dbf	d0,loc_725E4

		move.b	d1,0(a6)
		move.b	d2,$27(a6)
		move.b	d3,$2A(a6)
		move.b	d4,$26(a6)
		move.w	d5,$A(a6)
		move.b	#$80,9(a6)
		jsr	sub_7256A(pc)
		bra.w	sub_729B6
; End of function sub_725CA


; ||||||||||||||| S U B	R O U T	I N E |||||||||||||||||||||||||||||||||||||||


sub_7260C:				; XREF: sub_71B4C
		move.b	2(a6),1(a6)
		lea	$4E(a6),a0
		moveq	#$30,d0
		moveq	#9,d1

loc_7261A:
		addq.b	#1,(a0)
		adda.w	d0,a0
		dbf	d1,loc_7261A

		rts	
; End of function sub_7260C

; ===========================================================================
; ---------------------------------------------------------------------------
; Speed	up music
; ---------------------------------------------------------------------------

Sound_E2:				; XREF: Sound_ExIndex
		tst.b	$27(a6)
		bne.s	loc_7263E
		move.b	$29(a6),2(a6)
		move.b	$29(a6),1(a6)
		move.b	#$80,$2A(a6)
		rts	
; ===========================================================================

loc_7263E:
		move.b	$3C9(a6),$3A2(a6)
		move.b	$3C9(a6),$3A1(a6)
		move.b	#$80,$3CA(a6)
		rts	
; ===========================================================================
; ---------------------------------------------------------------------------
; Change music back to normal speed
; ---------------------------------------------------------------------------

Sound_E3:				; XREF: Sound_ExIndex
		tst.b	$27(a6)
		bne.s	loc_7266A
		move.b	$28(a6),2(a6)
		move.b	$28(a6),1(a6)
		clr.b	$2A(a6)
		rts	
; ===========================================================================

loc_7266A:
		move.b	$3C8(a6),$3A2(a6)
		move.b	$3C8(a6),$3A1(a6)
		clr.b	$3CA(a6)
		rts	

; ||||||||||||||| S U B	R O U T	I N E |||||||||||||||||||||||||||||||||||||||


sub_7267C:				; XREF: sub_71B4C
		tst.b	$25(a6)
		beq.s	loc_72688
		subq.b	#1,$25(a6)
		rts	
; ===========================================================================

loc_72688:
		tst.b	$26(a6)
		beq.s	loc_726D6
		subq.b	#1,$26(a6)
		move.b	#2,$25(a6)
		lea	$70(a6),a5
		moveq	#5,d7

loc_7269E:
		tst.b	(a5)
		bpl.s	loc_726AA
		subq.b	#1,9(a5)
		jsr	sub_72CB4(pc)

loc_726AA:
		adda.w	#$30,a5
		dbf	d7,loc_7269E
		moveq	#2,d7

loc_726B4:
		tst.b	(a5)
		bpl.s	loc_726CC
		subq.b	#1,9(a5)
		move.b	9(a5),d6
		cmpi.b	#$10,d6
		bcs.s	loc_726C8
		moveq	#$F,d6

loc_726C8:
		jsr	sub_7296A(pc)

loc_726CC:
		adda.w	#$30,a5
		dbf	d7,loc_726B4
		rts	
; ===========================================================================

loc_726D6:
		bclr	#2,$40(a6)
		clr.b	$24(a6)
		rts	
; End of function sub_7267C

; ===========================================================================

loc_726E2:				; XREF: sub_71CCA
		btst	#1,(a5)
		bne.s	locret_726FC
		btst	#2,(a5)
		bne.s	locret_726FC
		moveq	#$28,d0
		move.b	1(a5),d1
		ori.b	#-$10,d1
		bra.w	sub_7272E
; ===========================================================================

locret_726FC:
		rts	

; ||||||||||||||| S U B	R O U T	I N E |||||||||||||||||||||||||||||||||||||||


sub_726FE:				; XREF: sub_71CEC; sub_71D9E; Sound_ChkValue; Snd_FadeOut1
		btst	#4,(a5)
		bne.s	locret_72714
		btst	#2,(a5)
		bne.s	locret_72714

loc_7270A:				; XREF: Snd_FadeOut2
		moveq	#$28,d0
		move.b	1(a5),d1
		bra.w	sub_7272E
; ===========================================================================

locret_72714:
		rts	
; End of function sub_726FE

; ===========================================================================

loc_72716:				; XREF: sub_72A5A
		btst	#2,(a5)
		bne.s	locret_72720
		bra.w	sub_72722
; ===========================================================================

locret_72720:
		rts	

; ||||||||||||||| S U B	R O U T	I N E |||||||||||||||||||||||||||||||||||||||


sub_72722:				; XREF: sub_71E18; sub_72C4E; sub_72CB4
		btst	#2,1(a5)
		bne.s	loc_7275A
		add.b	1(a5),d0
; End of function sub_72722


; ||||||||||||||| S U B	R O U T	I N E |||||||||||||||||||||||||||||||||||||||


sub_7272E:				; XREF: loc_71E6A
		move.b	($A04000).l,d2
		btst	#7,d2
		bne.s	sub_7272E
		move.b	d0,($A04000).l
		nop	
		nop	
		nop	

loc_72746:
		move.b	($A04000).l,d2
		btst	#7,d2
		bne.s	loc_72746

		move.b	d1,($A04001).l
		rts	
; End of function sub_7272E

; ===========================================================================

loc_7275A:				; XREF: sub_72722
		move.b	1(a5),d2
		bclr	#2,d2
		add.b	d2,d0

; ||||||||||||||| S U B	R O U T	I N E |||||||||||||||||||||||||||||||||||||||


sub_72764:				; XREF: loc_71E6A; Sound_ChkValue; sub_7256A; sub_72764
		move.b	($A04000).l,d2
		btst	#7,d2
		bne.s	sub_72764
		move.b	d0,($A04002).l
		nop	
		nop	
		nop	

loc_7277C:
		move.b	($A04000).l,d2
		btst	#7,d2
		bne.s	loc_7277C

		move.b	d1,($A04003).l
		rts	
; End of function sub_72764

; ===========================================================================
word_72790:	dc.w $25E, $284, $2AB, $2D3, $2FE, $32D, $35C, $38F, $3C5
		dc.w $3FF, $43C, $47C, $A5E, $A84, $AAB, $AD3, $AFE, $B2D
		dc.w $B5C, $B8F, $BC5, $BFF, $C3C, $C7C, $125E,	$1284
		dc.w $12AB, $12D3, $12FE, $132D, $135C,	$138F, $13C5, $13FF
		dc.w $143C, $147C, $1A5E, $1A84, $1AAB,	$1AD3, $1AFE, $1B2D
		dc.w $1B5C, $1B8F, $1BC5, $1BFF, $1C3C,	$1C7C, $225E, $2284
		dc.w $22AB, $22D3, $22FE, $232D, $235C,	$238F, $23C5, $23FF
		dc.w $243C, $247C, $2A5E, $2A84, $2AAB,	$2AD3, $2AFE, $2B2D
		dc.w $2B5C, $2B8F, $2BC5, $2BFF, $2C3C,	$2C7C, $325E, $3284
		dc.w $32AB, $32D3, $32FE, $332D, $335C,	$338F, $33C5, $33FF
		dc.w $343C, $347C, $3A5E, $3A84, $3AAB,	$3AD3, $3AFE, $3B2D
		dc.w $3B5C, $3B8F, $3BC5, $3BFF, $3C3C,	$3C7C

; ||||||||||||||| S U B	R O U T	I N E |||||||||||||||||||||||||||||||||||||||


sub_72850:				; XREF: sub_71B4C
		subq.b	#1,$E(a5)
		bne.s	loc_72866
		bclr	#4,(a5)
		jsr	sub_72878(pc)
		jsr	sub_728DC(pc)
		bra.w	loc_7292E
; ===========================================================================

loc_72866:
		jsr	sub_71D9E(pc)
		jsr	sub_72926(pc)
		jsr	sub_71DC6(pc)
		jsr	sub_728E2(pc)
		rts	
; End of function sub_72850


; ||||||||||||||| S U B	R O U T	I N E |||||||||||||||||||||||||||||||||||||||


sub_72878:				; XREF: sub_72850
		bclr	#1,(a5)
		movea.l	4(a5),a4

loc_72880:
		moveq	#0,d5
		move.b	(a4)+,d5
		cmpi.b	#$E0,d5
		bcs.s	loc_72890
		jsr	sub_72A5A(pc)
		bra.s	loc_72880
; ===========================================================================

loc_72890:
		tst.b	d5
		bpl.s	loc_728A4
		jsr	sub_728AC(pc)
		move.b	(a4)+,d5
		tst.b	d5
		bpl.s	loc_728A4
		subq.w	#1,a4
		bra.w	sub_71D60
; ===========================================================================

loc_728A4:
		jsr	sub_71D40(pc)
		bra.w	sub_71D60
; End of function sub_72878


; ||||||||||||||| S U B	R O U T	I N E |||||||||||||||||||||||||||||||||||||||


sub_728AC:				; XREF: sub_72878
		subi.b	#$81,d5
		bcs.s	loc_728CA
		add.b	8(a5),d5
		andi.w	#$7F,d5
		lsl.w	#1,d5
		lea	word_729CE(pc),a0
		move.w	(a0,d5.w),$10(a5)
		bra.w	sub_71D60
; ===========================================================================

loc_728CA:
		bset	#1,(a5)
		move.w	#-1,$10(a5)
		jsr	sub_71D60(pc)
		bra.w	sub_729A0
; End of function sub_728AC


; ||||||||||||||| S U B	R O U T	I N E |||||||||||||||||||||||||||||||||||||||


sub_728DC:				; XREF: sub_72850
		move.w	$10(a5),d6
		bmi.s	loc_72920
; End of function sub_728DC


; ||||||||||||||| S U B	R O U T	I N E |||||||||||||||||||||||||||||||||||||||


sub_728E2:				; XREF: sub_72850
		move.b	$1E(a5),d0
		ext.w	d0
		add.w	d0,d6
		btst	#2,(a5)
		bne.s	locret_7291E
		btst	#1,(a5)
		bne.s	locret_7291E
		move.b	1(a5),d0
		cmpi.b	#$E0,d0
		bne.s	loc_72904
		move.b	#$C0,d0

loc_72904:
		move.w	d6,d1
		andi.b	#$F,d1
		or.b	d1,d0
		lsr.w	#4,d6
		andi.b	#$3F,d6
		move.b	d0,($C00011).l
		move.b	d6,($C00011).l

locret_7291E:
		rts	
; End of function sub_728E2

; ===========================================================================

loc_72920:				; XREF: sub_728DC
		bset	#1,(a5)
		rts	

; ||||||||||||||| S U B	R O U T	I N E |||||||||||||||||||||||||||||||||||||||


sub_72926:				; XREF: sub_72850
		tst.b	$B(a5)
		beq.w	locret_7298A

loc_7292E:				; XREF: sub_72850
		move.b	9(a5),d6
		moveq	#0,d0
		move.b	$B(a5),d0
		beq.s	sub_7296A
		movea.l	(Go_PSGIndex).l,a0
		subq.w	#1,d0
		lsl.w	#2,d0
		movea.l	(a0,d0.w),a0
		move.b	$C(a5),d0
		move.b	(a0,d0.w),d0
		addq.b	#1,$C(a5)
		btst	#7,d0
		beq.s	loc_72960
		cmpi.b	#$80,d0
		beq.s	loc_7299A

loc_72960:
		add.w	d0,d6
		cmpi.b	#$10,d6
		bcs.s	sub_7296A
		moveq	#$F,d6
; End of function sub_72926


; ||||||||||||||| S U B	R O U T	I N E |||||||||||||||||||||||||||||||||||||||


sub_7296A:				; XREF: sub_72504; sub_7267C; sub_72926
		btst	#1,(a5)
		bne.s	locret_7298A
		btst	#2,(a5)
		bne.s	locret_7298A
		btst	#4,(a5)
		bne.s	loc_7298C

loc_7297C:
		or.b	1(a5),d6
		addi.b	#$10,d6
		move.b	d6,($C00011).l

locret_7298A:
		rts	
; ===========================================================================

loc_7298C:
		tst.b	$13(a5)
		beq.s	loc_7297C
		tst.b	$12(a5)
		bne.s	loc_7297C
		rts	
; End of function sub_7296A

; ===========================================================================

loc_7299A:				; XREF: sub_72926
		subq.b	#1,$C(a5)
		rts	

; ||||||||||||||| S U B	R O U T	I N E |||||||||||||||||||||||||||||||||||||||


sub_729A0:				; XREF: sub_71D9E; Sound_ChkValue; Snd_FadeOut1; sub_728AC
		btst	#2,(a5)
		bne.s	locret_729B4

loc_729A6:				; XREF: Snd_FadeOut2
		move.b	1(a5),d0
		ori.b	#$1F,d0
		move.b	d0,($C00011).l

locret_729B4:
		rts	
; End of function sub_729A0


; ||||||||||||||| S U B	R O U T	I N E |||||||||||||||||||||||||||||||||||||||


sub_729B6:				; XREF: loc_71E7C
		lea	($C00011).l,a0
		move.b	#$9F,(a0)
		move.b	#$BF,(a0)
		move.b	#$DF,(a0)
		move.b	#$FF,(a0)
		rts	
; End of function sub_729B6

; ===========================================================================
word_729CE:	dc.w $356, $326, $2F9, $2CE, $2A5, $280, $25C, $23A, $21A
		dc.w $1FB, $1DF, $1C4, $1AB, $193, $17D, $167, $153, $140
		dc.w $12E, $11D, $10D, $FE, $EF, $E2, $D6, $C9,	$BE, $B4
		dc.w $A9, $A0, $97, $8F, $87, $7F, $78,	$71, $6B, $65
		dc.w $5F, $5A, $55, $50, $4B, $47, $43,	$40, $3C, $39
		dc.w $36, $33, $30, $2D, $2B, $28, $26,	$24, $22, $20
		dc.w $1F, $1D, $1B, $1A, $18, $17, $16,	$15, $13, $12
		dc.w $11, 0

; ||||||||||||||| S U B	R O U T	I N E |||||||||||||||||||||||||||||||||||||||


sub_72A5A:				; XREF: sub_71C4E; sub_71CEC; sub_72878
		subi.w	#$E0,d5
		lsl.w	#2,d5
		jmp	loc_72A64(pc,d5.w)
; End of function sub_72A5A

; ===========================================================================

loc_72A64:
		bra.w	loc_72ACC
; ===========================================================================
		bra.w	loc_72AEC
; ===========================================================================
		bra.w	loc_72AF2
; ===========================================================================
		bra.w	loc_72AF8
; ===========================================================================
		bra.w	loc_72B14
; ===========================================================================
		bra.w	loc_72B9E
; ===========================================================================
		bra.w	loc_72BA4
; ===========================================================================
		bra.w	loc_72BAE
; ===========================================================================
		bra.w	loc_72BB4
; ===========================================================================
		bra.w	loc_72BBE
; ===========================================================================
		bra.w	loc_72BC6
; ===========================================================================
		bra.w	loc_72BD0
; ===========================================================================
		bra.w	loc_72BE6
; ===========================================================================
		bra.w	loc_72BEE
; ===========================================================================
		bra.w	loc_72BF4
; ===========================================================================
		bra.w	loc_72C26
; ===========================================================================
		bra.w	loc_72D30
; ===========================================================================
		bra.w	loc_72D52
; ===========================================================================
		bra.w	loc_72D58
; ===========================================================================
		bra.w	loc_72E06
; ===========================================================================
		bra.w	loc_72E20
; ===========================================================================
		bra.w	loc_72E26
; ===========================================================================
		bra.w	loc_72E2C
; ===========================================================================
		bra.w	loc_72E38
; ===========================================================================
		bra.w	loc_72E52
; ===========================================================================
		bra.w	loc_72E64
; ===========================================================================

loc_72ACC:				; XREF: loc_72A64
		move.b	(a4)+,d1
		tst.b	1(a5)
		bmi.s	locret_72AEA
		move.b	$A(a5),d0
		andi.b	#$37,d0
		or.b	d0,d1
		move.b	d1,$A(a5)
		move.b	#$B4,d0
		bra.w	loc_72716
; ===========================================================================

locret_72AEA:
		rts	
; ===========================================================================

loc_72AEC:				; XREF: loc_72A64
		move.b	(a4)+,$1E(a5)
		rts	
; ===========================================================================

loc_72AF2:				; XREF: loc_72A64
		move.b	(a4)+,7(a6)
		rts	
; ===========================================================================

loc_72AF8:				; XREF: loc_72A64
		moveq	#0,d0
		move.b	$D(a5),d0
		movea.l	(a5,d0.w),a4
		move.l	#0,(a5,d0.w)
		addq.w	#2,a4
		addq.b	#4,d0
		move.b	d0,$D(a5)
		rts	
; ===========================================================================

loc_72B14:				; XREF: loc_72A64
		movea.l	a6,a0
		lea	$3A0(a6),a1
		move.w	#$87,d0

loc_72B1E:
		move.l	(a1)+,(a0)+
		dbf	d0,loc_72B1E

		bset	#2,$40(a6)
		movea.l	a5,a3
		move.b	#$28,d6
		sub.b	$26(a6),d6
		moveq	#5,d7
		lea	$70(a6),a5

loc_72B3A:
		btst	#7,(a5)
		beq.s	loc_72B5C
		bset	#1,(a5)
		add.b	d6,9(a5)
		btst	#2,(a5)
		bne.s	loc_72B5C
		moveq	#0,d0
		move.b	$B(a5),d0
		movea.l	$18(a6),a1
		jsr	sub_72C4E(pc)

loc_72B5C:
		adda.w	#$30,a5
		dbf	d7,loc_72B3A

		moveq	#2,d7

loc_72B66:
		btst	#7,(a5)
		beq.s	loc_72B78
		bset	#1,(a5)
		jsr	sub_729A0(pc)
		add.b	d6,9(a5)

loc_72B78:
		adda.w	#$30,a5
		dbf	d7,loc_72B66
		movea.l	a3,a5
		move.b	#$80,$24(a6)
		move.b	#$28,$26(a6)
		clr.b	$27(a6)
		move.w	#0,($A11100).l
		addq.w	#8,sp
		rts	
; ===========================================================================

loc_72B9E:				; XREF: loc_72A64
		move.b	(a4)+,2(a5)
		rts	
; ===========================================================================

loc_72BA4:				; XREF: loc_72A64
		move.b	(a4)+,d0
		add.b	d0,9(a5)
		bra.w	sub_72CB4
; ===========================================================================

loc_72BAE:				; XREF: loc_72A64
		bset	#4,(a5)
		rts	
; ===========================================================================

loc_72BB4:				; XREF: loc_72A64
		move.b	(a4),$12(a5)
		move.b	(a4)+,$13(a5)
		rts	
; ===========================================================================

loc_72BBE:				; XREF: loc_72A64
		move.b	(a4)+,d0
		add.b	d0,8(a5)
		rts	
; ===========================================================================

loc_72BC6:				; XREF: loc_72A64
		move.b	(a4),2(a6)
		move.b	(a4)+,1(a6)
		rts	
; ===========================================================================

loc_72BD0:				; XREF: loc_72A64
		lea	$40(a6),a0
		move.b	(a4)+,d0
		moveq	#$30,d1
		moveq	#9,d2

loc_72BDA:
		move.b	d0,2(a0)
		adda.w	d1,a0
		dbf	d2,loc_72BDA

		rts	
; ===========================================================================

loc_72BE6:				; XREF: loc_72A64
		move.b	(a4)+,d0
		add.b	d0,9(a5)
		rts	
; ===========================================================================

loc_72BEE:				; XREF: loc_72A64
		clr.b	$2C(a6)
		rts	
; ===========================================================================

loc_72BF4:				; XREF: loc_72A64
		bclr	#7,(a5)
		bclr	#4,(a5)
		jsr	sub_726FE(pc)
		tst.b	$250(a6)
		bmi.s	loc_72C22
		movea.l	a5,a3
		lea	$100(a6),a5
		movea.l	$18(a6),a1
		bclr	#2,(a5)
		bset	#1,(a5)
		move.b	$B(a5),d0
		jsr	sub_72C4E(pc)
		movea.l	a3,a5

loc_72C22:
		addq.w	#8,sp
		rts	
; ===========================================================================

loc_72C26:				; XREF: loc_72A64
		moveq	#0,d0
		move.b	(a4)+,d0
		move.b	d0,$B(a5)
		btst	#2,(a5)
		bne.w	locret_72CAA
		movea.l	$18(a6),a1
		tst.b	$E(a6)
		beq.s	sub_72C4E
		movea.l	$20(a5),a1
		tst.b	$E(a6)
		bmi.s	sub_72C4E
		movea.l	$20(a6),a1

; ||||||||||||||| S U B	R O U T	I N E |||||||||||||||||||||||||||||||||||||||


sub_72C4E:				; XREF: Snd_FadeOut1; et al
		subq.w	#1,d0
		bmi.s	loc_72C5C
		move.w	#$19,d1

loc_72C56:
		adda.w	d1,a1
		dbf	d0,loc_72C56

loc_72C5C:
		move.b	(a1)+,d1
		move.b	d1,$1F(a5)
		move.b	d1,d4
		move.b	#$B0,d0
		jsr	sub_72722(pc)
		lea	byte_72D18(pc),a2
		moveq	#$13,d3

loc_72C72:
		move.b	(a2)+,d0
		move.b	(a1)+,d1
		jsr	sub_72722(pc)
		dbf	d3,loc_72C72
		moveq	#3,d5
		andi.w	#7,d4
		move.b	byte_72CAC(pc,d4.w),d4
		move.b	9(a5),d3

loc_72C8C:
		move.b	(a2)+,d0
		move.b	(a1)+,d1
		lsr.b	#1,d4
		bcc.s	loc_72C96
		add.b	d3,d1

loc_72C96:
		jsr	sub_72722(pc)
		dbf	d5,loc_72C8C
		move.b	#$B4,d0
		move.b	$A(a5),d1
		jsr	sub_72722(pc)

locret_72CAA:
		rts	
; End of function sub_72C4E

; ===========================================================================
byte_72CAC:	dc.b 8,	8, 8, 8, $A, $E, $E, $F

; ||||||||||||||| S U B	R O U T	I N E |||||||||||||||||||||||||||||||||||||||


sub_72CB4:				; XREF: sub_72504; sub_7267C; loc_72BA4
		btst	#2,(a5)
		bne.s	locret_72D16
		moveq	#0,d0
		move.b	$B(a5),d0
		movea.l	$18(a6),a1
		tst.b	$E(a6)
		beq.s	loc_72CD8
		movea.l	$20(a6),a1
		tst.b	$E(a6)
		bmi.s	loc_72CD8
		movea.l	$20(a6),a1

loc_72CD8:
		subq.w	#1,d0
		bmi.s	loc_72CE6
		move.w	#$19,d1

loc_72CE0:
		adda.w	d1,a1
		dbf	d0,loc_72CE0

loc_72CE6:
		adda.w	#$15,a1
		lea	byte_72D2C(pc),a2
		move.b	$1F(a5),d0
		andi.w	#7,d0
		move.b	byte_72CAC(pc,d0.w),d4
		move.b	9(a5),d3
		bmi.s	locret_72D16
		moveq	#3,d5

loc_72D02:
		move.b	(a2)+,d0
		move.b	(a1)+,d1
		lsr.b	#1,d4
		bcc.s	loc_72D12
		add.b	d3,d1
		bcs.s	loc_72D12
		jsr	sub_72722(pc)

loc_72D12:
		dbf	d5,loc_72D02

locret_72D16:
		rts	
; End of function sub_72CB4

; ===========================================================================
byte_72D18:	dc.b $30, $38, $34, $3C, $50, $58, $54,	$5C, $60, $68
		dc.b $64, $6C, $70, $78, $74, $7C, $80,	$88, $84, $8C
byte_72D2C:	dc.b $40, $48, $44, $4C
; ===========================================================================

loc_72D30:				; XREF: loc_72A64
		bset	#3,(a5)
		move.l	a4,$14(a5)
		move.b	(a4)+,$18(a5)
		move.b	(a4)+,$19(a5)
		move.b	(a4)+,$1A(a5)
		move.b	(a4)+,d0
		lsr.b	#1,d0
		move.b	d0,$1B(a5)
		clr.w	$1C(a5)
		rts	
; ===========================================================================

loc_72D52:				; XREF: loc_72A64
		bset	#3,(a5)
		rts	
; ===========================================================================

loc_72D58:				; XREF: loc_72A64
		bclr	#7,(a5)
		bclr	#4,(a5)
		tst.b	1(a5)
		bmi.s	loc_72D74
		tst.b	8(a6)
		bmi.w	loc_72E02
		jsr	sub_726FE(pc)
		bra.s	loc_72D78
; ===========================================================================

loc_72D74:
		jsr	sub_729A0(pc)

loc_72D78:
		tst.b	$E(a6)
		bpl.w	loc_72E02
		clr.b	0(a6)
		moveq	#0,d0
		move.b	1(a5),d0
		bmi.s	loc_72DCC
		lea	dword_722CC(pc),a0
		movea.l	a5,a3
		cmpi.b	#4,d0
		bne.s	loc_72DA8
		tst.b	$340(a6)
		bpl.s	loc_72DA8
		lea	$340(a6),a5
		movea.l	$20(a6),a1
		bra.s	loc_72DB8
; ===========================================================================

loc_72DA8:
		subq.b	#2,d0
		lsl.b	#2,d0
		movea.l	(a0,d0.w),a5
		tst.b	(a5)
		bpl.s	loc_72DC8
		movea.l	$18(a6),a1

loc_72DB8:
		bclr	#2,(a5)
		bset	#1,(a5)
		move.b	$B(a5),d0
		jsr	sub_72C4E(pc)

loc_72DC8:
		movea.l	a3,a5
		bra.s	loc_72E02
; ===========================================================================

loc_72DCC:
		lea	$370(a6),a0
		tst.b	(a0)
		bpl.s	loc_72DE0
		cmpi.b	#$E0,d0
		beq.s	loc_72DEA
		cmpi.b	#$C0,d0
		beq.s	loc_72DEA

loc_72DE0:
		lea	dword_722CC(pc),a0
		lsr.b	#3,d0
		movea.l	(a0,d0.w),a0

loc_72DEA:
		bclr	#2,(a0)
		bset	#1,(a0)
		cmpi.b	#$E0,1(a0)
		bne.s	loc_72E02
		move.b	$1F(a0),($C00011).l

loc_72E02:
		addq.w	#8,sp
		rts	
; ===========================================================================

loc_72E06:				; XREF: loc_72A64
		move.b	#$E0,1(a5)
		move.b	(a4)+,$1F(a5)
		btst	#2,(a5)
		bne.s	locret_72E1E
		move.b	-1(a4),($C00011).l

locret_72E1E:
		rts	
; ===========================================================================

loc_72E20:				; XREF: loc_72A64
		bclr	#3,(a5)
		rts	
; ===========================================================================

loc_72E26:				; XREF: loc_72A64
		move.b	(a4)+,$B(a5)
		rts	
; ===========================================================================

loc_72E2C:				; XREF: loc_72A64
		move.b	(a4)+,d0
		lsl.w	#8,d0
		move.b	(a4)+,d0
		adda.w	d0,a4
		subq.w	#1,a4
		rts	
; ===========================================================================

loc_72E38:				; XREF: loc_72A64
		moveq	#0,d0
		move.b	(a4)+,d0
		move.b	(a4)+,d1
		tst.b	$24(a5,d0.w)
		bne.s	loc_72E48
		move.b	d1,$24(a5,d0.w)

loc_72E48:
		subq.b	#1,$24(a5,d0.w)
		bne.s	loc_72E2C
		addq.w	#2,a4
		rts	
; ===========================================================================

loc_72E52:				; XREF: loc_72A64
		moveq	#0,d0
		move.b	$D(a5),d0
		subq.b	#4,d0
		move.l	a4,(a5,d0.w)
		move.b	d0,$D(a5)
		bra.s	loc_72E2C
; ===========================================================================

loc_72E64:				; XREF: loc_72A64
		move.b	#$88,d0
		move.b	#$F,d1
		jsr	sub_7272E(pc)
		move.b	#$8C,d0
		move.b	#$F,d1
		bra.w	sub_7272E
; ===========================================================================
Kos_Z80:	binclude	sound\z80_1.bin
		dc.w ((SegaPCM&$FF)<<8)+((SegaPCM&$FF00)>>8)
		dc.b $21
		dc.w (((EndOfRom-SegaPCM)&$FF)<<8)+(((EndOfRom-SegaPCM)&$FF00)>>8)
		binclude	sound\z80_2.bin
		align 2
Music81:	binclude	sound\music81.bin
		align 2
Music82:	binclude	sound\music82.bin
		align 2
Music83:	binclude	sound\music83.bin
		align 2
Music84:	binclude	sound\music84.bin
		align 2
Music85:	binclude	sound\music85.bin
		align 2
Music86:	binclude	sound\music86.bin
		align 2
Music87:	binclude	sound\music87.bin
		align 2
Music88:	binclude	sound\music88.bin
		align 2
Music89:	binclude	sound\music89.bin
		align 2
Music8A:	binclude	sound\music8A.bin
		align 2
Music8B:	binclude	sound\music8B.bin
		align 2
Music8C:	binclude	sound\music8C.bin
		align 2
Music8D:	binclude	sound\music8D.bin
		align 2
Music8E:	binclude	sound\music8E.bin
		align 2
Music8F:	binclude	sound\music8F.bin
		align 2
Music90:	binclude	sound\music90.bin
		align 2
Music91:	binclude	sound\music91.bin
		align 2
Music92:	binclude	sound\music92.bin
		align 2
Music93:	binclude	sound\music93.bin
		align 2
; ---------------------------------------------------------------------------
; Sound	effect pointers
; ---------------------------------------------------------------------------
SoundIndex:	dc.l SoundA0, SoundA1, SoundA2
		dc.l SoundA3, SoundA4, SoundA5
		dc.l SoundA6, SoundA7, SoundA8
		dc.l SoundA9, SoundAA, SoundAB
		dc.l SoundAC, SoundAD, SoundAE
		dc.l SoundAF, SoundB0, SoundB1
		dc.l SoundB2, SoundB3, SoundB4
		dc.l SoundB5, SoundB6, SoundB7
		dc.l SoundB8, SoundB9, SoundBA
		dc.l SoundBB, SoundBC, SoundBD
		dc.l SoundBE, SoundBF, SoundC0
		dc.l SoundC1, SoundC2, SoundC3
		dc.l SoundC4, SoundC5, SoundC6
		dc.l SoundC7, SoundC8, SoundC9
		dc.l SoundCA, SoundCB, SoundCC
		dc.l SoundCD, SoundCE, SoundCF
SoundD0Index:	dc.l SoundD0
SoundA0:	binclude	sound\soundA0.bin
		align 2
SoundA1:	binclude	sound\soundA1.bin
		align 2
SoundA2:	binclude	sound\soundA2.bin
		align 2
SoundA3:	binclude	sound\soundA3.bin
		align 2
SoundA4:	binclude	sound\soundA4.bin
		align 2
SoundA5:	binclude	sound\soundA5.bin
		align 2
SoundA6:	binclude	sound\soundA6.bin
		align 2
SoundA7:	binclude	sound\soundA7.bin
		align 2
SoundA8:	binclude	sound\soundA8.bin
		align 2
SoundA9:	binclude	sound\soundA9.bin
		align 2
SoundAA:	binclude	sound\soundAA.bin
		align 2
SoundAB:	binclude	sound\soundAB.bin
		align 2
SoundAC:	binclude	sound\soundAC.bin
		align 2
SoundAD:	binclude	sound\soundAD.bin
		align 2
SoundAE:	binclude	sound\soundAE.bin
		align 2
SoundAF:	binclude	sound\soundAF.bin
		align 2
SoundB0:	binclude	sound\soundB0.bin
		align 2
SoundB1:	binclude	sound\soundB1.bin
		align 2
SoundB2:	binclude	sound\soundB2.bin
		align 2
SoundB3:	binclude	sound\soundB3.bin
		align 2
SoundB4:	binclude	sound\soundB4.bin
		align 2
SoundB5:	binclude	sound\soundB5.bin
		align 2
SoundB6:	binclude	sound\soundB6.bin
		align 2
SoundB7:	binclude	sound\soundB7.bin
		align 2
SoundB8:	binclude	sound\soundB8.bin
		align 2
SoundB9:	binclude	sound\soundB9.bin
		align 2
SoundBA:	binclude	sound\soundBA.bin
		align 2
SoundBB:	binclude	sound\soundBB.bin
		align 2
SoundBC:	binclude	sound\soundBC.bin
		align 2
SoundBD:	binclude	sound\soundBD.bin
		align 2
SoundBE:	binclude	sound\soundBE.bin
		align 2
SoundBF:	binclude	sound\soundBF.bin
		align 2
SoundC0:	binclude	sound\soundC0.bin
		align 2
SoundC1:	binclude	sound\soundC1.bin
		align 2
SoundC2:	binclude	sound\soundC2.bin
		align 2
SoundC3:	binclude	sound\soundC3.bin
		align 2
SoundC4:	binclude	sound\soundC4.bin
		align 2
SoundC5:	binclude	sound\soundC5.bin
		align 2
SoundC6:	binclude	sound\soundC6.bin
		align 2
SoundC7:	binclude	sound\soundC7.bin
		align 2
SoundC8:	binclude	sound\soundC8.bin
		align 2
SoundC9:	binclude	sound\soundC9.bin
		align 2
SoundCA:	binclude	sound\soundCA.bin
		align 2
SoundCB:	binclude	sound\soundCB.bin
		align 2
SoundCC:	binclude	sound\soundCC.bin
		align 2
SoundCD:	binclude	sound\soundCD.bin
		align 2
SoundCE:	binclude	sound\soundCE.bin
		align 2
SoundCF:	binclude	sound\soundCF.bin
		align 2
SoundD0:	binclude	sound\soundD0.bin
		align 2
SegaPCM:	binclude	sound\segapcm.bin
		align 2

and replace it completely with:

		align	$8000
DriverData:
		dc.b	$F3,$F3,$ED,$56,$C3,$89,$00,$00
		dc.b	$2A,$15
		dc.b	$00,$06,$00,$09,$08,$7E
		dc.b	$23,$66,$6F,$08,$C9
		zPtrSpec   $1300
		dc.b	$00,$4F,$06,$00,$09,$09,$00,$00,$00
		dc.b	$7E,$23,$66,$6F,$C9,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
		dc.b	$00,$00,$00,$00,$00,$00,$00,$00,$F3,$F5,$FD,$E5,$D9,$ED,$5F,$32
		dc.b	$17,$1C,$CD,$21,$01,$3A,$02,$1C,$B7,$28,$12,$3A,$04,$1C,$B7,$20
		dc.b	$08,$3E,$06,$32,$04,$1C,$C3,$3D,$00,$3D,$32,$04,$1C,$AF,$32,$21
		dc.b	$1C,$3A,$30,$1C,$E6,$7F,$4F,$06,$00,$21,$DC,$00,$09,$7E
Z80_0x006E:
		dc.b	$C3,$4C,$11
		dc.b	$77,$0F,$77,$0F,$77,$0F,$77,$0F,$77,$0F,$77,$0F,$77,$0F,$77
		dc.b	$AF,$77
Z80_0x0082:
		dc.b	$D9,$FD,$E1,$F1,$06,$01,$C9,$31,$00,$20,$0E,$00,$06,$00
		dc.b	$10,$FE,$0D,$28,$F9,$CD,$29,$09,$3E,$80,$3E,$06,$32,$3E,$1C,$AF
		dc.b	$32,$27,$1C,$32,$30,$1C,$32,$3F,$1C,$32,$28,$1C,$3E,$05,$32,$04
		dc.b	$1C,$FB,$C3,$62,$10,$DD,$CB,$01,$7E,$C0,$DD,$CB,$00,$56,$C0,$DD
		dc.b	$86,$01,$DD,$CB,$01,$56,$20,$09,$32,$00,$40,$00,$79,$32,$01,$40
		dc.b	$C9,$D6,$04,$32,$02,$40,$00,$79,$32,$03,$40,$C9
Z80_0x00DC:
Dac_Sample_Selector:
		dc.b	((DacBank0>>$F)),((DacBank0>>$F)),((DacBank0>>$F)),((DacBank0>>$F))
		dc.b	((DacBank0>>$F)),((DacBank0>>$F)),((DacBank0>>$F)),((DacBank0>>$F))
		dc.b	((DacBank0>>$F)),((DacBank0>>$F)),((DacBank0>>$F)),((DacBank0>>$F))
		dc.b	((DacBank0>>$F)),((DacBank0>>$F)),((DacBank0>>$F)),((DacBank0>>$F))
		dc.b	((DacBank0>>$F)),((DacBank0>>$F)),((DacBank0>>$F)),((DacBank0>>$F))
		dc.b	((DacBank0>>$F)),((DacBank0>>$F)),((DacBank0>>$F)),((DacBank0>>$F))
		dc.b	((DacBank0>>$F)),((DacBank0>>$F)),((DacBank0>>$F)),((DacBank1>>$F))
		dc.b	((DacBank1>>$F)),((DacBank1>>$F)),((DacBank1>>$F)),((DacBank1>>$F))
		dc.b	((DacBank1>>$F)),((DacBank1>>$F)),((DacBank1>>$F)),((DacBank1>>$F))
		dc.b	((DacBank1>>$F)),((DacBank1>>$F)),((DacBank1>>$F)),((DacBank1>>$F))
		dc.b	((DacBank1>>$F)),((DacBank1>>$F)),((DacBank1>>$F)),((DacBank2>>$F))
		dc.b	((DacBank2>>$F)),((DacBank2>>$F)),((DacBank2>>$F)),((DacBank2>>$F))
		dc.b	((DacBank2>>$F)),((DacBank2>>$F)),((DacBank2>>$F)),((DacBank2>>$F))	
		dc.b	((DacBank2>>$F)),((DacBank2>>$F)),((DacBank2>>$F)),((DacBank2>>$F))
		dc.b	((DacBank2>>$F)),((DacBank2>>$F)),((DacBank2>>$F)),((DacBank2>>$F))
		dc.b	((DacBank2>>$F)),((DacBank2>>$F)),((DacBank2>>$F)),((DacBank2>>$F))
		dc.b	((DacBank2>>$F)),((DacBank2>>$F)),((DacBank2>>$F)),((DacBank2>>$F))
		dc.b	((DacBank2>>$F))
		dc.b	$CD,$E8,$07,$CD,$A2,$01,$CD,$B1,$09,$CD,$62,$08,$CD,$C6,$08
		dc.b	$3A,$16,$1C,$FE,$29,$20,$18,$3A,$0A,$1C,$FE,$2A,$28,$04,$FE,$32
		dc.b	$38,$04,$AF,$32,$0A,$1C,$AF,$32,$0B,$1C,$32,$0C,$1C,$18,$1F,$3A
		dc.b	$16,$1C,$FE,$FF,$28,$18,$21,$0A,$1C,$5E,$23,$56,$23,$7E,$B2,$B3
		dc.b	$28,$0C,$CD,$C7,$09,$CD,$DF,$04,$CD,$DF,$04,$CD,$DF,$04
Z80_0x016E:
		dc.b	$3A,$3E,$1C
		dc.b	$FE,$00
		dc.b	$C2
		zPtrSpec	Z80DefaultBankSwitch
		dc.b	$CD
		zPtrSpec	Z80BankSwitch0
		dc.b	$18,$03
Z80DefaultBankSwitch:
		dc.b	$CD
		zPtrSpec   Z80BankSwitch
		dc.b	$00,$00,$00,$00,$00
Z80_0x0183:
		dc.b	$AF,$32,$19,$1C,$3A,$16,$1C,$FE,$FF,$CC,$05,$0A,$DD
		dc.b	$21,$40,$1C,$DD,$CB,$00,$7E,$C4,$7A,$0B,$06,$08,$DD,$21,$70,$1C
		dc.b	$18,$1A,$3E,$01,$32,$19,$1C
Z80_0x01A7:
		dc.b	$3E,	((SndBank>>$0F))
		dc.b	$CD
		zPtrSpec   Z80BankSwitch
		dc.b	$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
		dc.b	$DD,$21,$F0,$1D,$06,$07,$C5,$DD,$CB,$00
		dc.b	$7E,$C4,$E6,$01,$11,$30,$00,$DD,$19,$C1,$10,$F0,$3A,$08,$1C,$B7
		dc.b	$C8,$3A,$2F,$1C,$B7,$C2,$E1,$01,$3A,$08,$1C,$32,$2F,$1C,$C3,$27
		dc.b	$01,$3D,$32,$2F,$1C,$C9,$DD,$CB,$01,$7E,$C2,$9C,$0F,$CD,$37,$03
		dc.b	$20,$17,$CD,$74,$02,$DD,$CB,$00,$66,$C0,$CD,$9B,$03,$CD,$6C,$04
		dc.b	$CD,$C6,$03,$CD,$28,$02,$C3,$3F,$03,$DD,$CB,$00,$66,$C0,$CD,$6A
		dc.b	$03,$DD,$7E,$1E,$B7,$28,$06,$DD,$35,$1E,$CA,$58,$03,$CD,$6C,$04
		dc.b	$DD,$CB,$00,$76,$C0,$CD,$C6,$03,$DD,$CB,$00,$56,$C0,$DD,$CB,$00
		dc.b	$46,$C2,$41,$02,$3E,$A4,$4C,$CD,$B5,$00,$3E,$A0,$4D,$CD,$B5,$00
		dc.b	$C9,$DD,$7E,$01,$FE,$02,$20,$EC,$06,$04,$21,$6F,$02,$C5,$7E,$23
		dc.b	$E5,$EB,$4E,$23,$46,$23,$EB,$DD,$6E,$0D,$DD,$66,$0E,$09,$F5,$4C
		dc.b	$CD,$C8,$00,$F1,$D6,$04,$4D,$CD,$C8,$00,$E1,$C1,$10,$DF,$C9,$AD
		dc.b	$AE,$AC,$A6,$C9,$DD,$5E,$03,$DD,$56,$04,$DD,$CB,$00,$8E,$DD,$CB
		dc.b	$00,$A6,$1A,$13,$FE,$E0,$D2,$CF,$0B,$08,$CD,$58,$03,$08,$DD,$CB
		dc.b	$00,$5E,$C2,$E5,$02,$B7,$F2,$05,$03,$D6,$81,$F2,$A3,$02,$CD,$44
		dc.b	$10,$18,$2E,$DD,$86,$05,$21,$88,$0A,$F5,$DF,$F1,$DD,$CB,$01,$7E
		dc.b	$20,$19,$D5,$16,$08,$1E,$0C,$08,$AF,$08,$93,$38,$05,$08,$82,$18
		dc.b	$F8,$08,$83,$21,$30,$0B,$DF,$08,$B4,$67,$D1,$DD,$75,$0D,$DD,$74
		dc.b	$0E,$1A,$B7,$F2,$04,$03,$DD,$7E,$0C,$DD,$77,$0B,$18,$2D,$1A,$13
		dc.b	$DD,$77,$11,$18,$1E,$67,$1A,$13,$6F,$B4,$28,$0C,$DD,$7E,$05,$06
		dc.b	$00,$B7,$F2,$F6,$02,$05,$4F,$09,$DD,$75,$0D,$DD,$74,$0E,$1A,$13
		dc.b	$DD,$77,$11,$1A,$13,$CD,$2D,$03,$DD,$77,$0C,$DD,$73,$03,$DD,$72
		dc.b	$04,$DD,$7E,$0C,$DD,$77,$0B,$DD,$CB,$00,$4E,$C0,$AF,$DD,$77,$25
		dc.b	$DD,$77,$22,$DD,$77,$17,$DD,$7E,$1F,$DD,$77,$1E,$C9,$DD,$46,$02
		dc.b	$05,$C8,$4F,$81,$10,$FD,$C9,$DD,$7E,$0B,$3D,$DD,$77,$0B,$C9,$DD
		dc.b	$7E,$0D,$DD,$B6,$0E,$C8,$DD,$7E,$00,$E6,$06,$C0,$DD,$7E,$01,$F6
		dc.b	$F0,$4F,$3E,$28,$CD,$C8,$00,$C9,$DD,$7E,$00,$E6,$06,$C0,$DD,$4E
		dc.b	$01,$CB,$79,$C0,$3E,$28,$CD,$C8,$00,$C9,$DD,$7E,$18,$B7,$C8,$F8
		dc.b	$3D,$0E,$0A,$CF,$DF,$CD,$12,$10,$DD,$66,$1D,$DD,$6E,$1C,$11,$AE
		dc.b	$04,$06,$04,$DD,$4E,$19,$F5,$CB,$29,$C5,$30,$08,$86,$E6,$7F,$4F
		dc.b	$1A,$CD,$B5,$00,$C1,$13,$23,$F1,$10,$EC,$C9,$DD,$CB,$07,$7E,$C8
		dc.b	$DD,$CB,$00,$4E,$C0,$DD,$5E,$20,$DD,$56,$21,$DD,$E5,$E1,$06,$00
		dc.b	$0E,$24,$09,$EB,$ED,$A0,$ED,$A0,$ED,$A0,$7E,$CB,$3F,$12,$AF,$DD
		dc.b	$77,$22,$DD,$77,$23,$C9,$DD,$7E,$07,$B7,$C8,$FE,$80,$20,$48,$DD
		dc.b	$35,$24,$C0,$DD,$34,$24,$E5,$DD,$6E,$22,$DD,$66,$23,$DD,$5E,$20
		dc.b	$DD,$56,$21,$D5,$FD,$E1,$DD,$35,$25,$20,$17,$FD,$7E,$01,$DD,$77
		dc.b	$25,$DD,$7E,$26,$4F,$E6,$80,$07,$ED,$44,$47,$09,$DD,$75,$22,$DD
		dc.b	$74,$23,$C1,$09,$DD,$35,$27,$C0,$FD,$7E,$03,$DD,$77,$27,$DD,$7E
		dc.b	$26,$ED,$44,$DD,$77,$26,$C9,$3D,$EB,$0E,$08,$CF,$DF,$18,$03,$DD
		dc.b	$77,$25,$E5,$DD,$4E,$25,$06,$00,$09,$7E,$E1,$CB,$7F,$CA,$5D,$04
		dc.b	$FE,$82,$28,$12,$FE,$80,$28,$12,$FE,$84,$28,$11,$26,$FF,$30,$1F
		dc.b	$DD,$CB,$00,$F6,$E1,$C9,$03,$0A,$18,$D5,$AF,$18,$D2,$03,$0A,$DD
		dc.b	$86,$22,$DD,$77,$22,$DD,$34,$25,$DD,$34,$25,$18,$C5,$26,$00,$6F
		dc.b	$DD,$46,$22,$04,$EB,$19,$10,$FD,$DD,$34,$25,$C9,$DD,$66,$0E,$DD
		dc.b	$6E,$0D,$06,$00,$DD,$7E,$10,$B7,$F2,$7D,$04,$06,$FF,$4F,$09,$C9
		dc.b	$2A,$37,$1C,$3A,$19,$1C,$B7,$28,$06,$DD,$6E,$2A,$DD,$66,$2B,$AF
		dc.b	$B0,$C8,$11,$19,$00,$19,$10,$FD,$C9,$B0,$30,$38,$34,$3C,$50,$58
		dc.b	$54,$5C,$60,$68,$64,$6C,$70,$78,$74,$7C,$80,$88,$84,$8C,$40,$48
		dc.b	$44,$4C,$90,$98,$94,$9C,$11,$99,$04,$DD,$4E,$0A,$3E,$B4,$CD,$B5
		dc.b	$00,$CD,$D7,$04,$DD,$77,$1B,$06,$14,$CD,$D7,$04,$10,$FB,$DD,$75
		dc.b	$1C,$DD,$74,$1D,$C3,$9C,$0C,$1A,$13,$4E,$23,$CD,$B5,$00,$C9,$3A
		dc.b	$05,$1C,$32,$09,$1C,$3A,$06,$1C,$32,$05,$1C,$3A,$07,$1C,$32,$06
		dc.b	$1C,$AF,$32,$07,$1C,$3A,$09,$1C,$FE,$FF,$CA,$FB,$09,$FE,$33,$DA
		dc.b	$4A,$05,$FE,$E0,$DA,$99,$06,$FE,$E1,$DA,$29,$09,$FE,$E6,$D2,$29
		dc.b	$09,$D6,$E1,$21,$1C,$05,$DF,$AF,$32,$18,$1C,$E9,$45,$08,$29,$09
		dc.b	$A1,$09,$26,$05,$45,$08,$DD,$21,$F0,$1D,$06,$07,$3E,$01,$32,$19
		dc.b	$1C,$C5,$DD,$CB,$00,$7E,$C4,$45,$05,$11,$30,$00,$DD,$19,$C1,$10
		dc.b	$F0,$CD,$80,$06,$C9,$E5,$E5,$C3,$61,$0C,$D6,$01,$F8,$F5,$FE,$29
		dc.b	$C2,$CD,$05,$3A,$29,$1C,$B7,$CA,$72,$05,$AF,$32,$0A,$1C,$32,$0B
		dc.b	$1C,$32,$0C,$1C,$32,$05,$1C,$32,$06,$1C,$32,$07,$1C,$32,$09,$1C
		dc.b	$F1,$C9,$3A,$16,$1C,$FE,$29,$CA,$D0,$05,$AF,$32,$0A,$1C,$32,$0B
		dc.b	$1C,$32,$0C,$1C,$32,$05,$1C,$32,$06,$1C,$32,$07,$1C,$3A,$3E,$1C
		dc.b	$32,$2D,$1C,$3A,$08,$1C,$32,$2E,$1C,$AF,$32,$08,$1C,$21,$40,$1C
		dc.b	$11,$F0,$1D,$01,$B0,$01,$ED,$B0,$21,$F0,$1D,$11,$30,$00,$06,$09
		dc.b	$7E,$E6,$7F,$CB,$D6,$77,$19,$10,$F7,$3E,$29,$32,$16,$1C,$3A,$24
		dc.b	$1C,$32,$2C,$1C,$2A,$37,$1C,$22,$2A,$1C,$C3,$D0,$05,$CD,$29,$09
		dc.b	$F1,$F5
Z80_0x05D2:
		dc.b	$21,$48,$0B
		dc.b	$85,$6F,$8C,$95,$67,$22,$DE,$05,$3A,$48,$0B
		dc.b	$32,$3E,$1C
Z80_0x05E3:
		dc.b	$CD
		zPtrSpec   Z80BankSwitch
		dc.b	$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
		dc.b	$3E,$B6,$32,$02,$40,$00,$3E,$C0,$32,$03,$40
		dc.b	$F1,$0E,$04,$CF,$DF,$E5,$E5,$E7,$22,$37,$1C,$E1,$FD,$E1,$FD,$7E
		dc.b	$05,$32,$13,$1C,$32,$24,$1C,$11,$06,$00,$19,$22,$33,$1C,$21,$85
		dc.b	$06,$22,$35,$1C,$11,$40,$1C,$FD,$46,$02,$FD,$7E,$04,$C5,$2A,$35
		dc.b	$1C,$ED,$A0,$ED,$A0,$12,$13,$22,$35,$1C,$2A,$33,$1C,$ED,$A0,$ED
		dc.b	$A0,$ED,$A0,$ED,$A0,$22,$33,$1C,$CD,$AE,$07,$C1,$10,$DF,$FD,$7E
		dc.b	$03,$B7,$CA,$80,$06,$47,$21,$93,$06,$22,$35,$1C,$11,$60,$1D,$FD
		dc.b	$7E,$04,$C5,$2A,$35,$1C,$ED,$A0,$ED,$A0,$12,$13,$22,$35,$1C,$2A
		dc.b	$33,$1C,$01,$06,$00,$ED,$B0,$22,$33,$1C,$CD,$B5,$07,$C1,$10,$E2
		dc.b	$AF,$32,$09,$1C,$C9,$80,$06,$80,$00,$80,$01,$80,$02,$80,$04,$80
		dc.b	$05,$80,$06,$80,$80,$80,$A0,$80,$C0,$D6,$33,$B7,$C2,$A7,$06,$3A
		dc.b	$28,$1C,$EE,$01,$32,$28,$1C,$08
Z80_0x06A8:
		dc.b	$3E,	((SndBank>>$0F))
		dc.b	$CD
		zPtrSpec   Z80BankSwitch		
		dc.b	$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
Z80_0x06B7:
		dc.b	$AF,$0E,$06,$32,$19,$1C,$08,$FE,$78
		dc.b	$CA,$F5,$06,$FE,$89,$DA,$EF,$06,$F5,$47,$3A,$25,$1C,$90,$C2,$E4
		dc.b	$06,$3E,$80,$32,$26,$1C,$CF,$F1,$4F,$DF,$23,$23,$23,$7E,$32,$31
		dc.b	$1C,$C3,$80,$06,$AF,$32,$26,$1C,$F1,$32,$25,$1C,$C3,$F5,$06,$F5
		dc.b	$AF,$32,$27,$1C,$F1,$CF,$DF,$E5,$E7,$22,$39,$1C,$AF,$32,$15,$1C
		dc.b	$E1,$E5,$FD,$E1,$FD,$7E,$02,$32,$3B,$1C,$11,$04,$00,$19,$FD,$46
		dc.b	$03,$78,$32,$31,$1C,$C5,$E5,$23,$4E,$CD,$78,$07,$CB,$D6,$DD,$E5
		dc.b	$3A,$19,$1C,$B7,$28,$03,$E1,$FD,$E5,$D1,$E1,$ED,$A0,$1A,$FE,$02
		dc.b	$CC,$5E,$09,$ED,$A0,$3A,$3B,$1C,$12,$13,$ED,$A0,$ED,$A0,$ED,$A0
		dc.b	$ED,$A0,$CD,$AE,$07,$DD,$CB,$00,$7E,$28,$0C,$DD,$7E,$01,$FD,$BE
		dc.b	$01,$20,$04,$FD,$CB,$00,$D6,$E5,$2A,$39,$1C,$3A,$19,$1C,$B7,$28
		dc.b	$04,$FD,$E5,$DD,$E1,$DD,$75,$2A,$DD,$74,$2B,$CD,$58,$03,$CD,$6B
		dc.b	$09,$E1,$C1,$10,$A0,$C3,$80,$06,$CB,$79,$20,$08,$79,$CB,$57,$28
		dc.b	$1A,$3D,$18,$17,$3E,$1F,$CD,$4D,$10,$3E,$FF,$32,$11,$7F,$79,$CB
		dc.b	$3F,$CB,$3F,$CB,$3F,$CB,$3F,$CB,$3F,$C6,$02,$D6,$02,$32,$32,$1C
		dc.b	$F5,$21,$C8,$07,$DF,$E5,$DD,$E1,$F1,$21,$D8,$07,$DF,$C9,$08,$AF
		dc.b	$12,$13,$12,$13,$08,$EB,$36,$30,$23,$36,$C0,$23,$36,$01,$06,$24
		dc.b	$23,$36,$00,$10,$FB,$23,$EB,$C9,$F0,$1D,$20,$1E,$50,$1E,$80,$1E
		dc.b	$B0,$1E,$E0,$1E,$10,$1F,$10,$1F,$D0,$1C,$00,$1D,$30,$1D,$40,$1C
		dc.b	$60,$1D,$90,$1D,$C0,$1D,$C0,$1D,$21,$10,$1C,$7E,$B7,$C8,$FA,$F9
		dc.b	$07,$D1,$3D,$C0,$36,$02,$C3,$72,$09,$AF,$77,$3A,$0D,$1C,$B7,$C2
		dc.b	$29,$09,$DD,$21,$70,$1C,$06,$06,$3A,$11,$1C,$B7,$20,$06,$DD,$CB
		dc.b	$00,$7E,$28,$08,$DD,$4E,$0A,$3E,$B4,$CD,$B5,$00,$11,$30,$00,$DD
		dc.b	$19,$10,$E5,$DD,$21,$40,$1F,$06,$07,$DD,$CB,$00,$7E,$28,$0E,$DD
		dc.b	$CB,$01,$7E,$20,$08,$DD,$4E,$0A,$3E,$B4,$CD,$B5,$00,$11,$30,$00
		dc.b	$DD,$19,$10,$E5,$C9,$3E,$28,$32,$0D,$1C,$3E,$06,$32,$0F,$1C,$32
		dc.b	$0E,$1C,$AF,$32,$40,$1C,$32,$C0,$1D,$32,$60,$1D,$32,$90,$1D,$C3
		dc.b	$A1,$09,$21,$0D,$1C,$7E,$B7,$C8,$FC,$52,$08,$CB,$BE,$3A,$0F,$1C
		dc.b	$3D,$28,$04,$32,$0F,$1C,$C9,$3A,$0E,$1C,$32,$0F,$1C,$3A,$0D,$1C
		dc.b	$3D,$32,$0D,$1C,$CA,$29,$09,$3A,$3E,$1C
Z80_0x088A:
		dc.b	$21,$00,$60
		dc.b	$77,$1F,$77,$1F,$77,$1F,$77,$AF,$16,$01,$72,$77,$77,$77,$77
Z80_0x089C:
		dc.b	$DD,$21,$40,$1C
		dc.b	$06,$06,$DD,$34,$06,$F2,$AD,$08,$DD,$35,$06,$18,$11,$DD,$CB,$00
		dc.b	$7E,$28,$0B,$DD,$CB,$00,$56,$20,$05,$C5,$CD,$9C,$0C,$C1,$11,$30
		dc.b	$00,$DD,$19,$10,$DD,$C9,$3A,$29,$1C,$B7,$C8,$3A,$3E,$1C
Z80_0x08CE:
		dc.b	$CD
		zPtrSpec   Z80BankSwitch
		dc.b	$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
Z80_0x08E0:
		dc.b	$3A,$0E,$1C,$3D,$32,$0E,$1C,$C0,$3A,$0F,$1C,$32,$0E,$1C,$06,$05
		dc.b	$DD,$21,$70,$1C,$11,$30,$00,$DD,$7E,$06,$3D,$DD,$77,$06,$C5,$CD
		dc.b	$9C,$0C,$C1,$DD,$19,$10,$F0,$3A,$29,$1C,$3D,$32,$29,$1C,$C0,$06
		dc.b	$03,$DD,$21,$60,$1D,$11,$30,$00,$DD,$CB,$00,$96,$DD,$19,$10,$F8
		dc.b	$DD,$21,$40,$1C,$DD,$CB,$00,$96,$C9,$21,$0D,$1C,$11,$0E,$1C,$01
		dc.b	$C6,$03,$36,$00,$ED,$B0,$AF,$32,$08,$1C,$DD,$21,$85,$06,$06,$06
		dc.b	$C5,$CD,$DB,$09,$CD,$6B,$09,$DD,$23,$DD,$23,$C1,$10,$F2,$06,$07
		dc.b	$AF,$32,$0D,$1C,$CD,$A1,$09,$0E,$00,$3E,$2B,$CD,$C8,$00,$AF,$32
		dc.b	$12,$1C,$4F,$3E,$27,$CD,$C8,$00,$C3,$80,$06,$3E,$90,$0E,$00,$C3
		dc.b	$EF,$09,$CD,$A1,$09,$C5,$F5,$06,$03,$3E,$B4,$0E,$00,$F5,$CD,$C8
		dc.b	$00,$F1,$3C,$10,$F8,$06,$02,$3E,$B4,$F5,$CD,$D3,$00,$F1,$3C,$10
		dc.b	$F8,$0E,$00,$06,$06,$3E,$28,$F5,$CD,$C8,$00,$0C,$F1,$10,$F8,$F1
		dc.b	$C1,$C5,$06,$04,$3E,$9F,$32,$11,$7F,$C6,$20,$10,$F9,$C1,$C3,$80
		dc.b	$06,$3A,$24,$1C,$21,$13,$1C,$86,$77,$D0,$21,$4B,$1C,$11,$30,$00
		dc.b	$06,$09,$34,$19,$10,$FC,$C9,$21,$0A,$1C,$11,$05,$1C,$ED,$A0,$ED
		dc.b	$A0,$ED,$A0,$AF,$2B,$77,$2B,$77,$2B,$77,$C9,$CD,$EB,$09,$3E,$40
		dc.b	$0E,$7F,$CD,$EF,$09,$DD,$4E,$01,$C3,$64,$03,$3E,$80,$0E,$FF,$06
		dc.b	$04,$F5,$CD,$B5,$00,$F1,$C6,$04,$10,$F7,$C9,$CD,$29,$09,$3E,$01
		dc.b	$32,$3F,$1C,$E1,$C9,$AF,$32,$16,$1C,$3A,$2C,$1C,$32,$24,$1C,$3A
		dc.b	$2E,$1C,$32,$08,$1C,$2A,$2A,$1C,$22,$37,$1C
Z80_0x0A1B:
		dc.b	$3A,$2D,$1C,$32,$3E,$1C
		dc.b	$CD
		zPtrSpec   Z80BankSwitch
		dc.b	$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
Z80_0x0A33:
		dc.b	$21,$F0,$1D,$11,$40,$1C,$01,$B0,$01,$ED,$B0,$3A,$40
		dc.b	$1C,$F6,$84,$32,$40,$1C,$DD,$21,$70,$1C,$06,$08,$DD,$7E,$00,$F6
		dc.b	$84,$DD,$77,$00,$DD,$CB,$01,$7E,$C2,$73,$0A,$DD,$CB,$00,$96,$DD
		dc.b	$7E,$06,$C6,$40,$DD,$77,$06,$DD,$7E,$08,$C5,$47,$CD,$80,$04,$CD
		dc.b	$B6,$04,$C1,$11,$30,$00,$DD,$19,$10,$D2,$3E,$40,$32,$29,$1C,$3E
		dc.b	$02,$32,$0F,$1C,$32,$0E,$1C,$C9,$FF,$03,$FF,$03,$FF,$03,$FF,$03
		dc.b	$FF,$03,$FF,$03,$FF,$03,$FF,$03,$FF,$03,$F7,$03,$BE,$03,$88,$03
		dc.b	$56,$03,$26,$03,$F9,$02,$CE,$02,$A5,$02,$80,$02,$5C,$02,$3A,$02
		dc.b	$1A,$02,$FB,$01,$DF,$01,$C4,$01,$AB,$01,$93,$01,$7D,$01,$67,$01
		dc.b	$53,$01,$40,$01,$2E,$01,$1D,$01,$0D,$01,$FE,$00,$EF,$00,$E2,$00
		dc.b	$D6,$00,$C9,$00,$BE,$00,$B4,$00,$A9,$00,$A0,$00,$97,$00,$8F,$00
		dc.b	$87,$00,$7F,$00,$78,$00,$71,$00,$6B,$00,$65,$00,$5F,$00,$5A,$00
		dc.b	$55,$00,$50,$00,$4B,$00,$47,$00,$43,$00,$40,$00,$3C,$00,$39,$00
		dc.b	$36,$00,$33,$00,$30,$00,$2D,$00,$2B,$00,$28,$00,$26,$00,$24,$00
		dc.b	$22,$00,$20,$00,$1F,$00,$1D,$00,$1B,$00,$1A,$00,$18,$00,$17,$00
		dc.b	$16,$00,$15,$00,$13,$00,$12,$00,$11,$00,$10,$00,$00,$00,$00,$00
		dc.b	$84,$02,$AB,$02,$D3,$02,$FE,$02,$2D,$03,$5C,$03,$8F,$03,$C5,$03
		dc.b	$FF,$03,$3C,$04,$7C,$04,$C0,$04
BankSelector:
		dc.b	((Bank1>>$0F)),((Bank1>>$0F)),((Bank1>>$0F)),((Bank1>>$0F))
		dc.b	((Bank1>>$0F)),((Bank1>>$0F)),((Bank1>>$0F)),((Bank1>>$0F))
		dc.b	((Bank1>>$0F)),((Bank1>>$0F)),((Bank2>>$0F)),((Bank2>>$0F))
		dc.b	((Bank2>>$0F)),((Bank2>>$0F)),((Bank2>>$0F)),((Bank2>>$0F))
		dc.b	((Bank2>>$0F)),((Bank2>>$0F)),((Bank2>>$0F)),((Bank2>>$0F))
		dc.b	((Bank2>>$0F)),((Bank2>>$0F)),((Bank2>>$0F)),((Bank2>>$0F))
		dc.b	((Bank2>>$0F)),((Bank1>>$0F)),((Bank2>>$0F)),((Bank2>>$0F))
		dc.b	((Bank3>>$0F)),((Bank3>>$0F)),((Bank3>>$0F)),((Bank3>>$0F))
		dc.b	((Bank3>>$0F)),((Bank3>>$0F)),((Bank3>>$0F)),((Bank3>>$0F))
		dc.b	((Bank3>>$0F)),((Bank3>>$0F)),((Bank3>>$0F)),((Bank3>>$0F))
		dc.b	((Bank2>>$0F)),((Bank3>>$0F)),((Bank3>>$0F)),((Bank3>>$0F))	
		dc.b	((Bank3>>$0F)),((Bank0>>$0F)),((Bank2>>$0F)),((Bank0>>$0F))
		dc.b	((Bank3>>$0F)),((Bank3>>$0F))
		dc.b	$CD,$37,$03,$C0,$DD,$5E
		dc.b	$03,$DD,$56,$04,$1A,$13,$FE,$E0,$D2,$C5,$0B,$B7,$FA,$93,$0B,$1B
		dc.b	$DD,$7E,$0D,$DD,$77,$0D,$FE,$80,$CA,$B5,$0B,$CB,$BF,$D5,$08,$CD
		dc.b	$58,$03,$CD,$5E,$09,$08,$DD,$21,$40,$1C,$DD,$CB,$00,$56,$C2,$B4
		dc.b	$0B,$32,$30,$1C,$D1,$1A,$13,$B7,$F2,$05,$03,$1B,$DD,$7E,$0C,$DD
		dc.b	$77,$0B,$C3,$0B,$03,$21,$CB,$0B,$C3,$D2,$0B,$13,$C3,$84,$0B,$21
		dc.b	$DB,$0B,$E5,$D6,$E0,$21,$DF,$0B,$DF,$1A,$E9,$13,$C3,$82,$02,$33
		dc.b	$0C,$59,$0C,$5D,$0C,$61,$0C,$67,$0C,$83,$0C,$85,$0C,$BD,$0C,$C3
		dc.b	$0C,$47,$0C,$2F,$0C,$CD,$0C,$E3,$0C,$FD,$0C,$03,$0D,$10,$0D,$4F
		dc.b	$0D,$5D,$0D,$69,$0D,$11,$0E,$65,$0D,$30,$0E,$39,$0E,$3F,$0E,$56
		dc.b	$0E,$70,$0E,$83,$0E,$89,$0E,$90,$0E,$B2,$0E,$C0,$0E,$07,$0F,$0E
		dc.b	$0F,$12,$0F,$1A,$0F,$55,$0F,$63,$0F,$72,$0F,$8D,$0F,$96,$0F,$32
		dc.b	$30,$1C,$C9,$0E,$3F,$DD,$7E,$0A,$A1,$D5,$EB,$B6,$DD,$77,$0A,$4F
		dc.b	$3E,$B4,$CD,$B5,$00,$D1,$C9,$21,$27,$1C,$7E,$DD,$86,$05,$DD,$77
		dc.b	$05,$FE,$10,$CA,$57,$0C,$34,$1B,$C9,$DD,$77,$10,$C9,$32,$16,$1C
		dc.b	$C9,$CD,$DB,$09,$C3,$69,$0D,$DD,$CB,$01,$7E,$28,$0D,$CB,$3F,$CB
		dc.b	$3F,$CB,$3F,$EE,$0F,$E6,$0F,$C3,$F9,$0C,$EE,$7F,$E6,$7F,$DD,$77
		dc.b	$06,$18,$19,$13,$1A,$DD,$CB,$01,$7E,$C0,$DD,$86,$06,$F2,$99,$0C
		dc.b	$EA,$97,$0C,$AF,$C3,$99,$0C,$3E,$7F,$DD,$77,$06,$D5,$11,$AE,$04
		dc.b	$DD,$6E,$1C,$DD,$66,$1D,$06,$04,$7E,$B7,$F2,$B0,$0C,$DD,$86,$06
		dc.b	$E6,$7F,$4F,$1A,$CD,$B5,$00,$13,$23,$10,$ED,$D1,$C9,$DD,$CB,$00
		dc.b	$CE,$1B,$C9,$CD,$2D,$03,$DD,$77,$1E,$DD,$77,$1F,$C9,$13,$C6,$28
		dc.b	$4F,$06,$00,$DD,$E5,$E1,$09,$7E,$3D,$CA,$DE,$0C,$13,$C9,$AF,$77
		dc.b	$C3,$39,$0E,$DD,$CB,$01,$7E,$C8,$DD,$CB,$00,$A6,$DD,$35,$17,$DD
		dc.b	$86,$06,$FE,$0F,$DA,$F9,$0C,$3E,$0F,$DD,$77,$06,$C9,$D6,$40,$DD
		dc.b	$77,$05,$C9,$CD,$0A,$0D,$CD,$C8,$00,$C9,$EB,$7E,$23,$4E,$EB,$C9
		dc.b	$DD,$CB,$01,$7E,$20,$30,$CD,$EB,$09,$1A,$DD,$77,$08,$B7,$F2,$3C
		dc.b	$0D,$13,$1A,$DD,$77,$0F,$D5,$DD,$7E,$0F,$D6,$81,$0E,$04,$CF,$DF
		dc.b	$E7,$DD,$7E,$08,$E6,$7F,$47,$CD,$8F,$04,$18,$05,$D5,$47,$CD,$80
		dc.b	$04,$CD,$B6,$04,$D1,$C9,$B7,$F2,$35,$0E,$13,$C3,$35,$0E,$C9,$DD
		dc.b	$73,$20,$DD,$72,$21,$DD,$36,$07,$80,$13,$13,$13,$C9,$13,$DD,$CB
		dc.b	$01,$7E,$20,$01,$1A,$DD,$77,$07,$C9,$DD,$CB,$00,$BE,$3E,$1F,$32
		dc.b	$15,$1C,$CD,$58,$03,$DD,$4E,$01,$DD,$E5,$CD,$78,$07,$3A,$19,$1C
		dc.b	$B7,$28,$77,$AF,$32,$18,$1C,$E5,$2A,$37,$1C,$DD,$E1,$DD,$CB,$00
		dc.b	$96,$DD,$CB,$01,$7E,$20,$68,$DD,$CB,$00,$7E,$28,$5D,$3E,$02,$DD
		dc.b	$BE,$01,$20,$0D,$3E,$4F,$DD,$CB,$00,$46,$20,$02,$E6,$0F,$CD,$E9
		dc.b	$0E,$DD,$7E,$08,$B7,$F2,$BD,$0D,$CD,$26,$0D,$18,$3A,$47,$E5
Z80_0x0DBF:
		dc.b	$3A,$3E,$1C
		dc.b	$CD
		zPtrSpec   Z80BankSwitch		
		dc.b	$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
Z80_0x0DD4:
		dc.b	$E1,$CD,$8F,$04,$CD,$B6,$04
Z80_0x0DDB:
		dc.b	$3E,((SndBank>>$0F))
		dc.b	$CD
		zPtrSpec   Z80BankSwitch		
		dc.b	$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
		dc.b	$DD,$7E,$18,$B7,$F2,$FA
		dc.b	$0D,$DD,$5E,$19,$DD,$56,$1A,$CD,$7C,$0F,$DD,$E1,$E1,$E1,$C9,$DD
		dc.b	$CB,$00,$46,$28,$F5,$DD,$7E,$1A,$B7,$F2,$0F,$0E,$32,$11,$7F,$18
		dc.b	$E9,$DD,$CB,$01,$56,$C0,$3E,$DF,$32,$11,$7F,$1A,$DD,$77,$1A,$DD
		dc.b	$CB,$00,$C6,$B7,$20,$06,$DD,$CB,$00,$86,$3E,$FF,$32,$11,$7F,$C9
		dc.b	$DD,$CB,$01,$7E,$C8,$DD,$77,$08,$C9,$EB,$5E,$23,$56,$1B,$C9,$13
		dc.b	$C6,$28,$4F,$06,$00,$DD,$E5,$E1,$09,$7E,$B7,$20,$02,$1A,$77,$13
		dc.b	$35,$C2,$39,$0E,$13,$C9,$4F,$13,$1A,$47,$C5,$DD,$E5,$E1,$DD,$35
		dc.b	$09,$DD,$4E,$09,$DD,$35,$09,$06,$00,$09,$72,$2B,$73,$D1,$1B,$C9
		dc.b	$DD,$E5,$E1,$DD,$4E,$09,$06,$00,$09,$5E,$23,$56,$DD,$34,$09,$DD
		dc.b	$34,$09,$C9,$DD,$CB,$07,$BE,$1B,$C9,$DD,$86,$05,$DD,$77,$05,$C9
		dc.b	$3A,$26,$1C,$FE,$80,$CA,$A1,$0E,$AF,$32,$25,$1C,$32,$26,$1C,$13
		dc.b	$C9,$3A,$31,$1C,$3D,$32,$31,$1C,$C2,$39,$0E,$AF,$32,$26,$1C,$C3
		dc.b	$39,$0E,$FE,$01,$20,$05,$DD,$CB,$00,$DE,$C9,$DD,$CB,$00,$9E,$C9
		dc.b	$DD,$7E,$01,$FE,$02,$20,$2C,$DD,$CB,$00,$C6,$EB,$CD,$73,$02,$06
		dc.b	$04,$C5,$7E,$23,$E5,$21,$F7,$0E,$87,$4F,$06,$00,$09,$ED,$A0,$ED
		dc.b	$A0,$E1,$C1,$10,$EC,$EB,$1B,$3E,$4F,$32,$12,$1C,$4F,$3E,$27,$CD
		dc.b	$C8,$00,$C9,$13,$13,$13,$C9,$00,$00,$32,$01,$8E,$01,$E4,$01,$34
		dc.b	$02,$7E,$02,$C2,$02,$F0,$02,$21,$1F,$0C,$DF,$13,$1A,$E9,$32,$24
		dc.b	$1C,$C9,$DD,$E5,$CD,$F8,$04,$DD,$E1,$C9,$32,$11,$1C,$B7,$28,$1D
		dc.b	$DD,$E5,$D5,$DD,$21,$40,$1C,$06,$09,$11,$30,$00,$DD,$CB,$00,$BE
		dc.b	$CD,$5E,$03,$DD,$19,$10,$F5,$D1,$DD,$E1,$C3,$A1,$09,$DD,$E5,$D5
		dc.b	$DD,$21,$40,$1C,$06,$09,$11,$30,$00,$DD,$CB,$00,$FE,$DD,$19,$10
		dc.b	$F8,$D1,$DD,$E1,$C9,$EB,$5E,$23,$56,$23,$4E,$06,$00,$23,$EB,$ED
		dc.b	$B0,$1B,$C9,$06,$09,$21,$42,$1C,$C5,$01,$30,$00,$77,$09,$C1,$10
		dc.b	$F7,$C9,$DD,$36,$18,$80,$DD,$73,$19,$DD,$72,$1A,$21,$B2,$04,$06
		dc.b	$04,$1A,$13,$4F,$7E,$23,$CD,$B5,$00,$10,$F6,$1B,$C9,$DD,$77,$18
		dc.b	$13,$1A,$DD,$77,$19,$C9,$AF,$32,$27,$1C,$1B,$C9,$CD,$37,$03,$20
		dc.b	$0D,$CD,$74,$02,$DD,$CB,$00,$66,$C0,$CD,$9B,$03,$18,$0C,$DD,$7E
		dc.b	$1E,$B7,$28,$06,$DD,$35,$1E,$CA,$44,$10,$CD,$6C,$04,$CD,$C6,$03
		dc.b	$DD,$CB,$00,$56,$C0,$DD,$4E,$01,$7D,$E6,$0F,$B1,$32,$11,$7F,$7D
		dc.b	$E6,$F0,$B4,$0F,$0F,$0F,$0F,$32,$11,$7F,$DD,$7E,$08,$B7,$0E,$00
		dc.b	$28,$09,$3D,$0E,$0A,$CF,$DF,$CD,$12,$10,$4F,$DD,$CB,$00,$66,$C0
		dc.b	$DD,$7E,$06,$81,$CB,$67,$28,$02,$3E,$0F,$DD,$B6,$01,$C6,$10,$DD
		dc.b	$CB,$00,$46,$20,$04,$32,$11,$7F,$C9,$C6,$20,$32,$11,$7F,$C9,$DD
		dc.b	$77,$17,$E5,$DD,$4E,$17,$06,$00,$09,$7E,$E1,$CB,$7F,$28,$21,$FE
		dc.b	$83,$28,$0C,$FE,$81,$28,$13,$FE,$80,$28,$0C,$03,$0A,$18,$E0,$DD
		dc.b	$CB,$00,$E6,$E1,$C3,$44,$10,$AF,$18,$D5,$E1,$DD,$CB,$00,$E6,$C9
		dc.b	$DD,$34,$17,$C9,$DD,$CB,$00,$E6,$DD,$CB,$00,$56,$C0,$3E,$1F,$DD
		dc.b	$86,$01,$B7,$F0,$32,$11,$7F,$DD,$CB,$00,$46,$C8,$3E,$FF,$32,$11
		dc.b	$7F,$C9,$F3,$3E,$2B,$0E,$00,$CD,$C8,$00,$FB,$3A,$3F,$1C,$B7,$C2
		dc.b	$FE,$10,$3A,$30,$1C,$B7,$28,$F2,$3E,$2B,$0E,$80,$F3,$CD,$C8,$00
		dc.b	$FB,$FD,$21,$EE,$10,$21,$30,$1C,$7E,$3D,$CB,$FE,$21,$00,$80,$DF
		dc.b	$0E,$80,$7E,$32,$A3,$10,$32,$C0,$10,$23,$5E,$23,$56,$23,$7E,$23
		dc.b	$66,$6F,$06,$0A,$FB,$10,$FE,$F3,$3E,$2A,$32,$00,$40,$7E,$07,$07
		dc.b	$07,$07,$E6,$0F,$32,$BA,$10,$79,$FD,$86,$00,$32,$01,$40,$4F,$06
		dc.b	$0A,$FB,$10,$FE,$F3,$3E,$2A,$32,$00,$40,$7E,$E6,$0F,$32,$D3,$10
		dc.b	$79,$FD,$86,$00,$32,$01,$40,$FB,$4F,$3A,$30,$1C,$B7,$F2,$6A,$10
		dc.b	$23,$1B,$7A,$B3,$C2,$A2,$10,$AF,$32,$30,$1C,$C3,$62,$10,$00,$01
		dc.b	$02,$04,$08,$10,$20,$40,$80,$FF,$FE,$FC,$F8,$F0,$E0,$C0,$F3,$CD
		dc.b	$C7,$09,$3E,$2B,$32,$00,$40,$00,$3E,$80,$32,$01,$40
Z80_0x110D:
		dc.b	$3E,((SegaPCMBank>>$0F))	
		dc.b	$CD
		zPtrSpec   Z80BankSwitch	
		dc.b	$00,$00,$00,$00,$00,$00,$00,$00,$00
		dc.b	$21
		z68kPtr   SegaSnd
		dc.b	$11,$2F,$5E
		dc.b	$3E,$2A,$32,$00,$40,$00,$7E,$32,$01,$40,$3A,$0A,$1C,$FE,$FE
		dc.b	$28,$0C,$00,$00,$06,$0C,$10,$FE,$23,$1B,$7A,$B3,$20,$E9,$AF,$32
		dc.b	$3F,$1C,$21,$0D,$1C,$CD,$D3,$09,$C3,$62,$10,$FF
Z80_0x114C:
		dc.b	$21,$00,$60
		dc.b	$77,$0F,$77,$0F,$77,$0F,$77,$0F,$77,$0F,$77,$0F,$77,$0F,$77
		dc.b	$AF,$77
		dc.b	$C3,$82,$00
Z80BankSwitch0:
Z80_0x1170:
		dc.b	$21,$00,$60
		dc.b	$77
		dc.b	$1F
		dc.b	$77
		dc.b	$1F
		dc.b	$77
		dc.b	$1F
		dc.b	$77
		dc.b	$AF
		dc.b	$16,$01
		dc.b	$72
		dc.b	$77
		dc.b	$77
		dc.b	$77
		dc.b	$77
		dc.b	$C9
Z80BankSwitch:
		dc.b	$21,	$00,	$60
		dc.b	$77
		dc.b	$1F
		dc.b	$77
		dc.b	$1F
		dc.b	$77
		dc.b	$1F
		dc.b	$77
		dc.b	$1F
		dc.b	$77
		dc.b	$1F
		dc.b	$77
		dc.b	$1F
		dc.b	$77
		dc.b	$1F
		dc.b	$77
		dc.b	$1F
		dc.b	$77
		dc.b	$C9
DriverDataEnd:
;-------------------------------------------------------------------------------	
;	Filler	to	align	pointers	at	1300h	in	Z80	Ram
		dc.b	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
		dc.b	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
		dc.b	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
		dc.b	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
		dc.b	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
		dc.b	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
		dc.b	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
		dc.b	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
		dc.b	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
		dc.b	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
		dc.b	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
		dc.b	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
		dc.b	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
		dc.b	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
		dc.b	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
		dc.b	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
		dc.b	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
		dc.b	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
		dc.b	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
		dc.b	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
		dc.b	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
		dc.b	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
		dc.b	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
		dc.b	0,0,0,0,0
DriverPointers:
		zPtrSpec	MusicPointers
		zPtrSpec	UniversalVoiceBank
		zPtrSpec	MusicPointers
		zPtrSpec	SndPointers
		zPtrSpec	PSGNoisePointers
		zPtrSpec	PSGTonePointers
		dc.w	$3300

;credit goes to Varion Icaria for finding this index
PSGNoisePointers:
		zPtrSpec	PSGN_0
		zPtrSpec	PSGN_1
		zPtrSpec	PSGN_2
		zPtrSpec	PSGN_3
		zPtrSpec	PSGN_4
		zPtrSpec	PSGN_5
		zPtrSpec	PSGN_6
		zPtrSpec	PSGN_7

PSGN_1: incbin sound/PSGN1.bin
PSGN_0: incbin sound/PSGN0.bin
PSGN_2: incbin sound/PSGN2.bin
PSGN_3: incbin sound/PSGN3.bin
PSGN_4: incbin sound/PSGN4.bin
PSGN_5: incbin sound/PSGN5.bin
PSGN_6: incbin sound/PSGN6.bin
PSGN_7: incbin sound/PSGN7.bin

;credit goes to Varion Icaria for finding this index
PSGTonePointers:
		zPtrSpec	PSGT_00
		zPtrSpec	PSGT_01
		zPtrSpec	PSGT_02
		zPtrSpec	PSGT_03
		zPtrSpec	PSGT_04
		zPtrSpec	PSGT_05
		zPtrSpec	PSGT_06
		zPtrSpec	PSGT_07
		zPtrSpec	PSGT_08
		zPtrSpec	PSGT_09
		zPtrSpec	PSGT_0A
		zPtrSpec	PSGT_0B
		zPtrSpec	PSGT_0C
		zPtrSpec	PSGT_0D
		zPtrSpec	PSGT_0E
		zPtrSpec	PSGT_0F
		zPtrSpec	PSGT_10
		zPtrSpec	PSGT_11
		zPtrSpec	PSGT_12
		zPtrSpec	PSGT_13
		zPtrSpec	PSGT_14
		zPtrSpec	PSGT_15
		zPtrSpec	PSGT_16
		zPtrSpec	PSGT_17
		zPtrSpec	PSGT_18
		zPtrSpec	PSGT_19
		zPtrSpec	PSGT_1A
		zPtrSpec	PSGT_1B
		zPtrSpec	PSGT_1C
		zPtrSpec	PSGT_1D
		zPtrSpec	PSGT_1E
		zPtrSpec	PSGT_1F
		zPtrSpec	PSGT_20
		zPtrSpec	PSGT_21
		zPtrSpec	PSGT_22
		zPtrSpec	PSGT_23
		zPtrSpec	PSGT_24
		zPtrSpec	PSGT_25
		zPtrSpec	PSGT_26

PSGT_00: incbin sound/PSGT00.bin
PSGT_01: incbin sound/PSGT01.bin
PSGT_02: incbin sound/PSGT02.bin
PSGT_03: incbin sound/PSGT03.bin
PSGT_04: incbin sound/PSGT04.bin
PSGT_05: incbin sound/PSGT05.bin
PSGT_06: incbin sound/PSGT06.bin
PSGT_07: incbin sound/PSGT07.bin
PSGT_08: incbin sound/PSGT08.bin
PSGT_09: incbin sound/PSGT09.bin
PSGT_0A: incbin sound/PSGT0A.bin
PSGT_0B: incbin sound/PSGT0B.bin
PSGT_0C: incbin sound/PSGT0C.bin
PSGT_0D: incbin sound/PSGT0D.bin
PSGT_0E: incbin sound/PSGT0E.bin
PSGT_0F: incbin sound/PSGT0F.bin
PSGT_10: incbin sound/PSGT10.bin
PSGT_11: incbin sound/PSGT11.bin
PSGT_12: incbin sound/PSGT12.bin
PSGT_13: incbin sound/PSGT13.bin
PSGT_14: incbin sound/PSGT14.bin
PSGT_15: incbin sound/PSGT15.bin
PSGT_16: incbin sound/PSGT16.bin
PSGT_17: incbin sound/PSGT17.bin
PSGT_18: incbin sound/PSGT18.bin
PSGT_19: incbin sound/PSGT19.bin
PSGT_1A: incbin sound/PSGT1A.bin
PSGT_1B: incbin sound/PSGT1B.bin
PSGT_1C: incbin sound/PSGT1C.bin
PSGT_1D: incbin sound/PSGT1D.bin
PSGT_1E: incbin sound/PSGT1E.bin
PSGT_1F: incbin sound/PSGT1F.bin
PSGT_20: incbin sound/PSGT20.bin
PSGT_21: incbin sound/PSGT21.bin
PSGT_22: incbin sound/PSGT22.bin
PSGT_23: incbin sound/PSGT23.bin
PSGT_24: incbin sound/PSGT24.bin
PSGT_25: incbin sound/PSGT25.bin
PSGT_26: incbin sound/PSGT26.bin

MusicPointers:	
		z68kPtr	Angel_Island_1_Snd
		z68kPtr	Angel_Island_2_Snd
		z68kPtr	Hydrocity_1_Snd
		z68kPtr	Hydrocity_2_Snd
		z68kPtr	Marble_Garden_1_Snd
		z68kPtr	Marble_Garden_2_Snd
		z68kPtr	Carnival_Night_1_Snd
		z68kPtr	Carnival_Night_2_Snd
		z68kPtr	Flying_Battery_1_Snd
		z68kPtr	Flying_Battery_2_Snd
		z68kPtr	Icecap_1_Snd
		z68kPtr	Icecap_2_Snd
		z68kPtr	Launch_Base_1_Snd
		z68kPtr	Launch_Base_2_Snd
		z68kPtr	Mushroom_Hill_1_Snd
		z68kPtr	Mushroom_Hill_2_Snd
		z68kPtr	Sandopolis_1_Snd
		z68kPtr	Sandopolis_2_Snd
		z68kPtr	Lava_Reef_1_Snd
		z68kPtr	Lava_Reef_2_Snd
		z68kPtr	Sky_Sanctuary_Snd
		z68kPtr	Death_Egg_1_Snd
		z68kPtr	Death_Egg_2_Snd
		z68kPtr	Mini_Boss_SK_Snd
		z68kPtr	Boss_Snd
		z68kPtr	The_Doomsday_Snd
		z68kPtr	Glowing_Spheres_Bonus_Stage_snd
		z68kPtr	Special_Stage_Snd
		z68kPtr	Slot_Machine_Bonus_Stage_snd
		z68kPtr	Gum_Ball_Machine_Bonus_Stage_snd
		z68kPtr	Knuckles_Theme_Snd
		z68kPtr	Azure_Lake_Snd
		z68kPtr	Balloon_Park_Snd
		z68kPtr	Desert_Palace_Snd
		z68kPtr	Chrome_Gadget_Snd
		z68kPtr	Endless_Mine_Snd
		z68kPtr	Title_Screen_Snd
		z68kPtr	Credits_Snd
		z68kPtr	Time_Game_Over_Snd
		z68kPtr	Continue_Snd
		z68kPtr	Level_Results_Snd
		z68kPtr	Extra_Life_Snd
		z68kPtr	Emerald_Snd
		z68kPtr	Invincibility_Snd
		z68kPtr	Competition_Menu_Snd
		z68kPtr	Mini_Boss_Snd
		z68kPtr	Menu_Snd
		z68kPtr	Final_Boss_Snd
		z68kPtr	Underwater_Timming_Snd
		z68kPtr	Presented_by_SEGA_Snd

SndPointers:
		z68kPtr	Sfx_34_Snd
		z68kPtr	Sfx_35_Snd
		z68kPtr	Sfx_36_Snd
		z68kPtr	Sfx_37_Snd
		z68kPtr	Sfx_38_Snd
		z68kPtr	Sfx_39_Snd
		z68kPtr	Sfx_3A_Snd
		z68kPtr	Sfx_3B_Snd
		z68kPtr	Sfx_3C_Snd
		z68kPtr	Sfx_3D_Snd
		z68kPtr	Sfx_3E_Snd
		z68kPtr	Sfx_3F_Snd
		z68kPtr	Sfx_40_Snd
		z68kPtr	Sfx_41_Snd
		z68kPtr	Sfx_42_Snd
		z68kPtr	Sfx_43_Snd
		z68kPtr	Sfx_44_Snd
		z68kPtr	Sfx_45_Snd
		z68kPtr	Sfx_46_Snd
		z68kPtr	Sfx_47_Snd
		z68kPtr	Sfx_48_Snd
		z68kPtr	Sfx_49_Snd
		z68kPtr	Sfx_4A_Snd
		z68kPtr	Sfx_4B_Snd
		z68kPtr	Sfx_4C_Snd
		z68kPtr	Sfx_4D_Snd
		z68kPtr	Sfx_4E_Snd
		z68kPtr	Sfx_4F_Snd
		z68kPtr	Sfx_50_Snd
		z68kPtr	Sfx_51_Snd
		z68kPtr	Sfx_52_Snd
		z68kPtr	Sfx_53_Snd
		z68kPtr	Sfx_54_Snd
		z68kPtr	Sfx_55_Snd
		z68kPtr	Sfx_56_Snd
		z68kPtr	Sfx_57_Snd
		z68kPtr	Sfx_58_Snd
		z68kPtr	Sfx_59_Snd
		z68kPtr	Sfx_5A_Snd
		z68kPtr	Sfx_5B_Snd
		z68kPtr	Sfx_5C_Snd
		z68kPtr	Sfx_5D_Snd
		z68kPtr	Sfx_5E_Snd
		z68kPtr	Sfx_5F_Snd
		z68kPtr	Sfx_60_Snd
		z68kPtr	Sfx_61_Snd
		z68kPtr	Sfx_62_Snd
		z68kPtr	Sfx_63_Snd
		z68kPtr	Sfx_64_Snd
		z68kPtr	Sfx_65_Snd
		z68kPtr	Sfx_66_Snd
		z68kPtr	Sfx_67_Snd
		z68kPtr	Sfx_68_Snd
		z68kPtr	Sfx_69_Snd
		z68kPtr	Sfx_6A_Snd
		z68kPtr	Sfx_6B_Snd
		z68kPtr	Sfx_6C_Snd
		z68kPtr	Sfx_6D_Snd
		z68kPtr	Sfx_6E_Snd
		z68kPtr	Sfx_6F_Snd
		z68kPtr	Sfx_70_Snd
		z68kPtr	Sfx_71_Snd
		z68kPtr	Sfx_72_Snd
		z68kPtr	Sfx_73_Snd
		z68kPtr	Sfx_74_Snd
		z68kPtr	Sfx_75_Snd
		z68kPtr	Sfx_76_Snd
		z68kPtr	Sfx_77_Snd
		z68kPtr	Sfx_78_Snd
		z68kPtr	Sfx_79_Snd
		z68kPtr	Sfx_7A_Snd
		z68kPtr	Sfx_7B_Snd
		z68kPtr	Sfx_7C_Snd
		z68kPtr	Sfx_7D_Snd
		z68kPtr	Sfx_7E_Snd
		z68kPtr	Sfx_7F_Snd
		z68kPtr	Sfx_80_Snd
		z68kPtr	Sfx_81_Snd
		z68kPtr	Sfx_82_Snd
		z68kPtr	Sfx_83_Snd
		z68kPtr	Sfx_84_Snd
		z68kPtr	Sfx_85_Snd
		z68kPtr	Sfx_86_Snd
		z68kPtr	Sfx_87_Snd
		z68kPtr	Sfx_88_Snd
		z68kPtr	Sfx_89_Snd
		z68kPtr	Sfx_8A_Snd
		z68kPtr	Sfx_8B_Snd
		z68kPtr	Sfx_8C_Snd
		z68kPtr	Sfx_8D_Snd
		z68kPtr	Sfx_8E_Snd
		z68kPtr	Sfx_8F_Snd
		z68kPtr	Sfx_90_Snd
		z68kPtr	Sfx_91_Snd
		z68kPtr	Sfx_92_Snd
		z68kPtr	Sfx_93_Snd
		z68kPtr	Sfx_94_Snd
		z68kPtr	Sfx_95_Snd
		z68kPtr	Sfx_96_Snd
		z68kPtr	Sfx_97_Snd
		z68kPtr	Sfx_98_Snd
		z68kPtr	Sfx_99_Snd
		z68kPtr	Sfx_9A_Snd
		z68kPtr	Sfx_9B_Snd
		z68kPtr	Sfx_9C_Snd
		z68kPtr	Sfx_9D_Snd
		z68kPtr	Sfx_9E_Snd
		z68kPtr	Sfx_9F_Snd
		z68kPtr	Sfx_A0_Snd
		z68kPtr	Sfx_A1_Snd
		z68kPtr	Sfx_A2_Snd
		z68kPtr	Sfx_A3_Snd
		z68kPtr	Sfx_A4_Snd
		z68kPtr	Sfx_A5_Snd
		z68kPtr	Sfx_A6_Snd
		z68kPtr	Sfx_A7_Snd
		z68kPtr	Sfx_A8_Snd
		z68kPtr	Sfx_A9_Snd
		z68kPtr	Sfx_AA_Snd
		z68kPtr	Sfx_AB_Snd
		z68kPtr	Sfx_AC_Snd
		z68kPtr	Sfx_AD_Snd
		z68kPtr	Sfx_AE_Snd
		z68kPtr	Sfx_AF_Snd
		z68kPtr	Sfx_B0_Snd
		z68kPtr	Sfx_B1_Snd
		z68kPtr	Sfx_B2_Snd
		z68kPtr	Sfx_B3_Snd
		z68kPtr	Sfx_B4_Snd
		z68kPtr	Sfx_B5_Snd
		z68kPtr	Sfx_B6_Snd
		z68kPtr	Sfx_B7_Snd
		z68kPtr	Sfx_B8_Snd
		z68kPtr	Sfx_B9_Snd
		z68kPtr	Sfx_BA_Snd
		z68kPtr	Sfx_BB_Snd
		z68kPtr	Sfx_BC_Snd
		z68kPtr	Sfx_BD_Snd
		z68kPtr	Sfx_BE_Snd
		z68kPtr	Sfx_BF_Snd
		z68kPtr	Sfx_C0_Snd
		z68kPtr	Sfx_C1_Snd
		z68kPtr	Sfx_C2_Snd
		z68kPtr	Sfx_C3_Snd
		z68kPtr	Sfx_C4_Snd
		z68kPtr	Sfx_C5_Snd
		z68kPtr	Sfx_C6_Snd
		z68kPtr	Sfx_C7_Snd
		z68kPtr	Sfx_C8_Snd
		z68kPtr	Sfx_C9_Snd
		z68kPtr	Sfx_CA_Snd
		z68kPtr	Sfx_CB_Snd
		z68kPtr	Sfx_CC_Snd
		z68kPtr	Sfx_CD_Snd
		z68kPtr	Sfx_CE_Snd
		z68kPtr	Sfx_CF_Snd
		z68kPtr	Sfx_D0_Snd
		z68kPtr	Sfx_D1_Snd
		z68kPtr	Sfx_D2_Snd
		z68kPtr	Sfx_D3_Snd
		z68kPtr	Sfx_D4_Snd
		z68kPtr	Sfx_D5_Snd
		z68kPtr	Sfx_D6_Snd
		z68kPtr	Sfx_D7_Snd
		z68kPtr	Sfx_D8_Snd
		z68kPtr	Sfx_D9_Snd
		z68kPtr	Sfx_DA_Snd
		z68kPtr	Sfx_DB_Snd
		z68kPtr	Sfx_DC_Snd
		z68kPtr	Sfx_DC_Snd
		z68kPtr	Sfx_DC_Snd
		z68kPtr	Sfx_DC_Snd
		z68kPtr	Sfx_DC_Snd
DriverPointersEnd:

UniversalVoiceBank:
		incbin	"sound/uvb.bin"
UniversalVoiceBankEnd:
		align	$8000

DacBank0:
		incbin	"sound/dac_0.bin"

		align	$8000
DacBank1:
		incbin	"sound/dac_1.bin"
		align	$8000

DacBank2:
		incbin	"sound/dac_2.bin"
		align	$8000

Bank0:
		incbin	"sound/filler.bin"
Mini_Boss_Snd:
		incbin	"sound/miniboss.snd"
Final_Boss_Snd:
		incbin	"sound/f_boss.snd"
		align	$8000

Bank1:
Angel_Island_1_Snd:
		incbin	"sound/aiz1.snd"
Angel_Island_2_Snd:
		incbin	"sound/aiz2.snd"
Hydrocity_1_Snd:
		incbin	"sound/hcz1.snd"
Hydrocity_2_Snd:
		incbin	"sound/hcz2.snd"
Marble_Garden_1_Snd:
		incbin	"sound/mgz1.snd"
Marble_Garden_2_Snd:
		incbin	"sound/mgz2.snd"
Carnival_Night_2_Snd:
		incbin	"sound/cnz2.snd"
Carnival_Night_1_Snd:
		incbin	"sound/cnz1.snd"
Flying_Battery_1_Snd:
		incbin	"sound/fbz1.snd"
Flying_Battery_2_Snd:
		incbin	"sound/fbz2.snd"
The_Doomsday_Snd:
		incbin	"sound/tdz.snd"
		align	$8000

Bank2:
Icecap_2_Snd:
		incbin	"sound/iz2.snd"
Icecap_1_Snd:
		incbin	"sound/iz1.snd"
Launch_Base_2_Snd:
		incbin	"sound/lbz2.snd"
Launch_Base_1_Snd:
		incbin	"sound/lbz1.snd"
Mushroom_Hill_1_Snd:
		incbin	"sound/mhz1.snd"
Mushroom_Hill_2_Snd:
		incbin	"sound/mhz2.snd"
Sandopolis_1_Snd:
		incbin	"sound/sz1.snd"
Sandopolis_2_Snd:
		incbin	"sound/sz2.snd"
Lava_Reef_1_Snd:
		incbin	"sound/lrz1.snd"
Lava_Reef_2_Snd:
		incbin	"sound/lrz2.snd"
Sky_Sanctuary_Snd:
		incbin	"sound/scz.snd"
Death_Egg_1_Snd:
		incbin	"sound/dez1.snd"
Death_Egg_2_Snd:
		incbin	"sound/dez2.snd"
Mini_Boss_SK_Snd:
		incbin	"sound/mb_sk.snd"
Boss_Snd:
		incbin	"sound/boss.snd"
Glowing_Spheres_Bonus_Stage_snd:
		incbin	"sound/gs_bs.snd"
Special_Stage_Snd:
		incbin	"sound/ss.snd"
Level_Results_Snd:
		incbin	"sound/lr.snd"
Menu_Snd:		
		incbin	"sound/menu.snd"
		align	$8000

Bank3:
Slot_Machine_Bonus_Stage_snd:
		incbin	"sound/sm_bs.snd"
Gum_Ball_Machine_Bonus_Stage_snd:
		incbin	"sound/gbm_bs.snd"
Knuckles_Theme_Snd:
		incbin	"sound/kte.snd"
Azure_Lake_Snd:
		incbin	"sound/alz.snd"
Balloon_Park_Snd:
		incbin	"sound/bpz.snd"
Desert_Palace_Snd:
		incbin	"sound/dpz.snd"
Chrome_Gadget_Snd:
		incbin	"sound/cgz.snd"
Endless_Mine_Snd:
		incbin	"sound/emz.snd"
Title_Screen_Snd:
		incbin	"sound/ts.snd"
Credits_Snd:		
		incbin	"sound/credits.snd"
Time_Game_Over_Snd:
		incbin	"sound/tgovr.snd"
Continue_Snd:
		incbin	"sound/continue.snd"
Extra_Life_Snd:
		incbin	"sound/1up.snd"
Emerald_Snd:
		incbin	"sound/emerald.snd"
Invincibility_Snd:
		incbin	"sound/invcblty.snd"
Competition_Menu_Snd:
		incbin	"sound/2p_menu.snd"	
Underwater_Timming_Snd:
		incbin	"sound/panic.snd"
Presented_by_SEGA_Snd:
		incbin	"sound/p_sega.snd"
		align	$8000

SndBank:
SegaPCMBank:
SegaSnd:
		incbin	"sound/sega.snd"
Sfx_34_Snd:
		incbin	"sound/sfx_34.snd"
Sfx_35_Snd:
		incbin	"sound/sfx_35.snd"
Sfx_36_Snd:
		incbin	"sound/sfx_36.snd"
Sfx_37_Snd:
		incbin	"sound/sfx_37.snd"
Sfx_38_Snd:
		incbin	"sound/sfx_38.snd"
Sfx_39_Snd:
		incbin	"sound/sfx_39.snd"
Sfx_3A_Snd:
		incbin	"sound/sfx_3A.snd"
Sfx_3B_Snd:
		incbin	"sound/sfx_3B.snd"
Sfx_3C_Snd:
		incbin	"sound/sfx_3C.snd"
Sfx_3D_Snd:
		incbin	"sound/sfx_3D.snd"
Sfx_3E_Snd:
		incbin	"sound/sfx_3E.snd"
Sfx_3F_Snd:
		incbin	"sound/sfx_3F.snd"
Sfx_40_Snd:
		incbin	"sound/sfx_40.snd"
Sfx_41_Snd:
		incbin	"sound/sfx_41.snd"
Sfx_42_Snd:
		incbin	"sound/sfx_42.snd"
Sfx_43_Snd:
		incbin	"sound/sfx_43.snd"
Sfx_44_Snd:
		incbin	"sound/sfx_44.snd"
Sfx_45_Snd:
		incbin	"sound/sfx_45.snd"
Sfx_46_Snd:
		incbin	"sound/sfx_46.snd"
Sfx_47_Snd:
		incbin	"sound/sfx_47.snd"
Sfx_48_Snd:
		incbin	"sound/sfx_48.snd"
Sfx_49_Snd:
		incbin	"sound/sfx_49.snd"
Sfx_4A_Snd:
		incbin	"sound/sfx_4A.snd"
Sfx_4B_Snd:
		incbin	"sound/sfx_4B.snd"
Sfx_4C_Snd:
		incbin	"sound/sfx_4C.snd"
Sfx_4D_Snd:
		incbin	"sound/sfx_4D.snd"
Sfx_4E_Snd:
		incbin	"sound/sfx_4E.snd"
Sfx_4F_Snd:
		incbin	"sound/sfx_4F.snd"
Sfx_50_Snd:
		incbin	"sound/sfx_50.snd"
Sfx_51_Snd:
		incbin	"sound/sfx_51.snd"
Sfx_52_Snd:
		incbin	"sound/sfx_52.snd"
Sfx_53_Snd:
		incbin	"sound/sfx_53.snd"
Sfx_54_Snd:
		incbin	"sound/sfx_54.snd"
Sfx_55_Snd:
		incbin	"sound/sfx_55.snd"
Sfx_56_Snd:
		incbin	"sound/sfx_56.snd"
Sfx_57_Snd:
		incbin	"sound/sfx_57.snd"
Sfx_58_Snd:
		incbin	"sound/sfx_58.snd"
Sfx_59_Snd:
		incbin	"sound/sfx_59.snd"
Sfx_5A_Snd:
		incbin	"sound/sfx_5A.snd"
Sfx_5B_Snd:
		incbin	"sound/sfx_5B.snd"
Sfx_5C_Snd:
		incbin	"sound/sfx_5C.snd"
Sfx_5D_Snd:
		incbin	"sound/sfx_5D.snd"
Sfx_5E_Snd:
		incbin	"sound/sfx_5E.snd"
Sfx_5F_Snd:
		incbin	"sound/sfx_5F.snd"
Sfx_60_Snd:
		incbin	"sound/sfx_60.snd"
Sfx_61_Snd:
		incbin	"sound/sfx_61.snd"
Sfx_62_Snd:
		incbin	"sound/sfx_62.snd"
Sfx_63_Snd:
		incbin	"sound/sfx_63.snd"
Sfx_64_Snd:
		incbin	"sound/sfx_64.snd"
Sfx_65_Snd:
		incbin	"sound/sfx_65.snd"
Sfx_66_Snd:
		incbin	"sound/sfx_66.snd"
Sfx_67_Snd:
		incbin	"sound/sfx_67.snd"
Sfx_68_Snd:
		incbin	"sound/sfx_68.snd"
Sfx_69_Snd:
		incbin	"sound/sfx_69.snd"
Sfx_6A_Snd:
		incbin	"sound/sfx_6A.snd"
Sfx_6B_Snd:
		incbin	"sound/sfx_6B.snd"
Sfx_6C_Snd:
		incbin	"sound/sfx_6C.snd"
Sfx_6D_Snd:
		incbin	"sound/sfx_6D.snd"
Sfx_6E_Snd:
		incbin	"sound/sfx_6E.snd"
Sfx_6F_Snd:
		incbin	"sound/sfx_6F.snd"
Sfx_70_Snd:
		incbin	"sound/sfx_70.snd"
Sfx_71_Snd:
		incbin	"sound/sfx_71.snd"
Sfx_72_Snd:
		incbin	"sound/sfx_72.snd"
Sfx_73_Snd:
		incbin	"sound/sfx_73.snd"
Sfx_74_Snd:
		incbin	"sound/sfx_74.snd"
Sfx_75_Snd:
		incbin	"sound/sfx_75.snd"
Sfx_76_Snd:
		incbin	"sound/sfx_76.snd"
Sfx_77_Snd:
		incbin	"sound/sfx_77.snd"
Sfx_78_Snd:
		incbin	"sound/sfx_78.snd"
Sfx_79_Snd:
		incbin	"sound/sfx_79.snd"
Sfx_7A_Snd:
		incbin	"sound/sfx_7A.snd"
Sfx_7B_Snd:
		incbin	"sound/sfx_7B.snd"
Sfx_7C_Snd:
		incbin	"sound/sfx_7C.snd"
Sfx_7D_Snd:
		incbin	"sound/sfx_7D.snd"
Sfx_7E_Snd:
		incbin	"sound/sfx_7E.snd"
Sfx_7F_Snd:
		incbin	"sound/sfx_7F.snd"
Sfx_80_Snd:
		incbin	"sound/sfx_80.snd"
Sfx_81_Snd:
		incbin	"sound/sfx_81.snd"
Sfx_82_Snd:
		incbin	"sound/sfx_82.snd"
Sfx_83_Snd:
		incbin	"sound/sfx_83.snd"
Sfx_84_Snd:
		incbin	"sound/sfx_84.snd"
Sfx_85_Snd:
		incbin	"sound/sfx_85.snd"
Sfx_86_Snd:
		incbin	"sound/sfx_86.snd"
Sfx_87_Snd:
		incbin	"sound/sfx_87.snd"
Sfx_88_Snd:
		incbin	"sound/sfx_88.snd"
Sfx_89_Snd:
		incbin	"sound/sfx_89.snd"
Sfx_8A_Snd:
		incbin	"sound/sfx_8A.snd"
Sfx_8B_Snd:
		incbin	"sound/sfx_8B.snd"
Sfx_8C_Snd:
		incbin	"sound/sfx_8C.snd"
Sfx_8D_Snd:
		incbin	"sound/sfx_8D.snd"
Sfx_8E_Snd:
		incbin	"sound/sfx_8E.snd"
Sfx_8F_Snd:
		incbin	"sound/sfx_8F.snd"
Sfx_90_Snd:
		incbin	"sound/sfx_90.snd"
Sfx_91_Snd:
		incbin	"sound/sfx_91.snd"
Sfx_92_Snd:
		incbin	"sound/sfx_92.snd"
Sfx_93_Snd:
		incbin	"sound/sfx_93.snd"
Sfx_94_Snd:
		incbin	"sound/sfx_94.snd"
Sfx_95_Snd:
		incbin	"sound/sfx_95.snd"
Sfx_96_Snd:
		incbin	"sound/sfx_96.snd"
Sfx_97_Snd:
		incbin	"sound/sfx_97.snd"
Sfx_98_Snd:
		incbin	"sound/sfx_98.snd"
Sfx_99_Snd:
		incbin	"sound/sfx_99.snd"
Sfx_9A_Snd:
		incbin	"sound/sfx_9A.snd"
Sfx_9B_Snd:
		incbin	"sound/sfx_9B.snd"
Sfx_9C_Snd:
		incbin	"sound/sfx_9C.snd"
Sfx_9D_Snd:
		incbin	"sound/sfx_9D.snd"
Sfx_9E_Snd:
		incbin	"sound/sfx_9E.snd"
Sfx_9F_Snd:
		incbin	"sound/sfx_9F.snd"
Sfx_A0_Snd:
		incbin	"sound/sfx_A0.snd"
Sfx_A1_Snd:
		incbin	"sound/sfx_A1.snd"
Sfx_A2_Snd:
		incbin	"sound/sfx_A2.snd"
Sfx_A3_Snd:
		incbin	"sound/sfx_A3.snd"
Sfx_A4_Snd:
		incbin	"sound/sfx_A4.snd"
Sfx_A5_Snd:
		incbin	"sound/sfx_A5.snd"
Sfx_A6_Snd:
		incbin	"sound/sfx_A6.snd"
Sfx_A7_Snd:
		incbin	"sound/sfx_A7.snd"
Sfx_A8_Snd:
		incbin	"sound/sfx_A8.snd"
Sfx_A9_Snd:
		incbin	"sound/sfx_A9.snd"
Sfx_AA_Snd:
		incbin	"sound/sfx_AA.snd"
Sfx_AB_Snd:
		incbin	"sound/sfx_AB.snd"
Sfx_AC_Snd:
		incbin	"sound/sfx_AC.snd"
Sfx_AD_Snd:
		incbin	"sound/sfx_AD.snd"
Sfx_AE_Snd:
		incbin	"sound/sfx_AE.snd"
Sfx_AF_Snd:
		incbin	"sound/sfx_AF.snd"
Sfx_B0_Snd:
		incbin	"sound/sfx_B0.snd"
Sfx_B1_Snd:
		incbin	"sound/sfx_B1.snd"
Sfx_B2_Snd:
		incbin	"sound/sfx_B2.snd"
Sfx_B3_Snd:
		incbin	"sound/sfx_B3.snd"
Sfx_B4_Snd:
		incbin	"sound/sfx_B4.snd"
Sfx_B5_Snd:
		incbin	"sound/sfx_B5.snd"
Sfx_B6_Snd:
		incbin	"sound/sfx_B6.snd"
Sfx_B7_Snd:
		incbin	"sound/sfx_B7.snd"
Sfx_B8_Snd:
		incbin	"sound/sfx_B8.snd"
Sfx_B9_Snd:
		incbin	"sound/sfx_B9.snd"
Sfx_BA_Snd:
		incbin	"sound/sfx_BA.snd"
Sfx_BB_Snd:
		incbin	"sound/sfx_BB.snd"
Sfx_BC_Snd:
		incbin	"sound/sfx_BC.snd"
Sfx_BD_Snd:
		incbin	"sound/sfx_BD.snd"
Sfx_BE_Snd:
		incbin	"sound/sfx_BE.snd"
Sfx_BF_Snd:
		incbin	"sound/sfx_BF.snd"
Sfx_C0_Snd:
		incbin	"sound/sfx_C0.snd"
Sfx_C1_Snd:
		incbin	"sound/sfx_C1.snd"
Sfx_C2_Snd:
		incbin	"sound/sfx_C2.snd"
Sfx_C3_Snd:
		incbin	"sound/sfx_C3.snd"
Sfx_C4_Snd:
		incbin	"sound/sfx_C4.snd"
Sfx_C5_Snd:
		incbin	"sound/sfx_C5.snd"
Sfx_C6_Snd:
		incbin	"sound/sfx_C6.snd"
Sfx_C7_Snd:
		incbin	"sound/sfx_C7.snd"
Sfx_C8_Snd:
		incbin	"sound/sfx_C8.snd"
Sfx_C9_Snd:
		incbin	"sound/sfx_C9.snd"
Sfx_CA_Snd:
		incbin	"sound/sfx_CA.snd"
Sfx_CB_Snd:
		incbin	"sound/sfx_CB.snd"
Sfx_CC_Snd:
		incbin	"sound/sfx_CC.snd"
Sfx_CD_Snd:
		incbin	"sound/sfx_CD.snd"
Sfx_CE_Snd:
		incbin	"sound/sfx_CE.snd"
Sfx_CF_Snd:
		incbin	"sound/sfx_CF.snd"
Sfx_D0_Snd:
		incbin	"sound/sfx_D0.snd"
Sfx_D1_Snd:
		incbin	"sound/sfx_D1.snd"
Sfx_D2_Snd:
		incbin	"sound/sfx_D2.snd"
Sfx_D3_Snd:
		incbin	"sound/sfx_D3.snd"
Sfx_D4_Snd:
		incbin	"sound/sfx_D4.snd"
Sfx_D5_Snd:
		incbin	"sound/sfx_D5.snd"
Sfx_D6_Snd:
		incbin	"sound/sfx_D6.snd"
Sfx_D7_Snd:
		incbin	"sound/sfx_D7.snd"
Sfx_D8_Snd:
		incbin	"sound/sfx_D8.snd"
Sfx_D9_Snd:
		incbin	"sound/sfx_D9.snd"
Sfx_DA_Snd:
		incbin	"sound/sfx_DA.snd"
Sfx_DB_Snd:
		incbin	"sound/sfx_DB.snd"
Sfx_DC_Snd:
		incbin	"sound/sfx_DC.snd"

Driver data files

Then unpack this into the sound folder, and remove the original files since we no longer need them anymore:

Download.svg Download The Sonic 3 Driver data files
File: s3driverdata.7z (131 kB) (info)

Enabling Sonic 2 / 3 Level Music Memory

Doing this is optional as it has little to do with the driver itself, but is a very useful and quick hack that makes life a lot easier for the more painful phase of using a massively different sound system than before, fixing the freaken sound. Sonic 1 uses a second index for restoring music as opposed to actually memorizing it like later sonic games do.

First we will locate:

Level_PlayBgm:
		lea	(MusicList).l,a1 ; load	music playlist
		move.b	(a1,d0.w),d0	; add d0 to a1
		bsr.w	PlaySound	; play music
		move.b	#$34,($FFFFD080).w ; load title	card object

and insert a new line to make it read:

Level_PlayBgm:
		lea	(MusicList).l,a1 ; load	music playlist
		move.b	(a1,d0.w),d0	; add d0 to a1
		move.w	d0,($FFFFFF90).w	; store level music
		bsr.w	PlaySound	; play music
		move.b	#$34,($FFFFD080).w ; load title	card object

Now we will locate:

		move.b	($FFFFFE10).w,d0
		cmpi.w	#$103,($FFFFFE10).w ; check if level is	SBZ3
		bne.s	Obj01_PlayMusic
		moveq	#5,d0		; play SBZ music

Obj01_PlayMusic:
		lea	(MusicList2).l,a1
		move.b	(a1,d0.w),d0
		jsr	(PlaySound).l	; play normal music

seems the invincibility stars conflict with music memory, so we will just make it use music list 1, so the result is:

		move.b	($FFFFFE10).w,d0
		cmpi.w	#$103,($FFFFFE10).w ; check if level is	SBZ3
		bne.s	Obj01_PlayMusic
		moveq	#5,d0		; play SBZ music

Obj01_PlayMusic:
		lea	(MusicList).l,a1 ; load	music playlist
		move.b	(a1,d0.w),d0	; add d0 to a1
		move.w	d0,($FFFFFF90).w	; store level music
		jsr	(PlaySound).l	; play normal music

then remove:

; ---------------------------------------------------------------------------
; Music	to play	after invincibility wears off
; ---------------------------------------------------------------------------
MusicList2:	binclude	misc\muslist2.bin

now we want to fix the underwater counter music restore code, so locate:

ResumeMusic:				; XREF: Obj64_Wobble; Sonic_Water; Obj0A_ReduceAir
		cmpi.w	#$C,($FFFFFE14).w
		bhi.s	loc_140AC
		move.w	#$82,d0		; play LZ music
		cmpi.w	#$103,($FFFFFE10).w ; check if level is	0103 (SBZ3)
		bne.s	loc_140A6
		move.w	#$86,d0		; play SBZ music

loc_140A6:
		jsr	(PlaySound).l

and replace it with:

ResumeMusic:				; XREF: Obj64_Wobble; Sonic_Water; Obj0A_ReduceAir
		cmpi.w	#$C,($FFFFFE14).w
		bhi.s	loc_140AC
		move.w	($FFFFFF90).w,d0	      ;resume music
		jsr	(PlaySound).l

that sets up music memory for later.

GIT Disassembly users, start here

Note to AS disassembly users

This guide assumes you are not using that fork, but if you are, I will provide alternate versions of the new macros when I need to and you can always replace @ with . and use my new macro setup especially for you that can be otherwise skipped.

Fix offsets in objects

some offsets likely get broken, so we need to fix them: 09 Sonic in Special Stage.asm: here is the fixed section:

sub_1BCE8:
		lea	($FF0000).l,a1
		moveq	#0,d4
		swap	d2
		move.w	d2,d4
		swap	d2
		addi.w	#$44,d4
		divu.w	#$18,d4
		mulu.w	#$80,d4
		adda.l	d4,a1
		moveq	#0,d4
		swap	d3
		move.w	d3,d4
		swap	d3
		addi.w	#$14,d4
		divu.w	#$18,d4
		adda.w	d4,a1
		moveq	#0,d5
		move.b	(a1)+,d4
		bsr.s	sub_1BD30
		move.b	(a1)+,d4
		bsr.s	sub_1BD30
		adda.w	#$7E,a1
		move.b	(a1)+,d4
		jsr	sub_1BD30
		move.b	(a1)+,d4
		jsr	sub_1BD30
		tst.b	d5
		rts	
; End of function sub_1BCE8


; ||||||||||||||| S U B	R O U T	I N E |||||||||||||||||||||||||||||||||||||||


sub_1BD30:
		beq.s	locret_1BD44
		cmpi.b	#$28,d4
		beq.s	locret_1BD44
		cmpi.b	#$3A,d4
		jcs.s	loc_1BD46
		cmpi.b	#$4B,d4
		jcc.s	loc_1BD46

Constants

Constants will need changing to prevent the build errors.
All of these need replacing:

; Background music
bgm__First:	equ $81
bgm_GHZ:	equ ((ptr_mus81-MusicIndex)/4)+bgm__First
bgm_LZ:		equ ((ptr_mus82-MusicIndex)/4)+bgm__First
bgm_MZ:		equ ((ptr_mus83-MusicIndex)/4)+bgm__First
bgm_SLZ:	equ ((ptr_mus84-MusicIndex)/4)+bgm__First
bgm_SYZ:	equ ((ptr_mus85-MusicIndex)/4)+bgm__First
bgm_SBZ:	equ ((ptr_mus86-MusicIndex)/4)+bgm__First
bgm_Invincible:	equ ((ptr_mus87-MusicIndex)/4)+bgm__First
bgm_ExtraLife:	equ ((ptr_mus88-MusicIndex)/4)+bgm__First
bgm_SS:		equ ((ptr_mus89-MusicIndex)/4)+bgm__First
bgm_Title:	equ ((ptr_mus8A-MusicIndex)/4)+bgm__First
bgm_Ending:	equ ((ptr_mus8B-MusicIndex)/4)+bgm__First
bgm_Boss:	equ ((ptr_mus8C-MusicIndex)/4)+bgm__First
bgm_FZ:		equ ((ptr_mus8D-MusicIndex)/4)+bgm__First
bgm_GotThrough:	equ ((ptr_mus8E-MusicIndex)/4)+bgm__First
bgm_GameOver:	equ ((ptr_mus8F-MusicIndex)/4)+bgm__First
bgm_Continue:	equ ((ptr_mus90-MusicIndex)/4)+bgm__First
bgm_Credits:	equ ((ptr_mus91-MusicIndex)/4)+bgm__First
bgm_Drowning:	equ ((ptr_mus92-MusicIndex)/4)+bgm__First
bgm_Emerald:	equ ((ptr_mus93-MusicIndex)/4)+bgm__First
bgm__Last:	equ ((ptr_musend-MusicIndex-4)/4)+bgm__First

; Sound effects
sfx__First:	equ $A0
sfx_Jump:	equ ((ptr_sndA0-SoundIndex)/4)+sfx__First
sfx_Lamppost:	equ ((ptr_sndA1-SoundIndex)/4)+sfx__First
sfx_A2:		equ ((ptr_sndA2-SoundIndex)/4)+sfx__First
sfx_Death:	equ ((ptr_sndA3-SoundIndex)/4)+sfx__First
sfx_Skid:	equ ((ptr_sndA4-SoundIndex)/4)+sfx__First
sfx_A5:		equ ((ptr_sndA5-SoundIndex)/4)+sfx__First
sfx_HitSpikes:	equ ((ptr_sndA6-SoundIndex)/4)+sfx__First
sfx_Push:	equ ((ptr_sndA7-SoundIndex)/4)+sfx__First
sfx_SSGoal:	equ ((ptr_sndA8-SoundIndex)/4)+sfx__First
sfx_SSItem:	equ ((ptr_sndA9-SoundIndex)/4)+sfx__First
sfx_Splash:	equ ((ptr_sndAA-SoundIndex)/4)+sfx__First
sfx_AB:		equ ((ptr_sndAB-SoundIndex)/4)+sfx__First
sfx_HitBoss:	equ ((ptr_sndAC-SoundIndex)/4)+sfx__First
sfx_Bubble:	equ ((ptr_sndAD-SoundIndex)/4)+sfx__First
sfx_Fireball:	equ ((ptr_sndAE-SoundIndex)/4)+sfx__First
sfx_Shield:	equ ((ptr_sndAF-SoundIndex)/4)+sfx__First
sfx_Saw:	equ ((ptr_sndB0-SoundIndex)/4)+sfx__First
sfx_Electric:	equ ((ptr_sndB1-SoundIndex)/4)+sfx__First
sfx_Drown:	equ ((ptr_sndB2-SoundIndex)/4)+sfx__First
sfx_Flamethrower:equ ((ptr_sndB3-SoundIndex)/4)+sfx__First
sfx_Bumper:	equ ((ptr_sndB4-SoundIndex)/4)+sfx__First
sfx_Ring:	equ ((ptr_sndB5-SoundIndex)/4)+sfx__First
sfx_SpikesMove:	equ ((ptr_sndB6-SoundIndex)/4)+sfx__First
sfx_Rumbling:	equ ((ptr_sndB7-SoundIndex)/4)+sfx__First
sfx_B8:		equ ((ptr_sndB8-SoundIndex)/4)+sfx__First
sfx_Collapse:	equ ((ptr_sndB9-SoundIndex)/4)+sfx__First
sfx_SSGlass:	equ ((ptr_sndBA-SoundIndex)/4)+sfx__First
sfx_Door:	equ ((ptr_sndBB-SoundIndex)/4)+sfx__First
sfx_Teleport:	equ ((ptr_sndBC-SoundIndex)/4)+sfx__First
sfx_ChainStomp:	equ ((ptr_sndBD-SoundIndex)/4)+sfx__First
sfx_Roll:	equ ((ptr_sndBE-SoundIndex)/4)+sfx__First
sfx_Continue:	equ ((ptr_sndBF-SoundIndex)/4)+sfx__First
sfx_Basaran:	equ ((ptr_sndC0-SoundIndex)/4)+sfx__First
sfx_BreakItem:	equ ((ptr_sndC1-SoundIndex)/4)+sfx__First
sfx_Warning:	equ ((ptr_sndC2-SoundIndex)/4)+sfx__First
sfx_GiantRing:	equ ((ptr_sndC3-SoundIndex)/4)+sfx__First
sfx_Bomb:	equ ((ptr_sndC4-SoundIndex)/4)+sfx__First
sfx_Cash:	equ ((ptr_sndC5-SoundIndex)/4)+sfx__First
sfx_RingLoss:	equ ((ptr_sndC6-SoundIndex)/4)+sfx__First
sfx_ChainRise:	equ ((ptr_sndC7-SoundIndex)/4)+sfx__First
sfx_Burning:	equ ((ptr_sndC8-SoundIndex)/4)+sfx__First
sfx_Bonus:	equ ((ptr_sndC9-SoundIndex)/4)+sfx__First
sfx_EnterSS:	equ ((ptr_sndCA-SoundIndex)/4)+sfx__First
sfx_WallSmash:	equ ((ptr_sndCB-SoundIndex)/4)+sfx__First
sfx_Spring:	equ ((ptr_sndCC-SoundIndex)/4)+sfx__First
sfx_Switch:	equ ((ptr_sndCD-SoundIndex)/4)+sfx__First
sfx_RingLeft:	equ ((ptr_sndCE-SoundIndex)/4)+sfx__First
sfx_Signpost:	equ ((ptr_sndCF-SoundIndex)/4)+sfx__First
sfx__Last:	equ ((ptr_sndend-SoundIndex-4)/4)+sfx__First

; Special sound effects
spec__First:	equ $D0
sfx_Waterfall:	equ ((ptr_sndD0-SpecSoundIndex)/4)+spec__First
spec__Last:	equ ((ptr_specend-SpecSoundIndex-4)/4)+spec__First

flg__First:	equ $E0
bgm_Fade:	equ ((ptr_flgE0-Sound_ExIndex)/4)+flg__First
sfx_Sega:	equ ((ptr_flgE1-Sound_ExIndex)/4)+flg__First
bgm_Speedup:	equ ((ptr_flgE2-Sound_ExIndex)/4)+flg__First
bgm_Slowdown:	equ ((ptr_flgE3-Sound_ExIndex)/4)+flg__First
bgm_Stop:	equ ((ptr_flgE4-Sound_ExIndex)/4)+flg__First
flg__Last:	equ ((ptr_flgend-Sound_ExIndex-4)/4)+flg__First

this should be good enough until part 2:

; Background music
bgm__First:	equ 1
bgm_GHZ:	equ ((ptr_mus81-MusicIndex)/2)+bgm__First
bgm_LZ:		equ ((ptr_mus82-MusicIndex)/2)+bgm__First
bgm_MZ:		equ ((ptr_mus83-MusicIndex)/2)+bgm__First
bgm_SLZ:	equ ((ptr_mus84-MusicIndex)/2)+bgm__First
bgm_SYZ:	equ ((ptr_mus85-MusicIndex)/2)+bgm__First
bgm_SBZ:	equ ((ptr_mus86-MusicIndex)/2)+bgm__First
bgm_Invincible:	equ ((ptr_mus87-MusicIndex)/2)+bgm__First
bgm_ExtraLife:	equ ((ptr_mus88-MusicIndex)/2)+bgm__First
bgm_SS:		equ ((ptr_mus89-MusicIndex)/2)+bgm__First
bgm_Title:	equ ((ptr_mus8A-MusicIndex)/2)+bgm__First
bgm_Ending:	equ ((ptr_mus8B-MusicIndex)/2)+bgm__First
bgm_Boss:	equ ((ptr_mus8C-MusicIndex)/2)+bgm__First
bgm_FZ:		equ ((ptr_mus8D-MusicIndex)/2)+bgm__First
bgm_GotThrough:	equ ((ptr_mus8E-MusicIndex)/2)+bgm__First
bgm_GameOver:	equ ((ptr_mus8F-MusicIndex)/2)+bgm__First
bgm_Continue:	equ ((ptr_mus90-MusicIndex)/2)+bgm__First
bgm_Credits:	equ ((ptr_mus91-MusicIndex)/2)+bgm__First
bgm_Drowning:	equ ((ptr_mus92-MusicIndex)/2)+bgm__First
bgm_Emerald:	equ ((ptr_mus93-MusicIndex)/2)+bgm__First
bgm__Last:	equ ((ptr_musend-MusicIndex-2)/2)+bgm__First

; Sound effects
sfx__First:	equ $34
sfx_Jump:	equ ((ptr_sndA0-SoundIndex)/2)+sfx__First
sfx_Lamppost:	equ ((ptr_sndA1-SoundIndex)/2)+sfx__First
sfx_A2:		equ ((ptr_sndA2-SoundIndex)/2)+sfx__First
sfx_Death:	equ ((ptr_sndA3-SoundIndex)/2)+sfx__First
sfx_Skid:	equ ((ptr_sndA4-SoundIndex)/2)+sfx__First
sfx_A5:		equ ((ptr_sndA5-SoundIndex)/2)+sfx__First
sfx_HitSpikes:	equ ((ptr_sndA6-SoundIndex)/2)+sfx__First
sfx_Push:	equ ((ptr_sndA7-SoundIndex)/2)+sfx__First
sfx_SSGoal:	equ ((ptr_sndA8-SoundIndex)/2)+sfx__First
sfx_SSItem:	equ ((ptr_sndA9-SoundIndex)/2)+sfx__First
sfx_Splash:	equ ((ptr_sndAA-SoundIndex)/2)+sfx__First
sfx_AB:		equ ((ptr_sndAB-SoundIndex)/2)+sfx__First
sfx_HitBoss:	equ ((ptr_sndAC-SoundIndex)/2)+sfx__First
sfx_Bubble:	equ ((ptr_sndAD-SoundIndex)/2)+sfx__First
sfx_Fireball:	equ ((ptr_sndAE-SoundIndex)/2)+sfx__First
sfx_Shield:	equ ((ptr_sndAF-SoundIndex)/2)+sfx__First
sfx_Saw:	equ ((ptr_sndB0-SoundIndex)/2)+sfx__First
sfx_Electric:	equ ((ptr_sndB1-SoundIndex)/2)+sfx__First
sfx_Drown:	equ ((ptr_sndB2-SoundIndex)/2)+sfx__First
sfx_Flamethrower:equ ((ptr_sndB3-SoundIndex)/2)+sfx__First
sfx_Bumper:	equ ((ptr_sndB4-SoundIndex)/2)+sfx__First
sfx_Ring:	equ ((ptr_sndB5-SoundIndex)/2)+sfx__First
sfx_SpikesMove:	equ ((ptr_sndB6-SoundIndex)/2)+sfx__First
sfx_Rumbling:	equ ((ptr_sndB7-SoundIndex)/2)+sfx__First
sfx_B8:		equ ((ptr_sndB8-SoundIndex)/2)+sfx__First
sfx_Collapse:	equ ((ptr_sndB9-SoundIndex)/2)+sfx__First
sfx_SSGlass:	equ ((ptr_sndBA-SoundIndex)/2)+sfx__First
sfx_Door:	equ ((ptr_sndBB-SoundIndex)/2)+sfx__First
sfx_Teleport:	equ ((ptr_sndBC-SoundIndex)/2)+sfx__First
sfx_ChainStomp:	equ ((ptr_sndBD-SoundIndex)/2)+sfx__First
sfx_Roll:	equ ((ptr_sndBE-SoundIndex)/2)+sfx__First
sfx_Continue:	equ ((ptr_sndBF-SoundIndex)/2)+sfx__First
sfx_Basaran:	equ ((ptr_sndC0-SoundIndex)/2)+sfx__First
sfx_BreakItem:	equ ((ptr_sndC1-SoundIndex)/2)+sfx__First
sfx_Warning:	equ ((ptr_sndC2-SoundIndex)/2)+sfx__First
sfx_GiantRing:	equ ((ptr_sndC3-SoundIndex)/2)+sfx__First
sfx_Bomb:	equ ((ptr_sndC4-SoundIndex)/2)+sfx__First
sfx_Cash:	equ ((ptr_sndC5-SoundIndex)/2)+sfx__First
sfx_RingLoss:	equ ((ptr_sndC6-SoundIndex)/2)+sfx__First
sfx_ChainRise:	equ ((ptr_sndC7-SoundIndex)/2)+sfx__First
sfx_Burning:	equ ((ptr_sndC8-SoundIndex)/2)+sfx__First
sfx_Bonus:	equ ((ptr_sndC9-SoundIndex)/2)+sfx__First
sfx_EnterSS:	equ ((ptr_sndCA-SoundIndex)/2)+sfx__First
sfx_WallSmash:	equ ((ptr_sndCB-SoundIndex)/2)+sfx__First
sfx_Spring:	equ ((ptr_sndCC-SoundIndex)/2)+sfx__First
sfx_Switch:	equ ((ptr_sndCD-SoundIndex)/2)+sfx__First
sfx_RingLeft:	equ ((ptr_sndCE-SoundIndex)/2)+sfx__First
sfx_Signpost:	equ ((ptr_sndCF-SoundIndex)/2)+sfx__First
sfx__Last:	equ ((ptr_sndend-SoundIndex-2)/2)+sfx__First

; Special sound effects
spec__First:	equ $D0
sfx_Waterfall:	equ ((ptr_sndD0-SoundIndex)/2)+sfx__First
spec__Last:	equ ((ptr_sndend-SoundIndex-2)/2)+sfx__First

flg__First:	equ $FB
bgm_Fade:	equ $FB
sfx_Sega:	equ $FC
bgm_Speedup:	equ $8
bgm_Slowdown:	equ $0
bgm_Stop:	equ $FD
flg__Last:	equ $FE

also the equates related to dac need to be removed, the new driver we have later will allow better flexibility than this.

Macro Setup (skip if you are not using an AS disassembly)

Open MacroSetup.asm and add this at the bottom of the file:

incbin macro filename
	binclude filename
	endm

That will make it so that incbin will work with asw (also known as asl on linux) and thus make it so that you no longer have to replace incbin with binclude.

Macros

If you are using the as fork please prepare the macro setup part first before continuing, otherwise, here we will define some new macros for working with z80 pointers, these will not be needed after part 2, but if we skip them now, the driver will be broken, so open Macros.asm and add this at the bottom of the file:

; not in use until the banks are disassembled
; DAC bank pointers
zPtrDAC: macro addr
     dc.w ((((addr&$7FFF)+$8000)<<8)&$FF00)+(((addr&$7FFF)+$8000)>>8)
     endm

; pointers reserved for the driver
zPtrSpec: macro addr
     dc.w (((addr&$1FFF)>>$08)|((addr&$1FFF)<<$08))&$FFFF
     endm

; little endian pointers for music and SFX
z68kPtr: macro addr
     dc.w ((((addr&$FFFF)|$8000)>>$08)|(((addr&$FFFF)|$8000)<<$08))&$FFFF
     endm

Preparing to use Sonic 3/K/3K sound system

The Vertical Interrupt and Horizontal Interrupt need to be fixed, Since the Sonic 1/2 system uses them but the Sonic 3/K/3K system doesn't.

Prepare Vertical Interrupt Handler for new driver

Sonic 1 calls a early 68k smps driver in both the vertical blank routine and the horizontal blank routine, we don need this for the new driver, so we will have to make a few deletions here and there. Sonic 2 also does this with it's compressed z80 driver, so if you are actually placing this in sonic 2, you might want to make a note of that.<p> First we will open sonic.asm and fix the vertical interrupt, by deleting this line:

		jsr	(UpdateMusic).l

under:

VBla_Music:

Prepare Hoizontal Interrupt Handler for new driver

Now we locate:

loc_119E:
		clr.b	($FFFFF64F).w
		movem.l	d0-a6,-(sp)
		bsr.w	Demo_Time
		jsr	(UpdateMusic).l
		movem.l	(sp)+,d0-a6
		rte	
; End of function HBlank

See another familiar line? Yes, you've got it, do the same thing to it:

loc_119E:
		clr.b	($FFFFF64F).w
		movem.l	d0-a6,-(sp)
		bsr.w	Demo_Time
		movem.l	(sp)+,d0-a6
		rte	
; End of function HBlank

That effectively disables the Sonic 1/2 style interrupt handler which we will not need and prevents a nasty error down the road.

Upgrading the Load Driver Routine

Okay, we disabled the driver's interrupt handler, wouldn't we want now to use the sonic3 driver instead? Here is where we start installing it. Locate:

SoundDriverLoad:
		nop	
		stopZ80
		resetZ80
		lea	(Kos_Z80).l,a0	; load sound driver
		lea	(z80_ram).l,a1	; target Z80 RAM
		bsr.w	KosDec		; decompress
		resetZ80a
		nop	
		nop	
		nop	
		nop	
		resetZ80
		startZ80
		rts

and replace it all with:

SoundDriverLoad:					; XREF: GameClrRAM;	TitleScreen
		nop
		stopZ80
		resetZ80
		lea	(DriverData).l,a0
		lea	(z80_ram).l,a1
		move.w	#DriverDataEnd-DriverData-1,d0

@loadDriver
		move.b	(a0)+,(a1)+
		dbf	d0,@loadDriver
		lea	(DriverPointers).l,a0
		lea	(z80_ram+$1300).l,a1
		move.w	#DriverPointersEnd-DriverPointers-1,d0

@loadPointers
		move.b	(a0)+,(a1)+
		dbf	d0,	@loadPointers
		lea	(UniversalVoiceBank).l,a0
		lea	(z80_ram+$17D8).l,a1
		move.w	#UniversalVoiceBankEnd-UniversalVoiceBank-1,d0

@loadUVB
		move.b	(a0)+,(a1)+
		dbf	d0,@loadUVB
		lea	(DriverResetData).l,a0
		lea	(z80_ram+$1C00).l,a1
		move.w	#DriverResetDataEnd-DriverResetData-1,d0

@loadResetData
		move.b	(a0)+,(a1)+
		dbf	d0,@loadResetData
		btst	#6,($FFFFFFF8).w
		beq.s	@restartZ80
		move.b	#1,(z80_ram+$1C02).l

@restartZ80
		resetZ80a
		nop
		nop
		nop
		nop
		resetZ80
		startZ80
		rts
DriverResetData:
		dc.b	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
DriverResetDataEnd:

Upgrading the Playback Routines

Now we have the code to load the new driver, time to add the new playback routines. Open "sub PlaySound.asm" in the _incObj folder.

Upgrade Music Routine

First the PlaySound routine, locate:

PlaySound:
		move.b	d0,(v_snddriver_ram+v_playsnd1).w
		rts

and replace it completely with:

PlaySound:
		cmpi.w	#$FB,d0
		blt.s	PlayNotSpecialFlag
		bhi.s	TestForNormalSpeed
		move	#8,d0
		jmp	SetTempo

TestForNormalSpeed:
		cmpi.w	#$FC,d0
		bne.s	PlayNotSpecialFlag
		clr.w	d0
		jmp	SetTempo

PlayNotSpecialFlag:
		stopZ80

PlaySoundZ80NotStopped:
		resetZ80a
		bne.s	PlaySoundZ80NotStopped	; loop until it says it's stopped
		move.b	d0,(z80_ram+$1C0A).l
		startZ80
		rts

PlaySound_Ex:
		tst.b	4(A0)
		bpl.s	SkipPlaySound_Special

Do not be alarmed about the new sound routine that was added, it is equivalent to the PlaySound_Local routine (as a matter of fact, it is identical, why sonic1 does not already have it is beyond me, since it indeed does work in Sonic 1)

sound playback routines

now find:

; ---------------------------------------------------------------------------
; Subroutine to	play a sound effect
; ---------------------------------------------------------------------------

; ||||||||||||||| S U B	R O U T	I N E |||||||||||||||||||||||||||||||||||||||


PlaySound_Special:
		move.b	d0,(v_snddriver_ram+v_playsnd2).w
		rts	
; End of function PlaySound_Special

; ===========================================================================
; ---------------------------------------------------------------------------
; Unused sound/music subroutine
; ---------------------------------------------------------------------------

PlaySound_Unused:
		move.b	d0,(v_snddriver_ram+v_playnull).w
		rts

and replace it entirely with:

; ---------------------------------------------------------------------------
; Subroutine to	play a special sound/music (FB-FF)
; ---------------------------------------------------------------------------

PlaySound_Special:
		stopZ80
		waitZ80
		cmp.b	(z80_ram+$1C0B).l,d0
		beq.s	PlaySound_Special1
		tst.b	(z80_ram+$1C0B).l
		bne.s	PlaySound_Special0
		move.b	d0,(z80_ram+$1C0B).l
		startZ80
		rts

PlaySound_Special0:
		move.b	d0,(z80_ram+$1C0C).l

PlaySound_Special1:
		startZ80

SkipPlaySound_Special:
		rts
; End of function PlaySound_Special

; ---------------------------------------------------------------------------
; Subroutine to change the music tempo
; ---------------------------------------------------------------------------

SetTempo:
		stopZ80
		waitZ80
		move.b	D0,(z80_ram+$1C08).l
		startZ80
		rts

Upgrading Pause / Resume routines

Now the playback routines are fixed and we have a routine to set the tempo the way the sneakers do, which we will elaberate later on, but we still have to update the pause / resume routines to the sonic 3 equivilents.

Open "PauseGame.asm" in the _inc folder and replace the contents with:

; ---------------------------------------------------------------------------
; Subroutine to	pause the game
; ---------------------------------------------------------------------------

; ||||||||||||||| S U B	R O U T	I N E |||||||||||||||||||||||||||||||||||||||


PauseGame:				; XREF: Level_MainLoop; et al
		nop
		tst.b	(v_lives).w ; do you have any lives left
		beq	Unpause           ; if not, branch
		tst.w	(f_pause).w ;is the game already paused?
		bne.s	Pause_StopGame ;if yes, branch
		move.b	(v_jpadpress1).w,d0 ;did you press start
		andi.b	#$80,d0
		beq	Pause_DoNothing         ;if not, branch

Pause_StopGame:	
		move.w	#1,(f_pause).w ;unpause the game
		stopZ80
		waitZ80
		move.b	#1,(z80_ram+$1C10).l ;unpause the music ;)
		startZ80

Pause_Loop:
		move.b	#$10,(f_pause).w ;re-pause the game (used in slow-mo and frame advance)
		jsr	WaitForVBla ;wait...
		tst.b	(f_slomocheat).w ; Edit: the value is $FFFFFFE1 in Sonic 1 (slow-mo/frame advance mode)
		beq.s	Pause_ChkA
		btst	#bitA,(v_jpadpress1).w ;is player 1 pressing either A?
		beq.s	Pause_ChkBC ;if not, branch
		nop
		bra.s	Pause_Exit ;time to stop the z80 again

Pause_ChkBC:
		btst	#bitB,(v_jpadhold1).w ;did you press b?
		bne.s	Pause_SlowMo ;if so, branch
		btst	#bitC,(v_jpadpress1).w ;did you hold c?
		bne.s	Pause_SlowMo ;if so, branch

Pause_ChkA:
		btst	#bitA,(v_jpadpress1).w            ;did you press a?
		beq.s	Pause_ChkStart           ;if yes, then paise the freaken game
Pause_Exit:
		move.b	#id_Sega,(v_gamemode).w  ;prepare to go to sega screen (level select is not 0xC0 in sonic1, but part of title screen code)
		bra.s	Pause_ResetZ80                   ;go to title screen

Pause_ChkStart:
		move.b	(v_jpadpress1).w,d0  ;on controller 1?
		andi.b	#$80,d0                 ;if not, no change
		beq.s	Pause_Loop   ;in other words, don't pause

Pause_ResetZ80:
		stopZ80
		waitZ80
		move.b	#$80,(z80_ram+$1C10).l ;pause the music
		startZ80

Unpause:
		move.w	#0,(f_pause).w ;unpause the game

Pause_DoNothing:
		rts

Pause_SlowMo:
		move.w	#1,(f_pause).w ;unpause the music for a frame
		stopZ80
		waitZ80
		move.b	#$80,(z80_ram+$1C10).l ;pause the music again
		startZ80
		rts
; End of function PauseGame

Home Info Forums GitHub IRC Chat SEGA Retro Main Games Game Info Hacking Info Fan Gaming Music TV Printed Media

Search Sonic Retro

Actions

SCHG How-to Discussion Edit History Move Unwatch SCHG How-to Editing Port Sonic 3's Sound Driver to Sonic 1 (section)

Replacing 68k driver with new Z80 driver

We need the sound driver itself if we are going to have any sound and music, so we open s1.sounddriver.asm and replace it completely with:

        align	$8000
DriverData:
		dc.b	$F3,$F3,$ED,$56,$C3,$89,$00,$00
		dc.b	$2A,$15
		dc.b	$00,$06,$00,$09,$08,$7E
		dc.b	$23,$66,$6F,$08,$C9
		zPtrSpec   $1300
		dc.b	$00,$4F,$06,$00,$09,$09,$00,$00,$00
		dc.b	$7E,$23,$66,$6F,$C9,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
		dc.b	$00,$00,$00,$00,$00,$00,$00,$00,$F3,$F5,$FD,$E5,$D9,$ED,$5F,$32
		dc.b	$17,$1C,$CD,$21,$01,$3A,$02,$1C,$B7,$28,$12,$3A,$04,$1C,$B7,$20
		dc.b	$08,$3E,$06,$32,$04,$1C,$C3,$3D,$00,$3D,$32,$04,$1C,$AF,$32,$21
		dc.b	$1C,$3A,$30,$1C,$E6,$7F,$4F,$06,$00,$21,$DC,$00,$09,$7E
Z80_0x006E:
		dc.b	$C3,$4C,$11
		dc.b	$77,$0F,$77,$0F,$77,$0F,$77,$0F,$77,$0F,$77,$0F,$77,$0F,$77
		dc.b	$AF,$77
Z80_0x0082:
		dc.b	$D9,$FD,$E1,$F1,$06,$01,$C9,$31,$00,$20,$0E,$00,$06,$00
		dc.b	$10,$FE,$0D,$28,$F9,$CD,$29,$09,$3E,$80,$3E,$06,$32,$3E,$1C,$AF
		dc.b	$32,$27,$1C,$32,$30,$1C,$32,$3F,$1C,$32,$28,$1C,$3E,$05,$32,$04
		dc.b	$1C,$FB,$C3,$62,$10,$DD,$CB,$01,$7E,$C0,$DD,$CB,$00,$56,$C0,$DD
		dc.b	$86,$01,$DD,$CB,$01,$56,$20,$09,$32,$00,$40,$00,$79,$32,$01,$40
		dc.b	$C9,$D6,$04,$32,$02,$40,$00,$79,$32,$03,$40,$C9
Z80_0x00DC:
Dac_Sample_Selector:
		dc.b	((DacBank0>>$F)),((DacBank0>>$F)),((DacBank0>>$F)),((DacBank0>>$F))
		dc.b	((DacBank0>>$F)),((DacBank0>>$F)),((DacBank0>>$F)),((DacBank0>>$F))
		dc.b	((DacBank0>>$F)),((DacBank0>>$F)),((DacBank0>>$F)),((DacBank0>>$F))
		dc.b	((DacBank0>>$F)),((DacBank0>>$F)),((DacBank0>>$F)),((DacBank0>>$F))
		dc.b	((DacBank0>>$F)),((DacBank0>>$F)),((DacBank0>>$F)),((DacBank0>>$F))
		dc.b	((DacBank0>>$F)),((DacBank0>>$F)),((DacBank0>>$F)),((DacBank0>>$F))
		dc.b	((DacBank0>>$F)),((DacBank0>>$F)),((DacBank0>>$F)),((DacBank1>>$F))
		dc.b	((DacBank1>>$F)),((DacBank1>>$F)),((DacBank1>>$F)),((DacBank1>>$F))
		dc.b	((DacBank1>>$F)),((DacBank1>>$F)),((DacBank1>>$F)),((DacBank1>>$F))
		dc.b	((DacBank1>>$F)),((DacBank1>>$F)),((DacBank1>>$F)),((DacBank1>>$F))
		dc.b	((DacBank1>>$F)),((DacBank1>>$F)),((DacBank1>>$F)),((DacBank2>>$F))
		dc.b	((DacBank2>>$F)),((DacBank2>>$F)),((DacBank2>>$F)),((DacBank2>>$F))
		dc.b	((DacBank2>>$F)),((DacBank2>>$F)),((DacBank2>>$F)),((DacBank2>>$F))	
		dc.b	((DacBank2>>$F)),((DacBank2>>$F)),((DacBank2>>$F)),((DacBank2>>$F))
		dc.b	((DacBank2>>$F)),((DacBank2>>$F)),((DacBank2>>$F)),((DacBank2>>$F))
		dc.b	((DacBank2>>$F)),((DacBank2>>$F)),((DacBank2>>$F)),((DacBank2>>$F))
		dc.b	((DacBank2>>$F)),((DacBank2>>$F)),((DacBank2>>$F)),((DacBank2>>$F))
		dc.b	((DacBank2>>$F))
		dc.b	$CD,$E8,$07,$CD,$A2,$01,$CD,$B1,$09,$CD,$62,$08,$CD,$C6,$08
		dc.b	$3A,$16,$1C,$FE,$29,$20,$18,$3A,$0A,$1C,$FE,$2A,$28,$04,$FE,$32
		dc.b	$38,$04,$AF,$32,$0A,$1C,$AF,$32,$0B,$1C,$32,$0C,$1C,$18,$1F,$3A
		dc.b	$16,$1C,$FE,$FF,$28,$18,$21,$0A,$1C,$5E,$23,$56,$23,$7E,$B2,$B3
		dc.b	$28,$0C,$CD,$C7,$09,$CD,$DF,$04,$CD,$DF,$04,$CD,$DF,$04
Z80_0x016E:
		dc.b	$3A,$3E,$1C
		dc.b	$FE,$00
		dc.b	$C2
		zPtrSpec	Z80DefaultBankSwitch
		dc.b	$CD
		zPtrSpec	Z80BankSwitch0
		dc.b	$18,$03
Z80DefaultBankSwitch:
		dc.b	$CD
		zPtrSpec   Z80BankSwitch
		dc.b	$00,$00,$00,$00,$00
Z80_0x0183:
		dc.b	$AF,$32,$19,$1C,$3A,$16,$1C,$FE,$FF,$CC,$05,$0A,$DD
		dc.b	$21,$40,$1C,$DD,$CB,$00,$7E,$C4,$7A,$0B,$06,$08,$DD,$21,$70,$1C
		dc.b	$18,$1A,$3E,$01,$32,$19,$1C
Z80_0x01A7:
		dc.b	$3E,	((SndBank>>$0F))
		dc.b	$CD
		zPtrSpec   Z80BankSwitch
		dc.b	$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
		dc.b	$DD,$21,$F0,$1D,$06,$07,$C5,$DD,$CB,$00
		dc.b	$7E,$C4,$E6,$01,$11,$30,$00,$DD,$19,$C1,$10,$F0,$3A,$08,$1C,$B7
		dc.b	$C8,$3A,$2F,$1C,$B7,$C2,$E1,$01,$3A,$08,$1C,$32,$2F,$1C,$C3,$27
		dc.b	$01,$3D,$32,$2F,$1C,$C9,$DD,$CB,$01,$7E,$C2,$9C,$0F,$CD,$37,$03
		dc.b	$20,$17,$CD,$74,$02,$DD,$CB,$00,$66,$C0,$CD,$9B,$03,$CD,$6C,$04
		dc.b	$CD,$C6,$03,$CD,$28,$02,$C3,$3F,$03,$DD,$CB,$00,$66,$C0,$CD,$6A
		dc.b	$03,$DD,$7E,$1E,$B7,$28,$06,$DD,$35,$1E,$CA,$58,$03,$CD,$6C,$04
		dc.b	$DD,$CB,$00,$76,$C0,$CD,$C6,$03,$DD,$CB,$00,$56,$C0,$DD,$CB,$00
		dc.b	$46,$C2,$41,$02,$3E,$A4,$4C,$CD,$B5,$00,$3E,$A0,$4D,$CD,$B5,$00
		dc.b	$C9,$DD,$7E,$01,$FE,$02,$20,$EC,$06,$04,$21,$6F,$02,$C5,$7E,$23
		dc.b	$E5,$EB,$4E,$23,$46,$23,$EB,$DD,$6E,$0D,$DD,$66,$0E,$09,$F5,$4C
		dc.b	$CD,$C8,$00,$F1,$D6,$04,$4D,$CD,$C8,$00,$E1,$C1,$10,$DF,$C9,$AD
		dc.b	$AE,$AC,$A6,$C9,$DD,$5E,$03,$DD,$56,$04,$DD,$CB,$00,$8E,$DD,$CB
		dc.b	$00,$A6,$1A,$13,$FE,$E0,$D2,$CF,$0B,$08,$CD,$58,$03,$08,$DD,$CB
		dc.b	$00,$5E,$C2,$E5,$02,$B7,$F2,$05,$03,$D6,$81,$F2,$A3,$02,$CD,$44
		dc.b	$10,$18,$2E,$DD,$86,$05,$21,$88,$0A,$F5,$DF,$F1,$DD,$CB,$01,$7E
		dc.b	$20,$19,$D5,$16,$08,$1E,$0C,$08,$AF,$08,$93,$38,$05,$08,$82,$18
		dc.b	$F8,$08,$83,$21,$30,$0B,$DF,$08,$B4,$67,$D1,$DD,$75,$0D,$DD,$74
		dc.b	$0E,$1A,$B7,$F2,$04,$03,$DD,$7E,$0C,$DD,$77,$0B,$18,$2D,$1A,$13
		dc.b	$DD,$77,$11,$18,$1E,$67,$1A,$13,$6F,$B4,$28,$0C,$DD,$7E,$05,$06
		dc.b	$00,$B7,$F2,$F6,$02,$05,$4F,$09,$DD,$75,$0D,$DD,$74,$0E,$1A,$13
		dc.b	$DD,$77,$11,$1A,$13,$CD,$2D,$03,$DD,$77,$0C,$DD,$73,$03,$DD,$72
		dc.b	$04,$DD,$7E,$0C,$DD,$77,$0B,$DD,$CB,$00,$4E,$C0,$AF,$DD,$77,$25
		dc.b	$DD,$77,$22,$DD,$77,$17,$DD,$7E,$1F,$DD,$77,$1E,$C9,$DD,$46,$02
		dc.b	$05,$C8,$4F,$81,$10,$FD,$C9,$DD,$7E,$0B,$3D,$DD,$77,$0B,$C9,$DD
		dc.b	$7E,$0D,$DD,$B6,$0E,$C8,$DD,$7E,$00,$E6,$06,$C0,$DD,$7E,$01,$F6
		dc.b	$F0,$4F,$3E,$28,$CD,$C8,$00,$C9,$DD,$7E,$00,$E6,$06,$C0,$DD,$4E
		dc.b	$01,$CB,$79,$C0,$3E,$28,$CD,$C8,$00,$C9,$DD,$7E,$18,$B7,$C8,$F8
		dc.b	$3D,$0E,$0A,$CF,$DF,$CD,$12,$10,$DD,$66,$1D,$DD,$6E,$1C,$11,$AE
		dc.b	$04,$06,$04,$DD,$4E,$19,$F5,$CB,$29,$C5,$30,$08,$86,$E6,$7F,$4F
		dc.b	$1A,$CD,$B5,$00,$C1,$13,$23,$F1,$10,$EC,$C9,$DD,$CB,$07,$7E,$C8
		dc.b	$DD,$CB,$00,$4E,$C0,$DD,$5E,$20,$DD,$56,$21,$DD,$E5,$E1,$06,$00
		dc.b	$0E,$24,$09,$EB,$ED,$A0,$ED,$A0,$ED,$A0,$7E,$CB,$3F,$12,$AF,$DD
		dc.b	$77,$22,$DD,$77,$23,$C9,$DD,$7E,$07,$B7,$C8,$FE,$80,$20,$48,$DD
		dc.b	$35,$24,$C0,$DD,$34,$24,$E5,$DD,$6E,$22,$DD,$66,$23,$DD,$5E,$20
		dc.b	$DD,$56,$21,$D5,$FD,$E1,$DD,$35,$25,$20,$17,$FD,$7E,$01,$DD,$77
		dc.b	$25,$DD,$7E,$26,$4F,$E6,$80,$07,$ED,$44,$47,$09,$DD,$75,$22,$DD
		dc.b	$74,$23,$C1,$09,$DD,$35,$27,$C0,$FD,$7E,$03,$DD,$77,$27,$DD,$7E
		dc.b	$26,$ED,$44,$DD,$77,$26,$C9,$3D,$EB,$0E,$08,$CF,$DF,$18,$03,$DD
		dc.b	$77,$25,$E5,$DD,$4E,$25,$06,$00,$09,$7E,$E1,$CB,$7F,$CA,$5D,$04
		dc.b	$FE,$82,$28,$12,$FE,$80,$28,$12,$FE,$84,$28,$11,$26,$FF,$30,$1F
		dc.b	$DD,$CB,$00,$F6,$E1,$C9,$03,$0A,$18,$D5,$AF,$18,$D2,$03,$0A,$DD
		dc.b	$86,$22,$DD,$77,$22,$DD,$34,$25,$DD,$34,$25,$18,$C5,$26,$00,$6F
		dc.b	$DD,$46,$22,$04,$EB,$19,$10,$FD,$DD,$34,$25,$C9,$DD,$66,$0E,$DD
		dc.b	$6E,$0D,$06,$00,$DD,$7E,$10,$B7,$F2,$7D,$04,$06,$FF,$4F,$09,$C9
		dc.b	$2A,$37,$1C,$3A,$19,$1C,$B7,$28,$06,$DD,$6E,$2A,$DD,$66,$2B,$AF
		dc.b	$B0,$C8,$11,$19,$00,$19,$10,$FD,$C9,$B0,$30,$38,$34,$3C,$50,$58
		dc.b	$54,$5C,$60,$68,$64,$6C,$70,$78,$74,$7C,$80,$88,$84,$8C,$40,$48
		dc.b	$44,$4C,$90,$98,$94,$9C,$11,$99,$04,$DD,$4E,$0A,$3E,$B4,$CD,$B5
		dc.b	$00,$CD,$D7,$04,$DD,$77,$1B,$06,$14,$CD,$D7,$04,$10,$FB,$DD,$75
		dc.b	$1C,$DD,$74,$1D,$C3,$9C,$0C,$1A,$13,$4E,$23,$CD,$B5,$00,$C9,$3A
		dc.b	$05,$1C,$32,$09,$1C,$3A,$06,$1C,$32,$05,$1C,$3A,$07,$1C,$32,$06
		dc.b	$1C,$AF,$32,$07,$1C,$3A,$09,$1C,$FE,$FF,$CA,$FB,$09,$FE,$33,$DA
		dc.b	$4A,$05,$FE,$E0,$DA,$99,$06,$FE,$E1,$DA,$29,$09,$FE,$E6,$D2,$29
		dc.b	$09,$D6,$E1,$21,$1C,$05,$DF,$AF,$32,$18,$1C,$E9,$45,$08,$29,$09
		dc.b	$A1,$09,$26,$05,$45,$08,$DD,$21,$F0,$1D,$06,$07,$3E,$01,$32,$19
		dc.b	$1C,$C5,$DD,$CB,$00,$7E,$C4,$45,$05,$11,$30,$00,$DD,$19,$C1,$10
		dc.b	$F0,$CD,$80,$06,$C9,$E5,$E5,$C3,$61,$0C,$D6,$01,$F8,$F5,$FE,$29
		dc.b	$C2,$CD,$05,$3A,$29,$1C,$B7,$CA,$72,$05,$AF,$32,$0A,$1C,$32,$0B
		dc.b	$1C,$32,$0C,$1C,$32,$05,$1C,$32,$06,$1C,$32,$07,$1C,$32,$09,$1C
		dc.b	$F1,$C9,$3A,$16,$1C,$FE,$29,$CA,$D0,$05,$AF,$32,$0A,$1C,$32,$0B
		dc.b	$1C,$32,$0C,$1C,$32,$05,$1C,$32,$06,$1C,$32,$07,$1C,$3A,$3E,$1C
		dc.b	$32,$2D,$1C,$3A,$08,$1C,$32,$2E,$1C,$AF,$32,$08,$1C,$21,$40,$1C
		dc.b	$11,$F0,$1D,$01,$B0,$01,$ED,$B0,$21,$F0,$1D,$11,$30,$00,$06,$09
		dc.b	$7E,$E6,$7F,$CB,$D6,$77,$19,$10,$F7,$3E,$29,$32,$16,$1C,$3A,$24
		dc.b	$1C,$32,$2C,$1C,$2A,$37,$1C,$22,$2A,$1C,$C3,$D0,$05,$CD,$29,$09
		dc.b	$F1,$F5
Z80_0x05D2:
		dc.b	$21,$48,$0B
		dc.b	$85,$6F,$8C,$95,$67,$22,$DE,$05,$3A,$48,$0B
		dc.b	$32,$3E,$1C
Z80_0x05E3:
		dc.b	$CD
		zPtrSpec   Z80BankSwitch
		dc.b	$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
		dc.b	$3E,$B6,$32,$02,$40,$00,$3E,$C0,$32,$03,$40
		dc.b	$F1,$0E,$04,$CF,$DF,$E5,$E5,$E7,$22,$37,$1C,$E1,$FD,$E1,$FD,$7E
		dc.b	$05,$32,$13,$1C,$32,$24,$1C,$11,$06,$00,$19,$22,$33,$1C,$21,$85
		dc.b	$06,$22,$35,$1C,$11,$40,$1C,$FD,$46,$02,$FD,$7E,$04,$C5,$2A,$35
		dc.b	$1C,$ED,$A0,$ED,$A0,$12,$13,$22,$35,$1C,$2A,$33,$1C,$ED,$A0,$ED
		dc.b	$A0,$ED,$A0,$ED,$A0,$22,$33,$1C,$CD,$AE,$07,$C1,$10,$DF,$FD,$7E
		dc.b	$03,$B7,$CA,$80,$06,$47,$21,$93,$06,$22,$35,$1C,$11,$60,$1D,$FD
		dc.b	$7E,$04,$C5,$2A,$35,$1C,$ED,$A0,$ED,$A0,$12,$13,$22,$35,$1C,$2A
		dc.b	$33,$1C,$01,$06,$00,$ED,$B0,$22,$33,$1C,$CD,$B5,$07,$C1,$10,$E2
		dc.b	$AF,$32,$09,$1C,$C9,$80,$06,$80,$00,$80,$01,$80,$02,$80,$04,$80
		dc.b	$05,$80,$06,$80,$80,$80,$A0,$80,$C0,$D6,$33,$B7,$C2,$A7,$06,$3A
		dc.b	$28,$1C,$EE,$01,$32,$28,$1C,$08
Z80_0x06A8:
		dc.b	$3E,	((SndBank>>$0F))
		dc.b	$CD
		zPtrSpec   Z80BankSwitch		
		dc.b	$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
Z80_0x06B7:
		dc.b	$AF,$0E,$06,$32,$19,$1C,$08,$FE,$78
		dc.b	$CA,$F5,$06,$FE,$89,$DA,$EF,$06,$F5,$47,$3A,$25,$1C,$90,$C2,$E4
		dc.b	$06,$3E,$80,$32,$26,$1C,$CF,$F1,$4F,$DF,$23,$23,$23,$7E,$32,$31
		dc.b	$1C,$C3,$80,$06,$AF,$32,$26,$1C,$F1,$32,$25,$1C,$C3,$F5,$06,$F5
		dc.b	$AF,$32,$27,$1C,$F1,$CF,$DF,$E5,$E7,$22,$39,$1C,$AF,$32,$15,$1C
		dc.b	$E1,$E5,$FD,$E1,$FD,$7E,$02,$32,$3B,$1C,$11,$04,$00,$19,$FD,$46
		dc.b	$03,$78,$32,$31,$1C,$C5,$E5,$23,$4E,$CD,$78,$07,$CB,$D6,$DD,$E5
		dc.b	$3A,$19,$1C,$B7,$28,$03,$E1,$FD,$E5,$D1,$E1,$ED,$A0,$1A,$FE,$02
		dc.b	$CC,$5E,$09,$ED,$A0,$3A,$3B,$1C,$12,$13,$ED,$A0,$ED,$A0,$ED,$A0
		dc.b	$ED,$A0,$CD,$AE,$07,$DD,$CB,$00,$7E,$28,$0C,$DD,$7E,$01,$FD,$BE
		dc.b	$01,$20,$04,$FD,$CB,$00,$D6,$E5,$2A,$39,$1C,$3A,$19,$1C,$B7,$28
		dc.b	$04,$FD,$E5,$DD,$E1,$DD,$75,$2A,$DD,$74,$2B,$CD,$58,$03,$CD,$6B
		dc.b	$09,$E1,$C1,$10,$A0,$C3,$80,$06,$CB,$79,$20,$08,$79,$CB,$57,$28
		dc.b	$1A,$3D,$18,$17,$3E,$1F,$CD,$4D,$10,$3E,$FF,$32,$11,$7F,$79,$CB
		dc.b	$3F,$CB,$3F,$CB,$3F,$CB,$3F,$CB,$3F,$C6,$02,$D6,$02,$32,$32,$1C
		dc.b	$F5,$21,$C8,$07,$DF,$E5,$DD,$E1,$F1,$21,$D8,$07,$DF,$C9,$08,$AF
		dc.b	$12,$13,$12,$13,$08,$EB,$36,$30,$23,$36,$C0,$23,$36,$01,$06,$24
		dc.b	$23,$36,$00,$10,$FB,$23,$EB,$C9,$F0,$1D,$20,$1E,$50,$1E,$80,$1E
		dc.b	$B0,$1E,$E0,$1E,$10,$1F,$10,$1F,$D0,$1C,$00,$1D,$30,$1D,$40,$1C
		dc.b	$60,$1D,$90,$1D,$C0,$1D,$C0,$1D,$21,$10,$1C,$7E,$B7,$C8,$FA,$F9
		dc.b	$07,$D1,$3D,$C0,$36,$02,$C3,$72,$09,$AF,$77,$3A,$0D,$1C,$B7,$C2
		dc.b	$29,$09,$DD,$21,$70,$1C,$06,$06,$3A,$11,$1C,$B7,$20,$06,$DD,$CB
		dc.b	$00,$7E,$28,$08,$DD,$4E,$0A,$3E,$B4,$CD,$B5,$00,$11,$30,$00,$DD
		dc.b	$19,$10,$E5,$DD,$21,$40,$1F,$06,$07,$DD,$CB,$00,$7E,$28,$0E,$DD
		dc.b	$CB,$01,$7E,$20,$08,$DD,$4E,$0A,$3E,$B4,$CD,$B5,$00,$11,$30,$00
		dc.b	$DD,$19,$10,$E5,$C9,$3E,$28,$32,$0D,$1C,$3E,$06,$32,$0F,$1C,$32
		dc.b	$0E,$1C,$AF,$32,$40,$1C,$32,$C0,$1D,$32,$60,$1D,$32,$90,$1D,$C3
		dc.b	$A1,$09,$21,$0D,$1C,$7E,$B7,$C8,$FC,$52,$08,$CB,$BE,$3A,$0F,$1C
		dc.b	$3D,$28,$04,$32,$0F,$1C,$C9,$3A,$0E,$1C,$32,$0F,$1C,$3A,$0D,$1C
		dc.b	$3D,$32,$0D,$1C,$CA,$29,$09,$3A,$3E,$1C
Z80_0x088A:
		dc.b	$21,$00,$60
		dc.b	$77,$1F,$77,$1F,$77,$1F,$77,$AF,$16,$01,$72,$77,$77,$77,$77
Z80_0x089C:
		dc.b	$DD,$21,$40,$1C
		dc.b	$06,$06,$DD,$34,$06,$F2,$AD,$08,$DD,$35,$06,$18,$11,$DD,$CB,$00
		dc.b	$7E,$28,$0B,$DD,$CB,$00,$56,$20,$05,$C5,$CD,$9C,$0C,$C1,$11,$30
		dc.b	$00,$DD,$19,$10,$DD,$C9,$3A,$29,$1C,$B7,$C8,$3A,$3E,$1C
Z80_0x08CE:
		dc.b	$CD
		zPtrSpec   Z80BankSwitch
		dc.b	$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
Z80_0x08E0:
		dc.b	$3A,$0E,$1C,$3D,$32,$0E,$1C,$C0,$3A,$0F,$1C,$32,$0E,$1C,$06,$05
		dc.b	$DD,$21,$70,$1C,$11,$30,$00,$DD,$7E,$06,$3D,$DD,$77,$06,$C5,$CD
		dc.b	$9C,$0C,$C1,$DD,$19,$10,$F0,$3A,$29,$1C,$3D,$32,$29,$1C,$C0,$06
		dc.b	$03,$DD,$21,$60,$1D,$11,$30,$00,$DD,$CB,$00,$96,$DD,$19,$10,$F8
		dc.b	$DD,$21,$40,$1C,$DD,$CB,$00,$96,$C9,$21,$0D,$1C,$11,$0E,$1C,$01
		dc.b	$C6,$03,$36,$00,$ED,$B0,$AF,$32,$08,$1C,$DD,$21,$85,$06,$06,$06
		dc.b	$C5,$CD,$DB,$09,$CD,$6B,$09,$DD,$23,$DD,$23,$C1,$10,$F2,$06,$07
		dc.b	$AF,$32,$0D,$1C,$CD,$A1,$09,$0E,$00,$3E,$2B,$CD,$C8,$00,$AF,$32
		dc.b	$12,$1C,$4F,$3E,$27,$CD,$C8,$00,$C3,$80,$06,$3E,$90,$0E,$00,$C3
		dc.b	$EF,$09,$CD,$A1,$09,$C5,$F5,$06,$03,$3E,$B4,$0E,$00,$F5,$CD,$C8
		dc.b	$00,$F1,$3C,$10,$F8,$06,$02,$3E,$B4,$F5,$CD,$D3,$00,$F1,$3C,$10
		dc.b	$F8,$0E,$00,$06,$06,$3E,$28,$F5,$CD,$C8,$00,$0C,$F1,$10,$F8,$F1
		dc.b	$C1,$C5,$06,$04,$3E,$9F,$32,$11,$7F,$C6,$20,$10,$F9,$C1,$C3,$80
		dc.b	$06,$3A,$24,$1C,$21,$13,$1C,$86,$77,$D0,$21,$4B,$1C,$11,$30,$00
		dc.b	$06,$09,$34,$19,$10,$FC,$C9,$21,$0A,$1C,$11,$05,$1C,$ED,$A0,$ED
		dc.b	$A0,$ED,$A0,$AF,$2B,$77,$2B,$77,$2B,$77,$C9,$CD,$EB,$09,$3E,$40
		dc.b	$0E,$7F,$CD,$EF,$09,$DD,$4E,$01,$C3,$64,$03,$3E,$80,$0E,$FF,$06
		dc.b	$04,$F5,$CD,$B5,$00,$F1,$C6,$04,$10,$F7,$C9,$CD,$29,$09,$3E,$01
		dc.b	$32,$3F,$1C,$E1,$C9,$AF,$32,$16,$1C,$3A,$2C,$1C,$32,$24,$1C,$3A
		dc.b	$2E,$1C,$32,$08,$1C,$2A,$2A,$1C,$22,$37,$1C
Z80_0x0A1B:
		dc.b	$3A,$2D,$1C,$32,$3E,$1C
		dc.b	$CD
		zPtrSpec   Z80BankSwitch
		dc.b	$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
Z80_0x0A33:
		dc.b	$21,$F0,$1D,$11,$40,$1C,$01,$B0,$01,$ED,$B0,$3A,$40
		dc.b	$1C,$F6,$84,$32,$40,$1C,$DD,$21,$70,$1C,$06,$08,$DD,$7E,$00,$F6
		dc.b	$84,$DD,$77,$00,$DD,$CB,$01,$7E,$C2,$73,$0A,$DD,$CB,$00,$96,$DD
		dc.b	$7E,$06,$C6,$40,$DD,$77,$06,$DD,$7E,$08,$C5,$47,$CD,$80,$04,$CD
		dc.b	$B6,$04,$C1,$11,$30,$00,$DD,$19,$10,$D2,$3E,$40,$32,$29,$1C,$3E
		dc.b	$02,$32,$0F,$1C,$32,$0E,$1C,$C9,$FF,$03,$FF,$03,$FF,$03,$FF,$03
		dc.b	$FF,$03,$FF,$03,$FF,$03,$FF,$03,$FF,$03,$F7,$03,$BE,$03,$88,$03
		dc.b	$56,$03,$26,$03,$F9,$02,$CE,$02,$A5,$02,$80,$02,$5C,$02,$3A,$02
		dc.b	$1A,$02,$FB,$01,$DF,$01,$C4,$01,$AB,$01,$93,$01,$7D,$01,$67,$01
		dc.b	$53,$01,$40,$01,$2E,$01,$1D,$01,$0D,$01,$FE,$00,$EF,$00,$E2,$00
		dc.b	$D6,$00,$C9,$00,$BE,$00,$B4,$00,$A9,$00,$A0,$00,$97,$00,$8F,$00
		dc.b	$87,$00,$7F,$00,$78,$00,$71,$00,$6B,$00,$65,$00,$5F,$00,$5A,$00
		dc.b	$55,$00,$50,$00,$4B,$00,$47,$00,$43,$00,$40,$00,$3C,$00,$39,$00
		dc.b	$36,$00,$33,$00,$30,$00,$2D,$00,$2B,$00,$28,$00,$26,$00,$24,$00
		dc.b	$22,$00,$20,$00,$1F,$00,$1D,$00,$1B,$00,$1A,$00,$18,$00,$17,$00
		dc.b	$16,$00,$15,$00,$13,$00,$12,$00,$11,$00,$10,$00,$00,$00,$00,$00
		dc.b	$84,$02,$AB,$02,$D3,$02,$FE,$02,$2D,$03,$5C,$03,$8F,$03,$C5,$03
		dc.b	$FF,$03,$3C,$04,$7C,$04,$C0,$04
BankSelector:
		dc.b	((Bank1>>$0F)),((Bank1>>$0F)),((Bank1>>$0F)),((Bank1>>$0F))
		dc.b	((Bank1>>$0F)),((Bank1>>$0F)),((Bank1>>$0F)),((Bank1>>$0F))
		dc.b	((Bank1>>$0F)),((Bank1>>$0F)),((Bank2>>$0F)),((Bank2>>$0F))
		dc.b	((Bank2>>$0F)),((Bank2>>$0F)),((Bank2>>$0F)),((Bank2>>$0F))
		dc.b	((Bank2>>$0F)),((Bank2>>$0F)),((Bank2>>$0F)),((Bank2>>$0F))
		dc.b	((Bank2>>$0F)),((Bank2>>$0F)),((Bank2>>$0F)),((Bank2>>$0F))
		dc.b	((Bank2>>$0F)),((Bank1>>$0F)),((Bank2>>$0F)),((Bank2>>$0F))
		dc.b	((Bank3>>$0F)),((Bank3>>$0F)),((Bank3>>$0F)),((Bank3>>$0F))
		dc.b	((Bank3>>$0F)),((Bank3>>$0F)),((Bank3>>$0F)),((Bank3>>$0F))
		dc.b	((Bank3>>$0F)),((Bank3>>$0F)),((Bank3>>$0F)),((Bank3>>$0F))
		dc.b	((Bank2>>$0F)),((Bank3>>$0F)),((Bank3>>$0F)),((Bank3>>$0F))	
		dc.b	((Bank3>>$0F)),((Bank0>>$0F)),((Bank2>>$0F)),((Bank0>>$0F))
		dc.b	((Bank3>>$0F)),((Bank3>>$0F))
		dc.b	$CD,$37,$03,$C0,$DD,$5E
		dc.b	$03,$DD,$56,$04,$1A,$13,$FE,$E0,$D2,$C5,$0B,$B7,$FA,$93,$0B,$1B
		dc.b	$DD,$7E,$0D,$DD,$77,$0D,$FE,$80,$CA,$B5,$0B,$CB,$BF,$D5,$08,$CD
		dc.b	$58,$03,$CD,$5E,$09,$08,$DD,$21,$40,$1C,$DD,$CB,$00,$56,$C2,$B4
		dc.b	$0B,$32,$30,$1C,$D1,$1A,$13,$B7,$F2,$05,$03,$1B,$DD,$7E,$0C,$DD
		dc.b	$77,$0B,$C3,$0B,$03,$21,$CB,$0B,$C3,$D2,$0B,$13,$C3,$84,$0B,$21
		dc.b	$DB,$0B,$E5,$D6,$E0,$21,$DF,$0B,$DF,$1A,$E9,$13,$C3,$82,$02,$33
		dc.b	$0C,$59,$0C,$5D,$0C,$61,$0C,$67,$0C,$83,$0C,$85,$0C,$BD,$0C,$C3
		dc.b	$0C,$47,$0C,$2F,$0C,$CD,$0C,$E3,$0C,$FD,$0C,$03,$0D,$10,$0D,$4F
		dc.b	$0D,$5D,$0D,$69,$0D,$11,$0E,$65,$0D,$30,$0E,$39,$0E,$3F,$0E,$56
		dc.b	$0E,$70,$0E,$83,$0E,$89,$0E,$90,$0E,$B2,$0E,$C0,$0E,$07,$0F,$0E
		dc.b	$0F,$12,$0F,$1A,$0F,$55,$0F,$63,$0F,$72,$0F,$8D,$0F,$96,$0F,$32
		dc.b	$30,$1C,$C9,$0E,$3F,$DD,$7E,$0A,$A1,$D5,$EB,$B6,$DD,$77,$0A,$4F
		dc.b	$3E,$B4,$CD,$B5,$00,$D1,$C9,$21,$27,$1C,$7E,$DD,$86,$05,$DD,$77
		dc.b	$05,$FE,$10,$CA,$57,$0C,$34,$1B,$C9,$DD,$77,$10,$C9,$32,$16,$1C
		dc.b	$C9,$CD,$DB,$09,$C3,$69,$0D,$DD,$CB,$01,$7E,$28,$0D,$CB,$3F,$CB
		dc.b	$3F,$CB,$3F,$EE,$0F,$E6,$0F,$C3,$F9,$0C,$EE,$7F,$E6,$7F,$DD,$77
		dc.b	$06,$18,$19,$13,$1A,$DD,$CB,$01,$7E,$C0,$DD,$86,$06,$F2,$99,$0C
		dc.b	$EA,$97,$0C,$AF,$C3,$99,$0C,$3E,$7F,$DD,$77,$06,$D5,$11,$AE,$04
		dc.b	$DD,$6E,$1C,$DD,$66,$1D,$06,$04,$7E,$B7,$F2,$B0,$0C,$DD,$86,$06
		dc.b	$E6,$7F,$4F,$1A,$CD,$B5,$00,$13,$23,$10,$ED,$D1,$C9,$DD,$CB,$00
		dc.b	$CE,$1B,$C9,$CD,$2D,$03,$DD,$77,$1E,$DD,$77,$1F,$C9,$13,$C6,$28
		dc.b	$4F,$06,$00,$DD,$E5,$E1,$09,$7E,$3D,$CA,$DE,$0C,$13,$C9,$AF,$77
		dc.b	$C3,$39,$0E,$DD,$CB,$01,$7E,$C8,$DD,$CB,$00,$A6,$DD,$35,$17,$DD
		dc.b	$86,$06,$FE,$0F,$DA,$F9,$0C,$3E,$0F,$DD,$77,$06,$C9,$D6,$40,$DD
		dc.b	$77,$05,$C9,$CD,$0A,$0D,$CD,$C8,$00,$C9,$EB,$7E,$23,$4E,$EB,$C9
		dc.b	$DD,$CB,$01,$7E,$20,$30,$CD,$EB,$09,$1A,$DD,$77,$08,$B7,$F2,$3C
		dc.b	$0D,$13,$1A,$DD,$77,$0F,$D5,$DD,$7E,$0F,$D6,$81,$0E,$04,$CF,$DF
		dc.b	$E7,$DD,$7E,$08,$E6,$7F,$47,$CD,$8F,$04,$18,$05,$D5,$47,$CD,$80
		dc.b	$04,$CD,$B6,$04,$D1,$C9,$B7,$F2,$35,$0E,$13,$C3,$35,$0E,$C9,$DD
		dc.b	$73,$20,$DD,$72,$21,$DD,$36,$07,$80,$13,$13,$13,$C9,$13,$DD,$CB
		dc.b	$01,$7E,$20,$01,$1A,$DD,$77,$07,$C9,$DD,$CB,$00,$BE,$3E,$1F,$32
		dc.b	$15,$1C,$CD,$58,$03,$DD,$4E,$01,$DD,$E5,$CD,$78,$07,$3A,$19,$1C
		dc.b	$B7,$28,$77,$AF,$32,$18,$1C,$E5,$2A,$37,$1C,$DD,$E1,$DD,$CB,$00
		dc.b	$96,$DD,$CB,$01,$7E,$20,$68,$DD,$CB,$00,$7E,$28,$5D,$3E,$02,$DD
		dc.b	$BE,$01,$20,$0D,$3E,$4F,$DD,$CB,$00,$46,$20,$02,$E6,$0F,$CD,$E9
		dc.b	$0E,$DD,$7E,$08,$B7,$F2,$BD,$0D,$CD,$26,$0D,$18,$3A,$47,$E5
Z80_0x0DBF:
		dc.b	$3A,$3E,$1C
		dc.b	$CD
		zPtrSpec   Z80BankSwitch		
		dc.b	$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
Z80_0x0DD4:
		dc.b	$E1,$CD,$8F,$04,$CD,$B6,$04
Z80_0x0DDB:
		dc.b	$3E,((SndBank>>$0F))
		dc.b	$CD
		zPtrSpec   Z80BankSwitch		
		dc.b	$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
		dc.b	$DD,$7E,$18,$B7,$F2,$FA
		dc.b	$0D,$DD,$5E,$19,$DD,$56,$1A,$CD,$7C,$0F,$DD,$E1,$E1,$E1,$C9,$DD
		dc.b	$CB,$00,$46,$28,$F5,$DD,$7E,$1A,$B7,$F2,$0F,$0E,$32,$11,$7F,$18
		dc.b	$E9,$DD,$CB,$01,$56,$C0,$3E,$DF,$32,$11,$7F,$1A,$DD,$77,$1A,$DD
		dc.b	$CB,$00,$C6,$B7,$20,$06,$DD,$CB,$00,$86,$3E,$FF,$32,$11,$7F,$C9
		dc.b	$DD,$CB,$01,$7E,$C8,$DD,$77,$08,$C9,$EB,$5E,$23,$56,$1B,$C9,$13
		dc.b	$C6,$28,$4F,$06,$00,$DD,$E5,$E1,$09,$7E,$B7,$20,$02,$1A,$77,$13
		dc.b	$35,$C2,$39,$0E,$13,$C9,$4F,$13,$1A,$47,$C5,$DD,$E5,$E1,$DD,$35
		dc.b	$09,$DD,$4E,$09,$DD,$35,$09,$06,$00,$09,$72,$2B,$73,$D1,$1B,$C9
		dc.b	$DD,$E5,$E1,$DD,$4E,$09,$06,$00,$09,$5E,$23,$56,$DD,$34,$09,$DD
		dc.b	$34,$09,$C9,$DD,$CB,$07,$BE,$1B,$C9,$DD,$86,$05,$DD,$77,$05,$C9
		dc.b	$3A,$26,$1C,$FE,$80,$CA,$A1,$0E,$AF,$32,$25,$1C,$32,$26,$1C,$13
		dc.b	$C9,$3A,$31,$1C,$3D,$32,$31,$1C,$C2,$39,$0E,$AF,$32,$26,$1C,$C3
		dc.b	$39,$0E,$FE,$01,$20,$05,$DD,$CB,$00,$DE,$C9,$DD,$CB,$00,$9E,$C9
		dc.b	$DD,$7E,$01,$FE,$02,$20,$2C,$DD,$CB,$00,$C6,$EB,$CD,$73,$02,$06
		dc.b	$04,$C5,$7E,$23,$E5,$21,$F7,$0E,$87,$4F,$06,$00,$09,$ED,$A0,$ED
		dc.b	$A0,$E1,$C1,$10,$EC,$EB,$1B,$3E,$4F,$32,$12,$1C,$4F,$3E,$27,$CD
		dc.b	$C8,$00,$C9,$13,$13,$13,$C9,$00,$00,$32,$01,$8E,$01,$E4,$01,$34
		dc.b	$02,$7E,$02,$C2,$02,$F0,$02,$21,$1F,$0C,$DF,$13,$1A,$E9,$32,$24
		dc.b	$1C,$C9,$DD,$E5,$CD,$F8,$04,$DD,$E1,$C9,$32,$11,$1C,$B7,$28,$1D
		dc.b	$DD,$E5,$D5,$DD,$21,$40,$1C,$06,$09,$11,$30,$00,$DD,$CB,$00,$BE
		dc.b	$CD,$5E,$03,$DD,$19,$10,$F5,$D1,$DD,$E1,$C3,$A1,$09,$DD,$E5,$D5
		dc.b	$DD,$21,$40,$1C,$06,$09,$11,$30,$00,$DD,$CB,$00,$FE,$DD,$19,$10
		dc.b	$F8,$D1,$DD,$E1,$C9,$EB,$5E,$23,$56,$23,$4E,$06,$00,$23,$EB,$ED
		dc.b	$B0,$1B,$C9,$06,$09,$21,$42,$1C,$C5,$01,$30,$00,$77,$09,$C1,$10
		dc.b	$F7,$C9,$DD,$36,$18,$80,$DD,$73,$19,$DD,$72,$1A,$21,$B2,$04,$06
		dc.b	$04,$1A,$13,$4F,$7E,$23,$CD,$B5,$00,$10,$F6,$1B,$C9,$DD,$77,$18
		dc.b	$13,$1A,$DD,$77,$19,$C9,$AF,$32,$27,$1C,$1B,$C9,$CD,$37,$03,$20
		dc.b	$0D,$CD,$74,$02,$DD,$CB,$00,$66,$C0,$CD,$9B,$03,$18,$0C,$DD,$7E
		dc.b	$1E,$B7,$28,$06,$DD,$35,$1E,$CA,$44,$10,$CD,$6C,$04,$CD,$C6,$03
		dc.b	$DD,$CB,$00,$56,$C0,$DD,$4E,$01,$7D,$E6,$0F,$B1,$32,$11,$7F,$7D
		dc.b	$E6,$F0,$B4,$0F,$0F,$0F,$0F,$32,$11,$7F,$DD,$7E,$08,$B7,$0E,$00
		dc.b	$28,$09,$3D,$0E,$0A,$CF,$DF,$CD,$12,$10,$4F,$DD,$CB,$00,$66,$C0
		dc.b	$DD,$7E,$06,$81,$CB,$67,$28,$02,$3E,$0F,$DD,$B6,$01,$C6,$10,$DD
		dc.b	$CB,$00,$46,$20,$04,$32,$11,$7F,$C9,$C6,$20,$32,$11,$7F,$C9,$DD
		dc.b	$77,$17,$E5,$DD,$4E,$17,$06,$00,$09,$7E,$E1,$CB,$7F,$28,$21,$FE
		dc.b	$83,$28,$0C,$FE,$81,$28,$13,$FE,$80,$28,$0C,$03,$0A,$18,$E0,$DD
		dc.b	$CB,$00,$E6,$E1,$C3,$44,$10,$AF,$18,$D5,$E1,$DD,$CB,$00,$E6,$C9
		dc.b	$DD,$34,$17,$C9,$DD,$CB,$00,$E6,$DD,$CB,$00,$56,$C0,$3E,$1F,$DD
		dc.b	$86,$01,$B7,$F0,$32,$11,$7F,$DD,$CB,$00,$46,$C8,$3E,$FF,$32,$11
		dc.b	$7F,$C9,$F3,$3E,$2B,$0E,$00,$CD,$C8,$00,$FB,$3A,$3F,$1C,$B7,$C2
		dc.b	$FE,$10,$3A,$30,$1C,$B7,$28,$F2,$3E,$2B,$0E,$80,$F3,$CD,$C8,$00
		dc.b	$FB,$FD,$21,$EE,$10,$21,$30,$1C,$7E,$3D,$CB,$FE,$21,$00,$80,$DF
		dc.b	$0E,$80,$7E,$32,$A3,$10,$32,$C0,$10,$23,$5E,$23,$56,$23,$7E,$23
		dc.b	$66,$6F,$06,$0A,$FB,$10,$FE,$F3,$3E,$2A,$32,$00,$40,$7E,$07,$07
		dc.b	$07,$07,$E6,$0F,$32,$BA,$10,$79,$FD,$86,$00,$32,$01,$40,$4F,$06
		dc.b	$0A,$FB,$10,$FE,$F3,$3E,$2A,$32,$00,$40,$7E,$E6,$0F,$32,$D3,$10
		dc.b	$79,$FD,$86,$00,$32,$01,$40,$FB,$4F,$3A,$30,$1C,$B7,$F2,$6A,$10
		dc.b	$23,$1B,$7A,$B3,$C2,$A2,$10,$AF,$32,$30,$1C,$C3,$62,$10,$00,$01
		dc.b	$02,$04,$08,$10,$20,$40,$80,$FF,$FE,$FC,$F8,$F0,$E0,$C0,$F3,$CD
		dc.b	$C7,$09,$3E,$2B,$32,$00,$40,$00,$3E,$80,$32,$01,$40
Z80_0x110D:
		dc.b	$3E,((SegaPCMBank>>$0F))	
		dc.b	$CD
		zPtrSpec   Z80BankSwitch	
		dc.b	$00,$00,$00,$00,$00,$00,$00,$00,$00
		dc.b	$21
		z68kPtr   SegaSnd
		dc.b	$11,$2F,$5E
		dc.b	$3E,$2A,$32,$00,$40,$00,$7E,$32,$01,$40,$3A,$0A,$1C,$FE,$FE
		dc.b	$28,$0C,$00,$00,$06,$0C,$10,$FE,$23,$1B,$7A,$B3,$20,$E9,$AF,$32
		dc.b	$3F,$1C,$21,$0D,$1C,$CD,$D3,$09,$C3,$62,$10,$FF
Z80_0x114C:
		dc.b	$21,$00,$60
		dc.b	$77,$0F,$77,$0F,$77,$0F,$77,$0F,$77,$0F,$77,$0F,$77,$0F,$77
		dc.b	$AF,$77
		dc.b	$C3,$82,$00
Z80BankSwitch0:
Z80_0x1170:
		dc.b	$21,$00,$60
		dc.b	$77
		dc.b	$1F
		dc.b	$77
		dc.b	$1F
		dc.b	$77
		dc.b	$1F
		dc.b	$77
		dc.b	$AF
		dc.b	$16,$01
		dc.b	$72
		dc.b	$77
		dc.b	$77
		dc.b	$77
		dc.b	$77
		dc.b	$C9
Z80BankSwitch:
		dc.b	$21,	$00,	$60
		dc.b	$77
		dc.b	$1F
		dc.b	$77
		dc.b	$1F
		dc.b	$77
		dc.b	$1F
		dc.b	$77
		dc.b	$1F
		dc.b	$77
		dc.b	$1F
		dc.b	$77
		dc.b	$1F
		dc.b	$77
		dc.b	$1F
		dc.b	$77
		dc.b	$1F
		dc.b	$77
		dc.b	$C9
DriverDataEnd:
;-------------------------------------------------------------------------------	
;	Filler	to	align	pointers	at	1300h	in	Z80	Ram
		dc.b	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
		dc.b	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
		dc.b	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
		dc.b	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
		dc.b	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
		dc.b	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
		dc.b	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
		dc.b	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
		dc.b	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
		dc.b	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
		dc.b	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
		dc.b	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
		dc.b	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
		dc.b	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
		dc.b	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
		dc.b	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
		dc.b	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
		dc.b	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
		dc.b	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
		dc.b	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
		dc.b	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
		dc.b	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
		dc.b	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
		dc.b	0,0,0,0,0
DriverPointers:
		zPtrSpec	MusicIndex
		zPtrSpec	UniversalVoiceBank
		zPtrSpec	MusicIndex
		zPtrSpec	SoundIndex
		zPtrSpec	PSGNoisePointers
		zPtrSpec	PSGTonePointers
		dc.w	$3300

;credit goes to Varion Icaria for finding this index
PSGNoisePointers:
		zPtrSpec	PSGN_0
		zPtrSpec	PSGN_1
		zPtrSpec	PSGN_2
		zPtrSpec	PSGN_3
		zPtrSpec	PSGN_4
		zPtrSpec	PSGN_5
		zPtrSpec	PSGN_6
		zPtrSpec	PSGN_7

PSGN_1: incbin sound/PSGN1.bin
PSGN_0: incbin sound/PSGN0.bin
PSGN_2: incbin sound/PSGN2.bin
PSGN_3: incbin sound/PSGN3.bin
PSGN_4: incbin sound/PSGN4.bin
PSGN_5: incbin sound/PSGN5.bin
PSGN_6: incbin sound/PSGN6.bin
PSGN_7: incbin sound/PSGN7.bin

;credit goes to Varion Icaria for finding this index
PSGTonePointers:
		zPtrSpec	PSGT_00
		zPtrSpec	PSGT_01
		zPtrSpec	PSGT_02
		zPtrSpec	PSGT_03
		zPtrSpec	PSGT_04
		zPtrSpec	PSGT_05
		zPtrSpec	PSGT_06
		zPtrSpec	PSGT_07
		zPtrSpec	PSGT_08
		zPtrSpec	PSGT_09
		zPtrSpec	PSGT_0A
		zPtrSpec	PSGT_0B
		zPtrSpec	PSGT_0C
		zPtrSpec	PSGT_0D
		zPtrSpec	PSGT_0E
		zPtrSpec	PSGT_0F
		zPtrSpec	PSGT_10
		zPtrSpec	PSGT_11
		zPtrSpec	PSGT_12
		zPtrSpec	PSGT_13
		zPtrSpec	PSGT_14
		zPtrSpec	PSGT_15
		zPtrSpec	PSGT_16
		zPtrSpec	PSGT_17
		zPtrSpec	PSGT_18
		zPtrSpec	PSGT_19
		zPtrSpec	PSGT_1A
		zPtrSpec	PSGT_1B
		zPtrSpec	PSGT_1C
		zPtrSpec	PSGT_1D
		zPtrSpec	PSGT_1E
		zPtrSpec	PSGT_1F
		zPtrSpec	PSGT_20
		zPtrSpec	PSGT_21
		zPtrSpec	PSGT_22
		zPtrSpec	PSGT_23
		zPtrSpec	PSGT_24
		zPtrSpec	PSGT_25
		zPtrSpec	PSGT_26

PSGT_00: incbin sound/PSGT00.bin
PSGT_01: incbin sound/PSGT01.bin
PSGT_02: incbin sound/PSGT02.bin
PSGT_03: incbin sound/PSGT03.bin
PSGT_04: incbin sound/PSGT04.bin
PSGT_05: incbin sound/PSGT05.bin
PSGT_06: incbin sound/PSGT06.bin
PSGT_07: incbin sound/PSGT07.bin
PSGT_08: incbin sound/PSGT08.bin
PSGT_09: incbin sound/PSGT09.bin
PSGT_0A: incbin sound/PSGT0A.bin
PSGT_0B: incbin sound/PSGT0B.bin
PSGT_0C: incbin sound/PSGT0C.bin
PSGT_0D: incbin sound/PSGT0D.bin
PSGT_0E: incbin sound/PSGT0E.bin
PSGT_0F: incbin sound/PSGT0F.bin
PSGT_10: incbin sound/PSGT10.bin
PSGT_11: incbin sound/PSGT11.bin
PSGT_12: incbin sound/PSGT12.bin
PSGT_13: incbin sound/PSGT13.bin
PSGT_14: incbin sound/PSGT14.bin
PSGT_15: incbin sound/PSGT15.bin
PSGT_16: incbin sound/PSGT16.bin
PSGT_17: incbin sound/PSGT17.bin
PSGT_18: incbin sound/PSGT18.bin
PSGT_19: incbin sound/PSGT19.bin
PSGT_1A: incbin sound/PSGT1A.bin
PSGT_1B: incbin sound/PSGT1B.bin
PSGT_1C: incbin sound/PSGT1C.bin
PSGT_1D: incbin sound/PSGT1D.bin
PSGT_1E: incbin sound/PSGT1E.bin
PSGT_1F: incbin sound/PSGT1F.bin
PSGT_20: incbin sound/PSGT20.bin
PSGT_21: incbin sound/PSGT21.bin
PSGT_22: incbin sound/PSGT22.bin
PSGT_23: incbin sound/PSGT23.bin
PSGT_24: incbin sound/PSGT24.bin
PSGT_25: incbin sound/PSGT25.bin
PSGT_26: incbin sound/PSGT26.bin

MusicIndex:	
ptr_mus81:		z68kPtr	Angel_Island_1_Snd
ptr_mus82:		z68kPtr	Angel_Island_2_Snd
ptr_mus83:		z68kPtr	Hydrocity_1_Snd
ptr_mus84:		z68kPtr	Hydrocity_2_Snd
ptr_mus85:		z68kPtr	Marble_Garden_1_Snd
ptr_mus86:		z68kPtr	Marble_Garden_2_Snd
ptr_mus87:		z68kPtr	Carnival_Night_1_Snd
ptr_mus88:		z68kPtr	Carnival_Night_2_Snd
ptr_mus89:		z68kPtr	Flying_Battery_1_Snd
ptr_mus8A:		z68kPtr	Flying_Battery_2_Snd
ptr_mus8B:		z68kPtr	Icecap_1_Snd
ptr_mus8C:		z68kPtr	Icecap_2_Snd
ptr_mus8D:		z68kPtr	Launch_Base_1_Snd
ptr_mus8E:		z68kPtr	Launch_Base_2_Snd
ptr_mus8F:		z68kPtr	Mushroom_Hill_1_Snd
ptr_mus90:		z68kPtr	Mushroom_Hill_2_Snd
ptr_mus91:		z68kPtr	Sandopolis_1_Snd
ptr_mus92:		z68kPtr	Sandopolis_2_Snd
ptr_mus93:		z68kPtr	Lava_Reef_1_Snd
		z68kPtr	Lava_Reef_2_Snd
		z68kPtr	Sky_Sanctuary_Snd
		z68kPtr	Death_Egg_1_Snd
		z68kPtr	Death_Egg_2_Snd
		z68kPtr	Mini_Boss_SK_Snd
		z68kPtr	Boss_Snd
		z68kPtr	The_Doomsday_Snd
		z68kPtr	Glowing_Spheres_Bonus_Stage_snd
		z68kPtr	Special_Stage_Snd
		z68kPtr	Slot_Machine_Bonus_Stage_snd
		z68kPtr	Gum_Ball_Machine_Bonus_Stage_snd
		z68kPtr	Knuckles_Theme_Snd
		z68kPtr	Azure_Lake_Snd
		z68kPtr	Balloon_Park_Snd
		z68kPtr	Desert_Palace_Snd
		z68kPtr	Chrome_Gadget_Snd
		z68kPtr	Endless_Mine_Snd
		z68kPtr	Title_Screen_Snd
		z68kPtr	Credits_Snd
		z68kPtr	Time_Game_Over_Snd
z68kPtr	Continue_Snd
		z68kPtr	Level_Results_Snd
		z68kPtr	Extra_Life_Snd
		z68kPtr	Emerald_Snd
		z68kPtr	Invincibility_Snd
		z68kPtr	Competition_Menu_Snd
		z68kPtr	Mini_Boss_Snd
		z68kPtr	Menu_Snd
		z68kPtr	Final_Boss_Snd
		z68kPtr	Underwater_Timming_Snd
		z68kPtr	Presented_by_SEGA_Snd
ptr_musend:
SoundIndex:
ptr_sndA0		z68kPtr	Sfx_34_Snd
ptr_sndA1		z68kPtr	Sfx_35_Snd
ptr_sndA2		z68kPtr	Sfx_36_Snd
ptr_sndA3		z68kPtr	Sfx_37_Snd
ptr_sndA4		z68kPtr	Sfx_38_Snd
ptr_sndA5		z68kPtr	Sfx_39_Snd
ptr_sndA6		z68kPtr	Sfx_3A_Snd
ptr_sndA7		z68kPtr	Sfx_3B_Snd
ptr_sndA8		z68kPtr	Sfx_3C_Snd
ptr_sndA9		z68kPtr	Sfx_3D_Snd
ptr_sndAA		z68kPtr	Sfx_3E_Snd
ptr_sndAB		z68kPtr	Sfx_3F_Snd
ptr_sndAC		z68kPtr	Sfx_40_Snd
ptr_sndAD		z68kPtr	Sfx_41_Snd
ptr_sndAE		z68kPtr	Sfx_42_Snd
ptr_sndAF		z68kPtr	Sfx_43_Snd
ptr_sndB0		z68kPtr	Sfx_44_Snd
ptr_sndB1		z68kPtr	Sfx_45_Snd
ptr_sndB2		z68kPtr	Sfx_46_Snd
ptr_sndB3		z68kPtr	Sfx_47_Snd
ptr_sndB4		z68kPtr	Sfx_48_Snd
ptr_sndB5		z68kPtr	Sfx_49_Snd
ptr_sndB6		z68kPtr	Sfx_4A_Snd
ptr_sndB7		z68kPtr	Sfx_4B_Snd
ptr_sndB8		z68kPtr	Sfx_4C_Snd
ptr_sndB9		z68kPtr	Sfx_4D_Snd
ptr_sndBA		z68kPtr	Sfx_4E_Snd
ptr_sndBB		z68kPtr	Sfx_4F_Snd
ptr_sndBC		z68kPtr	Sfx_50_Snd
ptr_sndBD		z68kPtr	Sfx_51_Snd
ptr_sndBE		z68kPtr	Sfx_52_Snd
ptr_sndBF		z68kPtr	Sfx_53_Snd
ptr_sndC0		z68kPtr	Sfx_54_Snd
ptr_sndC1		z68kPtr	Sfx_55_Snd
ptr_sndC2		z68kPtr	Sfx_56_Snd
ptr_sndC3		z68kPtr	Sfx_57_Snd
ptr_sndC4		z68kPtr	Sfx_58_Snd
ptr_sndC5		z68kPtr	Sfx_59_Snd
ptr_sndC6		z68kPtr	Sfx_5A_Snd
ptr_sndC7		z68kPtr	Sfx_5B_Snd
ptr_sndC8		z68kPtr	Sfx_5C_Snd
ptr_sndC9		z68kPtr	Sfx_5D_Snd
ptr_sndCA		z68kPtr	Sfx_5E_Snd
ptr_sndCB		z68kPtr	Sfx_5F_Snd
ptr_sndCC		z68kPtr	Sfx_60_Snd
ptr_sndCD		z68kPtr	Sfx_61_Snd
ptr_sndCE		z68kPtr	Sfx_62_Snd
ptr_sndCF		z68kPtr	Sfx_63_Snd
ptr_sndD0		z68kPtr	Sfx_64_Snd
		z68kPtr	Sfx_65_Snd
		z68kPtr	Sfx_66_Snd
		z68kPtr	Sfx_67_Snd
		z68kPtr	Sfx_68_Snd
		z68kPtr	Sfx_69_Snd
		z68kPtr	Sfx_6A_Snd
		z68kPtr	Sfx_6B_Snd
		z68kPtr	Sfx_6C_Snd
		z68kPtr	Sfx_6D_Snd
		z68kPtr	Sfx_6E_Snd
		z68kPtr	Sfx_6F_Snd
		z68kPtr	Sfx_70_Snd
		z68kPtr	Sfx_71_Snd
		z68kPtr	Sfx_72_Snd
		z68kPtr	Sfx_73_Snd
		z68kPtr	Sfx_74_Snd
		z68kPtr	Sfx_75_Snd
		z68kPtr	Sfx_76_Snd
		z68kPtr	Sfx_77_Snd
		z68kPtr	Sfx_78_Snd
		z68kPtr	Sfx_79_Snd
		z68kPtr	Sfx_7A_Snd
		z68kPtr	Sfx_7B_Snd
		z68kPtr	Sfx_7C_Snd
		z68kPtr	Sfx_7D_Snd
		z68kPtr	Sfx_7E_Snd
		z68kPtr	Sfx_7F_Snd
		z68kPtr	Sfx_80_Snd
		z68kPtr	Sfx_81_Snd
		z68kPtr	Sfx_82_Snd
		z68kPtr	Sfx_83_Snd
		z68kPtr	Sfx_84_Snd
		z68kPtr	Sfx_85_Snd
		z68kPtr	Sfx_86_Snd
		z68kPtr	Sfx_87_Snd
		z68kPtr	Sfx_88_Snd
		z68kPtr	Sfx_89_Snd
		z68kPtr	Sfx_8A_Snd
		z68kPtr	Sfx_8B_Snd
		z68kPtr	Sfx_8C_Snd
		z68kPtr	Sfx_8D_Snd
		z68kPtr	Sfx_8E_Snd
		z68kPtr	Sfx_8F_Snd
		z68kPtr	Sfx_90_Snd
		z68kPtr	Sfx_91_Snd
		z68kPtr	Sfx_92_Snd
		z68kPtr	Sfx_93_Snd
		z68kPtr	Sfx_94_Snd
		z68kPtr	Sfx_95_Snd
		z68kPtr	Sfx_96_Snd
		z68kPtr	Sfx_97_Snd
		z68kPtr	Sfx_98_Snd
		z68kPtr	Sfx_99_Snd
		z68kPtr	Sfx_9A_Snd
		z68kPtr	Sfx_9B_Snd
		z68kPtr	Sfx_9C_Snd
		z68kPtr	Sfx_9D_Snd
		z68kPtr	Sfx_9E_Snd
		z68kPtr	Sfx_9F_Snd
		z68kPtr	Sfx_A0_Snd
		z68kPtr	Sfx_A1_Snd
		z68kPtr	Sfx_A2_Snd
		z68kPtr	Sfx_A3_Snd
		z68kPtr	Sfx_A4_Snd
		z68kPtr	Sfx_A5_Snd
		z68kPtr	Sfx_A6_Snd
		z68kPtr	Sfx_A7_Snd
		z68kPtr	Sfx_A8_Snd
		z68kPtr	Sfx_A9_Snd
		z68kPtr	Sfx_AA_Snd
		z68kPtr	Sfx_AB_Snd
		z68kPtr	Sfx_AC_Snd
		z68kPtr	Sfx_AD_Snd
		z68kPtr	Sfx_AE_Snd
		z68kPtr	Sfx_AF_Snd
		z68kPtr	Sfx_B0_Snd
		z68kPtr	Sfx_B1_Snd
		z68kPtr	Sfx_B2_Snd
		z68kPtr	Sfx_B3_Snd
		z68kPtr	Sfx_B4_Snd
		z68kPtr	Sfx_B5_Snd
		z68kPtr	Sfx_B6_Snd
		z68kPtr	Sfx_B7_Snd
		z68kPtr	Sfx_B8_Snd
		z68kPtr	Sfx_B9_Snd
		z68kPtr	Sfx_BA_Snd
		z68kPtr	Sfx_BB_Snd
		z68kPtr	Sfx_BC_Snd
		z68kPtr	Sfx_BD_Snd
		z68kPtr	Sfx_BE_Snd
		z68kPtr	Sfx_BF_Snd
		z68kPtr	Sfx_C0_Snd
		z68kPtr	Sfx_C1_Snd
		z68kPtr	Sfx_C2_Snd
		z68kPtr	Sfx_C3_Snd
		z68kPtr	Sfx_C4_Snd
		z68kPtr	Sfx_C5_Snd
		z68kPtr	Sfx_C6_Snd
		z68kPtr	Sfx_C7_Snd
		z68kPtr	Sfx_C8_Snd
		z68kPtr	Sfx_C9_Snd
		z68kPtr	Sfx_CA_Snd
		z68kPtr	Sfx_CB_Snd
		z68kPtr	Sfx_CC_Snd
		z68kPtr	Sfx_CD_Snd
		z68kPtr	Sfx_CE_Snd
		z68kPtr	Sfx_CF_Snd
		z68kPtr	Sfx_D0_Snd
		z68kPtr	Sfx_D1_Snd
		z68kPtr	Sfx_D2_Snd
		z68kPtr	Sfx_D3_Snd
		z68kPtr	Sfx_D4_Snd
		z68kPtr	Sfx_D5_Snd
		z68kPtr	Sfx_D6_Snd
		z68kPtr	Sfx_D7_Snd
		z68kPtr	Sfx_D8_Snd
		z68kPtr	Sfx_D9_Snd
		z68kPtr	Sfx_DA_Snd
		z68kPtr	Sfx_DB_Snd
		z68kPtr	Sfx_DC_Snd
		z68kPtr	Sfx_DC_Snd
		z68kPtr	Sfx_DC_Snd
		z68kPtr	Sfx_DC_Snd
		z68kPtr	Sfx_DC_Snd
DriverPointersEnd:
ptr_sndend:

UniversalVoiceBank:
		incbin	"sound/UVB.bin"
UniversalVoiceBankEnd:
		align	$8000

DacBank0:
		incbin	"sound/DAC_0.bin"

		align	$8000
DacBank1:
		incbin	"sound/DAC_1.bin"
		align	$8000

DacBank2:
		incbin	"sound/DAC_2.bin"
		align	$8000

Bank0:
		incbin	"sound/Filler.bin"
Mini_Boss_Snd:
		incbin	"sound/MiniBoss.snd"
Final_Boss_Snd:
		incbin	"sound/F_Boss.snd"
		align	$8000

Bank1:
Angel_Island_1_Snd:
		incbin	"sound/Aiz1.snd"
Angel_Island_2_Snd:
		incbin	"sound/Aiz2.snd"
Hydrocity_1_Snd:
		incbin	"sound/HCz1.snd"
Hydrocity_2_Snd:
		incbin	"sound/HCz2.snd"
Marble_Garden_1_Snd:
		incbin	"sound/MGz1.snd"
Marble_Garden_2_Snd:
		incbin	"sound/MGz2.snd"
Carnival_Night_2_Snd:
		incbin	"sound/CNz2.snd"
Carnival_Night_1_Snd:
		incbin	"sound/CNz1.snd"
Flying_Battery_1_Snd:
		incbin	"sound/FBz1.snd"
Flying_Battery_2_Snd:
		incbin	"sound/FBz2.snd"
The_Doomsday_Snd:
		incbin	"sound/TDz.snd"
		align	$8000

Bank2:
Icecap_2_Snd:
		incbin	"sound/Iz2.snd"
Icecap_1_Snd:
		incbin	"sound/Iz1.snd"
Launch_Base_2_Snd:
		incbin	"sound/LBz2.snd"
Launch_Base_1_Snd:
		incbin	"sound/LBz1.snd"
Mushroom_Hill_1_Snd:
		incbin	"sound/MHz1.snd"
Mushroom_Hill_2_Snd:
		incbin	"sound/MHz2.snd"
Sandopolis_1_Snd:
		incbin	"sound/Sz1.snd"
Sandopolis_2_Snd:
		incbin	"sound/Sz2.snd"
Lava_Reef_1_Snd:
		incbin	"sound/LRz1.snd"
Lava_Reef_2_Snd:
		incbin	"sound/LRz2.snd"
Sky_Sanctuary_Snd:
		incbin	"sound/SCz.snd"
Death_Egg_1_Snd:
		incbin	"sound/DEz1.snd"
Death_Egg_2_Snd:
		incbin	"sound/DEz2.snd"
Mini_Boss_SK_Snd:
		incbin	"sound/MB_SK.snd"
Boss_Snd:
		incbin	"sound/Boss.snd"
Glowing_Spheres_Bonus_Stage_snd:
		incbin	"sound/GS_bs.snd"
Special_Stage_Snd:
		incbin	"sound/SS.snd"
Level_Results_Snd:
		incbin	"sound/LR.snd"
Menu_Snd:		
		incbin	"sound/Menu.snd"
		align	$8000

Bank3:
Slot_Machine_Bonus_Stage_snd:
		incbin	"sound/SM_bs.snd"
Gum_Ball_Machine_Bonus_Stage_snd:
		incbin	"sound/GBM_bs.snd"
Knuckles_Theme_Snd:
		incbin	"sound/KTE.snd"
Azure_Lake_Snd:
		incbin	"sound/ALz.snd"
Balloon_Park_Snd:
		incbin	"sound/BPz.snd"
Desert_Palace_Snd:
		incbin	"sound/DPz.snd"
Chrome_Gadget_Snd:
		incbin	"sound/CGz.snd"
Endless_Mine_Snd:
		incbin	"sound/EMz.snd"
Title_Screen_Snd:
		incbin	"sound/TS.snd"
Credits_Snd:		
		incbin	"sound/Credits.snd"
Time_Game_Over_Snd:
		incbin	"sound/TGOvr.snd"
Continue_Snd:
		incbin	"sound/Continue.snd"
Extra_Life_Snd:
		incbin	"sound/1Up.snd"
Emerald_Snd:
		incbin	"sound/Emerald.snd"
Invincibility_Snd:
		incbin	"sound/Invcblty.snd"
Competition_Menu_Snd:
		incbin	"sound/2p_Menu.snd"	
Underwater_Timming_Snd:
		incbin	"sound/Panic.Snd"
Presented_by_SEGA_Snd:
		incbin	"sound/P_Sega.Snd"
		align	$8000

SndBank:
SegaPCMBank:
SegaSnd:
		incbin	"sound/sega.snd"
Sfx_34_Snd:
		incbin	"sound/Sfx_34.Snd"
Sfx_35_Snd:
		incbin	"sound/Sfx_35.Snd"
Sfx_36_Snd:
		incbin	"sound/Sfx_36.Snd"
Sfx_37_Snd:
		incbin	"sound/Sfx_37.Snd"
Sfx_38_Snd:
		incbin	"sound/Sfx_38.Snd"
Sfx_39_Snd:
		incbin	"sound/Sfx_39.Snd"
Sfx_3A_Snd:
		incbin	"sound/Sfx_3A.Snd"
Sfx_3B_Snd:
		incbin	"sound/Sfx_3B.Snd"
Sfx_3C_Snd:
		incbin	"sound/Sfx_3C.Snd"
Sfx_3D_Snd:
		incbin	"sound/Sfx_3D.Snd"
Sfx_3E_Snd:
		incbin	"sound/Sfx_3E.Snd"
Sfx_3F_Snd:
		incbin	"sound/Sfx_3F.Snd"
Sfx_40_Snd:
		incbin	"sound/Sfx_40.Snd"
Sfx_41_Snd:
		incbin	"sound/Sfx_41.Snd"
Sfx_42_Snd:
		incbin	"sound/Sfx_42.Snd"
Sfx_43_Snd:
		incbin	"sound/Sfx_43.Snd"
Sfx_44_Snd:
		incbin	"sound/Sfx_44.Snd"
Sfx_45_Snd:
		incbin	"sound/Sfx_45.Snd"
Sfx_46_Snd:
		incbin	"sound/Sfx_46.Snd"
Sfx_47_Snd:
		incbin	"sound/Sfx_47.Snd"
Sfx_48_Snd:
		incbin	"sound/Sfx_48.Snd"
Sfx_49_Snd:
		incbin	"sound/Sfx_49.Snd"
Sfx_4A_Snd:
		incbin	"sound/Sfx_4A.Snd"
Sfx_4B_Snd:
		incbin	"sound/Sfx_4B.Snd"
Sfx_4C_Snd:
		incbin	"sound/Sfx_4C.Snd"
Sfx_4D_Snd:
		incbin	"sound/Sfx_4D.Snd"
Sfx_4E_Snd:
		incbin	"sound