diff --git a/8mb.asm b/8mb.asm index 9dec96f..cff4f09 100644 --- a/8mb.asm +++ b/8mb.asm @@ -7,7 +7,7 @@ db $04,$05,$06,$07 norom ; pc address mode org $7FFFFF -db $00 ; expand ROM to 6MB +db $00 ; expand ROM to 8MB org $407FB8 db "S","T","A","R" diff --git a/boost/LZX.asm b/boost/LZX.asm index 1547988..af96c36 100644 --- a/boost/LZX.asm +++ b/boost/LZX.asm @@ -31,8 +31,10 @@ if read1($0FFFEB) == 2 else !LZ3 = 0 +pushpc ORG $0FFFEB db $01 +pullpc endif macro ReadByte() @@ -45,12 +47,11 @@ macro ReadByte() + endmacro +pushpc org $00B8E3 -!c JSL CodeStart ;was JML before + JSL CodeStart ;was JML before RTS - -reset bytes -freecode +pullpc CodeStart: PHB diff --git a/boost/map16.asm b/boost/map16.asm index 48c3b45..a283399 100644 --- a/boost/map16.asm +++ b/boost/map16.asm @@ -1,19 +1,19 @@ @include +pushpc ORG $0586DD BEQ + ORG $0586E9 + ORG $0586DF -!c JML KeepLoading + JML KeepLoading ORG $0585FF -!c JSL CallSA1 + JSL CallSA1 RTS +pullpc -freecode - CallSA1: SEP #$20 LDA.B #SA1Code diff --git a/boost/oam.asm b/boost/oam.asm index 8ade98c..5590117 100644 --- a/boost/oam.asm +++ b/boost/oam.asm @@ -1,5 +1,7 @@ @include +pushpc + ORG $008494 LDA.B #CompressOAM STA $3180 @@ -12,9 +14,7 @@ ORG $008494 NOP #34 ; freespace warnpc $0084C8 -!c (read1($008494+1)<<0)|(read1($008494+2+3+1)<<8)|(read1($008494+2+3+2+3+1)<<16) - -freecode cleaned +pullpc CompressOAM: PHB diff --git a/boost/sprites.asm b/boost/sprites.asm index dc6ae6e..3de3969 100644 --- a/boost/sprites.asm +++ b/boost/sprites.asm @@ -2,12 +2,18 @@ !Wiggers = $418800 ; Don't touch! +pushpc + +ORG $03D7AB + JML ReznorFix +ReznorFix_Return: + RTS ORG $00BFC5 -!c JML CheckForSA1 + JML CheckForSA1 ORG $01808C -!c JML SpriteMain + JML SpriteMain NOP #2 ORG $01CC28 @@ -91,16 +97,16 @@ ORG $01C804 LDA #$05 STA $2253 STZ $2254 -!c JSL Continue_01C804 + JSL Continue_01C804 warnpc $01C84D ORG $03DEDF -!c JML Mode7Stuff + JML Mode7Stuff NOP #2 Mode7Continue: ORG $03DD7D -!c JML MoreMode7 + JML MoreMode7 Mode7MoreContinue: ORG $03DDE3 @@ -129,7 +135,7 @@ ORG $03995E LDA #$38 LDY $07 BNE + -!c JML Continue_03995E + JML Continue_03995E NOP Return_03995E: LDA $2307 @@ -276,10 +282,40 @@ macro Switch() STA $0185 endmacro -;=======================================; -; Freespace code ; -;=======================================; -freecode +pullpc + +ReznorFix: + %Switch() + LDA #$D0 + STA $2209 + SEP #$10 +- LDA $018A + BEQ - + STZ $018A + JML .Return +ReznorFix_SNES: + REP #$31 + LDA.L $7F837B + TAX + LDA.W #$C05A + ADC $00 + STA.L $7F837D,X + ORA.W #$2000 + STA.L $7F8383,X + LDA.W #$0240 + STA.L $7F837F,X + STA.L $7F8385,X + LDA.W #$38FC + STA.L $7F8381,X + STA.L $7F8387,X + LDA.W #$00FF + STA.L $7F8389,X + TXA + CLC + ADC.W #$000C + STA.L $7F837B + SEP #$30 + RTL CheckForSA1: ; CPU: ??? PHA ; Preserve A diff --git a/lunar fix.txt b/lunar fix.txt index 50f0f27..23053e7 100644 --- a/lunar fix.txt +++ b/lunar fix.txt @@ -1,3 +1,3 @@ This version does not include Lunar Fix anymore, since if I update Lunar Fix, I would need to update the SA-1 Pack too. So that's why Lunar Fix is not included anymore. You can get Lunar -Fix at SA-1 Compatible Tools or here: https://dl.dropbox.com/u/16203903/A/SA1/Tools/LunarFix101.zip \ No newline at end of file +Fix at SA-1 Compatible Tools. \ No newline at end of file diff --git a/readme.txt b/readme.txt index be9ce0c..a7d9ba1 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ \___ \ / /\ \______| | | ___/ _` |/ __| |/ / ____) / ____ \ | | | | | (_| | (__| < |_____/_/ \_\ |_| |_| \__,_|\___|_|\_\ - by Vitor Vilela Version 1.02 + by Vitor Vilela Version 1.03 The SA-1 Pack consist of a couple of patches that enable SA-1 and prepare your SMW ROM to use the SA-1 CPU in the @@ -362,7 +362,7 @@ CustomCode: ;*put code here*; RTL However freecode/freedata will not work with Asar when you are -accessing the 4MB+ area, atleast until Alcaro adds "sa1rom full" +accessing the 4MB+ area, atleast until Alcaro adds "bigsa1rom" to Asar (if he hasn't implemented it already). ----------------------------------------------------- diff --git a/sa1.asm b/sa1.asm index 09da350..18eeb66 100644 --- a/sa1.asm +++ b/sa1.asm @@ -1,27 +1,12 @@ @asar 1.31 ;===============================================; -; SA-1 Pack v1.02 ; +; SA-1 Pack v1.03 ; ; by Vitor Vilela ; ;===============================================; sa1rom ;\ Don't touch! !c = autoclean ;/ -; Various remappings -incsrc "remap/dp.asm" -incsrc "remap/addr.asm" -incsrc "remap/sram.asm" -incsrc "remap/map16.asm" - -; Game Boosts -incsrc "boost/oam.asm" -incsrc "boost/sprites.asm" -incsrc "boost/map16.asm" -incsrc "boost/lzx.asm" - -!FPS_PLUS = $00 ; Increases FPS on bsnes/unknown emulators. ($01 - Enable, $00 - Disable) - ; WARNING: This command adds VARIOUS hacks. - !SLOTSUSED = $66FE ; Don't change these defines below! !CCDMA_TABLE = $3190 ; !CCDMA_SLOTS = $317F ; @@ -32,6 +17,11 @@ incsrc "boost/lzx.asm" ; Hijacks ; ;===============================================; +incsrc "remap/dp.asm" ; Remaps $7E:0000-$7E:00FF +incsrc "remap/addr.asm" ; Remaps $7E:0100-$7E:1FFF +incsrc "remap/sram.asm" ; Remaps SRAM +incsrc "remap/map16.asm" ; Remaps Map16 + org $FFFC ;\ Change Reset Vector. dw Reset2 ;/ @@ -49,7 +39,7 @@ ORG $8A53 ; Hijack ClearStack. !c JSL ClearStack ; to make clear new RAM area. RTS ; -!c JML DynamicBank ; $008A58 - Dynamic Bank Allocation System (DBAS). + NOP #4 ; $008A58 - Unused now. !c JML ResetBanks ; $008A5C - Reset Bank Allocation BankSwitch: ;\ $008A60 - Default Bank Switch db $80,$81,$82,$83 ;/ @@ -94,10 +84,10 @@ ORG $843B ;===============================================; ; A is 16-bit, X is 8-bit. -macro transferslot(slot, bytes) - LDA.W #$7C00+(*256) ;\ VRAM address + line*slot +macro transferslot(slot, bytes, shift) + LDA.W #$7C00+(*256)+ ;\ VRAM address + line*slot STA.W $2116 ;/ - LDA.W #(!DSX_BUFFER&65535)+(*512) ;\ Set Buffer location + LDA.W #(!DSX_BUFFER&65535)+(*512)+(*2) ;\ Set Buffer location STA.W $4302 ;/ LDA.W # ;\ Set bytes to transfer STA.W $4305 ;/ @@ -111,9 +101,6 @@ macro ccdmaslot(slot) BMI ?NormalDMA ; If is >= #$80, it's normal DMA STY $2231 ; Otherwise store the CDMA register value. ; - LDY $318E ;\ But if the emulator is ZSNES, - BMI ?NormalDMA ;/ don't execute Character Conversion DMA. - ; ; LDA.W !CCDMA_TABLE+(*8)+3 ;\ Set source of bitmap in BW-RAM. STA $2232 ; | (Both SA-1 and CPU Register.) @@ -125,6 +112,9 @@ macro ccdmaslot(slot) LDA.W #!CC_BUFFER ;\ Set I-RAM buffer. STA $2235 ;/ (This is used as buffer in conversion, like the echo buffer.) ; + LDY $318E + BMI + + CLI ;\ Wait for SA-1 CCDMA. - LDY $318D ; | (probably it's doing the first character conversion) BEQ - ; | @@ -132,7 +122,7 @@ macro ccdmaslot(slot) STY $318D ; | SEI ;/ ; - LDA.W !CCDMA_TABLE+(*8)+6 ;\ Store size of conversion+transfer ++ LDA.W !CCDMA_TABLE+(*8)+6 ;\ Store size of conversion+transfer STA $4305 ;/ LDA.W !CCDMA_TABLE+(*8)+1 ;\ Store VRAM address. STA $2116 ;/ @@ -176,10 +166,10 @@ endmacro ;===============================================; freecode - -;===============================================; -; Extra Routines ; -;===============================================; +incsrc "boost/oam.asm" ; OAM speed up. +incsrc "boost/sprites.asm" ; Sprites speed up. +incsrc "boost/map16.asm" ; Level speed up. +incsrc "boost/lzx.asm" ; LZ2 or LZ3 speed up. ResetBanks: ; Reset Bank Switch to Default. BIT $318E ; Overflow = Swap bug flag. @@ -193,35 +183,6 @@ ResetBanks: ; Reset Bank Switch to Default. BPL - ;/ RTL ; Return -; X - PC high byte to convert (pc >> 16 & 0xff) -; -; Returns: -; A - Bank byte to use -; X/Y - Register used. -DynamicBank: - LDY #$03 ; Bank Register to store (FXB) - LDA $03,S ; Get Program Bank of source code. - CMP #$A0-1 ;\ If is >=#$A0 - BCC + ;/ - DEY ; Change Bank Register to EXB. -+ TXA ;\ Get PC bank 4-bit higher value. - LSR ; | - LSR ; | - LSR ; | - LSR ;/ - BIT $318E ;\ Invert bit 4 if Swap bug is present. - BVC + ; | - EOR #$04 ;/ -+ ORA #$80 ;\ Store to Bank Register. - STA $2220,Y ;/ - TXA ;\ Get lower 4-bit value of PC bank. - AND #$0F ;/ - TYX ; Bank Register -> X - ORA.L .Table-2,X ; Set Base bank to $00 - RTL ; Return. -.Table - db $E0,$F0 - ClearStack: ; Based from QuickROM, by Alcaro. SEP #$20 ; 8-bit A ; @@ -235,7 +196,7 @@ ClearStack: ; Based from QuickROM, by Alcaro. ; LDA $6100 ;\ Don't waste time if game mode isn't 00 BNE .DoNotWasteTime ;/ - LDX #$0D80 ;\ Wait for SPC700 + LDX #$1000 ;\ Wait for SPC700 - DEX ; | BPL - ;/ .DoNotWasteTime ; @@ -264,10 +225,6 @@ ClearStack: ; Based from QuickROM, by Alcaro. PLB ; Restore Bank RTL ; Return -;===============================================; -; SNES CPU Code ; -;===============================================; - SwapDetected: REP #$28 ;\ Custom code for SEP #$50 ; | SNES9X 8MB ROM bug. @@ -324,29 +281,6 @@ SNES_Reset: ; Super NES Reset PHK ;\ Set bank PLB ;/ ; -if !FPS_PLUS == 1 ; ------------- FPS++ CODE --------------- - STZ $2121 ; CGRAM Address - LDY #$00 ; Loop Index - ; -- LDA $213B ;\ If palette is not same as - CMP PaletteTable,y ; | SNES9X inits, break the loop. - CLC ; | - BNE .FinalResult ; | - LDA $213B ; | - BNE .FinalResult ;/ - INY ;\ Or continue. - CPY #$08 ; | - BNE - ;/ - ; - SEC ;\ If carry = 1, it's SNES9X. -.FinalResult ; | - LDA #$02 ; | - BCS + ; | - LDA #$00 ; | -+ TSB $318E ;/ - ; -endif ; ------------- END OF FPS++ CODE ------------ - ; REP #$30 ;\ Transfer RAM Program LDA #RAMCode_End-RAMCode-1 ; | LDX #RAMCode ; | @@ -372,12 +306,6 @@ endif ; ------------- END OF FPS++ CODE ------------ + JSR $1E85 ; Wait for SA-1. ; JML $008000 ; Don't reenabling emulation mode to don't reset Stack and Direct Page. - -if !FPS_PLUS == 1 -PaletteTable: ; SNES9X inits with that palette. - db $00,$04,$08,$0C ; (High byte is always 00). - db $10,$14,$18,$1C ; -endif WaitForHBlank: BIT $318E ;\ If ZSNES, instead of @@ -386,8 +314,11 @@ WaitForHBlank: - DEY ; | BNE - ; | JML $008448 ;/ + ++ DEY #4 + BRA + -- LDY #$20 ;\ Wait For H-Blank +- LDY #$20-4 ;\ Wait For H-Blank + BIT $4212 ; | BVS - ; | - BIT $4212 ; | @@ -414,16 +345,25 @@ base off .End IRQStart: ; IRQ Start - PHP ;\ Preserve P/A/X/Y/B - REP #$30 ; | + PHP ; + REP #$30 ; + PHA ; + PHX ; + PHY ; + PHB ; + PHK ; + PLB ; + SEP #$30 ; + ; + LDA $4211 ;\ If this is not a PPU IRQ, + BPL .OtherIRQ ;/ skip to OtherIRQ + ; + LDA #$00 ;\ Return to SMW's IRQ routine PHA ; | - PHX ; | - PHY ; | - PHB ; | - PHK ; | PLB ; | - SEP #$30 ;/ - ; + JML $008385 ;/ + +.OtherIRQ LDA #$20 ;\ If this isn't a CCDMA, goto SA-1 IRQ BIT $2300 ; | BEQ .NotCCDMA ;/ @@ -442,7 +382,7 @@ IRQStart: ; IRQ Start RTI ;/ ; ------------------------------ .NotCCDMA ; - BPL .PPUFire ; If not a SA-1 IRQ, goto PPU IRQ + BPL .UnknownIRQ ; If not a SA-1 IRQ, goto UnknownIRQ ; LDA #$80 ;\ Clear IRQ from SA-1 STA $2202 ;/ @@ -470,27 +410,9 @@ IRQStart: ; IRQ Start LDA $4211 ;\ If IRQ not fired, return. BPL .UnknownIRQ ;/ ; -.PPUFired ; - LDA #$00 ;\ Return to SMW's IRQ routine - PHA ; | - PLB ; | - JML $008385 ;/ - - -IntercalateNMI: ; - BIT #$10 ;\ If bit 5 in $318E is set, - BNE + ;/ Don't run Character Conversion DMA, but Dynamic Sprites. - LDA #$20 ;\ Toggle bit 5 - TSB $318E ;/ - JMP Character_Conversion_DMA ; Jump to CCDMA routine. - ; -+ LDA #$20 ;\ Toggle bit 5 - TRB $318E ;/ - JMP Dynamic_Sprites ; Jump to Dynamic Sprites routine. NMIStart: - ;SEI ; Disable IRQ - PHP ;\ Preserve P/A/X/Y/B + PHP ;\ REP #$30 ; | PHA ; | PHX ; | @@ -500,10 +422,6 @@ NMIStart: PLB ; | SEP #$30 ;/ ; - LDA $318E ;\ If Intercalate NMI is set, - LSR ; | goto special code. - BCS IntercalateNMI ;/ - ; Character_Conversion_DMA: ; CCDMA Routine. LDA !CCDMA_SLOTS ;\ If there are no slots to transfer, BNE + ; | jump to Dynamic_Sprites. @@ -537,12 +455,7 @@ CCDMA_END: ; ; SEP #$20 ; 8-bit A STZ !CCDMA_SLOTS ; Clear CCDMA Slots - ; - LDA $318E ;\ if NMI intercalate is NOT set, - LSR ; | run Dynamic_Sprites, otherwise, - BCC Dynamic_Sprites ;/ return. - JML $008172 ; to here. - + ; Dynamic_Sprites: ; -------------------------------------- LDA !SLOTSUSED ; Load Dynamic Sprites Slots BNE + ; Don't return to NMI if there are slots to transfer. @@ -553,43 +466,11 @@ Dynamic_Sprites: ; -------------------------------------- JMP (.DSX_MODES-2,x) ;/ .DSX_MODES: ; Dynamic Sprites Slot. - dw .TRANSFER_ONE ; 01 - One slot transfer. - dw .TRANSFER_TWO ; 02 - Two slots transfer. - dw .TRANSFER_THREE ; 03 - Three slots transfer. - dw .TRANSFER_FOUR ; 04 - Transfer four slots. - ; 05-FF - This will be fun. - -; Character Conversion DMA Table: -; $0000+x - Character Conversion Settings. 80+ will act like a normal DMA transfer. -; $0001+x - VRAM target (low). -; $0002+x - VRAM target (high). -; $0003+x - Data location (low). -; $0004+x - Data location (high). -; $0005+x - Data location (bank). -; $0006+x - Length of data (low) -; $0007+x - Length of data (high) -; ... Up to 10 slots, this means that the table will need 80 bytes. - -; SP4 diagram: -; * = 8x8 block -; 1 = slot 1 tile -; 2 = slot 2 tile -; 3 = slot 3 tile -; 4 = slot 4 tile - -; SP4 is 128x64 and dynamic area is 128x32. -; 1 1 1 1|2 2 2 2|3 3 3 3|4 4 4 4 -; 1 1 1 1|2 2 2 2|3 3 3 3|4 4 4 4 -; 1 1 1 1|2 2 2 2|3 3 3 3|4 4 4 4 -; 1 1 1 1|2 2 2 2|3 3 3 3|4 4 4 4 - -; transfer one slot will need four dmas, -; transfer two slots will need four dmas too, -; transfer three slots will need four dmas too, -; transfer four slots will need only one slot... + dw .TRANSFER_ONE ; 01 - One slot transfer. + dw .TRANSFER_TWO ; 02 - Two slots transfer. + dw .TRANSFER_THREE ; 03 - Three slots transfer. + dw .TRANSFER_FOUR ; 04 - Transfer four slots. -; whatever, setupping four DMAs isn't too waste time than sending all at once. - .TRANSFER_ONE: ; Transfer one slot. REP #$20 ; 16-bit A LDY #$80 ;\ Setup DMA @@ -600,10 +481,10 @@ Dynamic_Sprites: ; -------------------------------------- STY $4304 ;/ LDY #$01 ; This value is written to $420B ; - %transferslot(0, $0080) ; Transfer Slot 1, line 1. - %transferslot(1, $0080) ; Transfer Slot 1, line 2. - %transferslot(2, $0080) ; Transfer Slot 1, line 3. - %transferslot(3, $0080) ; Transfer Slot 1, line 4. + %transferslot(0, $0080, $C0) ; Transfer Slot 1, line 1. + %transferslot(1, $0080, $C0) ; Transfer Slot 1, line 2. + %transferslot(2, $0080, $C0) ; Transfer Slot 1, line 3. + %transferslot(3, $0080, $C0) ; Transfer Slot 1, line 4. ; DEY ;\ Zero slots used. STY !SLOTSUSED ;/ @@ -620,10 +501,10 @@ Dynamic_Sprites: ; -------------------------------------- STY $4304 ;/ LDY #$01 ; This value is written to $420B ; - %transferslot(0, $0100) ; Transfer Slot 1 & 2, line 1. - %transferslot(1, $0100) ; Transfer Slot 1 & 2, line 2. - %transferslot(2, $0100) ; Transfer Slot 1 & 2, line 3. - %transferslot(3, $0100) ; Transfer Slot 1 & 2, line 4. + %transferslot(0, $0100, $80) ; Transfer Slot 1 & 2, line 1. + %transferslot(1, $0100, $80) ; Transfer Slot 1 & 2, line 2. + %transferslot(2, $0100, $80) ; Transfer Slot 1 & 2, line 3. + %transferslot(3, $0100, $80) ; Transfer Slot 1 & 2, line 4. ; DEY ;\ Zero slots used. STY !SLOTSUSED ;/ @@ -640,10 +521,10 @@ Dynamic_Sprites: ; -------------------------------------- STY $4304 ;/ LDY #$01 ; This value is written to $420B ; - %transferslot(0, $0180) ; Tranfer Slot 1, 2 & 3, line 1. - %transferslot(1, $0180) ; Tranfer Slot 1, 2 & 3, line 2. - %transferslot(2, $0180) ; Tranfer Slot 1, 2 & 3, line 3. - %transferslot(3, $0180) ; Tranfer Slot 1, 2 & 3, line 4. + %transferslot(0, $0180, $40) ; Tranfer Slot 1, 2 & 3, line 1. + %transferslot(1, $0180, $40) ; Tranfer Slot 1, 2 & 3, line 2. + %transferslot(2, $0180, $40) ; Tranfer Slot 1, 2 & 3, line 3. + %transferslot(3, $0180, $40) ; Tranfer Slot 1, 2 & 3, line 4. ; DEY ;\ Zero slots used. STY !SLOTSUSED ;/ @@ -694,10 +575,7 @@ SA1_Reset: ; LDA #$FF ; | STA $222A ;/ ; - STZ $2214 ;\ Clear V-Count trigger. - STZ $2215 ;/ - ; - LDA #$F0 ;\ Enable IRQ from S-CPU + LDA #$B0 ;\ Enable IRQ from S-CPU STA $220A ; | Enable IRQ from DMA STA $220B ;/ Enable NMI from S-CPU ; @@ -708,8 +586,6 @@ SA1_Reset: ; LDA #$50 ;\ Enable dynamic NMI/IRQ vector. STA $2209 ;/ ; - STZ $2210 ; Disable IRQ by timer trigging. - ; STZ $3200 ;\ Clear $3200, $3000 and $318F STZ $318F ; | STZ $00 ;/ @@ -736,67 +612,20 @@ SA1_Reset: ; ;\ A = 0xFFFF STA $0189 ;/ Tell S-CPU to continue processing ; - REP #$20 ; 16-bit A - LDA #$0100 ;\ Set Direct Page. - TCD ;/ - ; -if !FPS_PLUS == 1 ; ------------ FPS++ CODE -------------- - LDA #MainLoop_WithTimer ;\ Set From Pointer. - STA $01 ;/ - SEP #$20 ; 8-bit A - ; - LDA $8E ;\ If ZSNES or SNES9X, use the standard pointer. - BMI ++ ; | - BIT #$02 ; | - BEQ + ;/ + PEA $0100 ;\ Set DP to $0100 + PLD ;/ ; -++ LDA.B #MainLoop_Standard ;\ Set From Pointer - STA $01 ; | - LDA.B #MainLoop_Standard>>8 ; | - STA $02 ;/ - ; -+ LDY.B #18-1 ;\ Transfer main loop -- LDA ($01),y ; | - STA $0160,y ; | - DEY ; | - BPL - ;/ - ; - JMP $0160 ; Jump to Main Loop -else ; ----------- END OF FPS++ CODE ---------- - SEP #$20 ;\ Old "Main Loop" -- LDA $8B ; | - BEQ - ;/ -endif ; +- LDA $8B ;\ Loop until a Parallel Mode is enabled + BEQ - ;/ (or wait for a IRQ for SNES call) ; ParallelMode: ; PHK ;\ Jump to Parallel Address PEA.w .End-1 ; | JML [$3186] ;/ .End ; - STZ $8B ;$018B ;\ Clear Parallel Flag and Return to Main Loop. -if !FPS_PLUS == 1 ; | - JMP $0160 ; | -else ; | - BRA - ; | -endif ;/ - -if !FPS_PLUS == 1 ; -MainLoop_Standard: ;3+2+3 = 8 -- LDA $8B ;$018B ;\ If parallel mode is not set, - BEQ - ;/ loop. - JMP ParallelMode ; Otherwise, jump to parallel mode routine. - ; -MainLoop_WithTimer: ;2+2+3+2+3+1+3+2 = 4+5+4+5 = 9+9 = 18 -- LDA $8B ;$018B ;\ If parallel mode is set... - BEQ + ;/ - JMP ParallelMode ; ...goto parallel mode routine. -+ LDA #$02 ;\ Enable firing a IRQ by timer - STA $2210 ;/ - WAI ; Wait for IRQ. - STZ $2210 ; Disable firing IRQ by timer - BRA - ; and return to main loop. -endif ; - + STZ $8B ;\ Clear Parallel Flag and Return to Main Loop. + BRA - ;/ + SA1_IRQ: ; SA-1 CPU IRQ ;PHP ;\ Preserve P/A/X/Y/D/B REP #$30 ; | @@ -853,18 +682,6 @@ dw ProcessRequest ; #$00 - Process Request (aka Jump to Code) dw EnableChvDMA ; #$01 - Enable Character Conversion DMA #1 dw DisableDMA ; #$02 - Disable DMA / Character Conversion DMA dw ProcessIRQRequest ; #$03 - IRQ Compatible Process Request -;dw NoMessage ; #$04 -;dw NoMessage ; #$05 -;dw NoMessage ; #$06 -;dw NoMessage ; #$07 -;dw NoMessage ; #$08 -;dw NoMessage ; #$09 -;dw NoMessage ; #$0A -;dw NoMessage ; #$0B -;dw NoMessage ; #$0C -;dw NoMessage ; #$0D -;dw NoMessage ; #$0E -;dw NoMessage ; #$0F ProcessRequest: LDA #$B0 ;\ Clear IRQ from S-CPU