-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4c3605b
commit 634baae
Showing
11 changed files
with
226 additions
and
148 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
@--------------------------------------------------------------------------------- | ||
.section .text,"ax" | ||
@--------------------------------------------------------------------------------- | ||
#include "equates.h" | ||
#include "6502mac.h" | ||
@--------------------------------------------------------------------------------- | ||
.global mapper159init | ||
|
||
counter = mapperdata+0 | ||
latch = mapperdata+4 | ||
enable = mapperdata+8 | ||
@---------------------------------------------------------------------------- | ||
mapper159init:@ Bandai | ||
@---------------------------------------------------------------------------- | ||
.word write0,write0,write0,write0 | ||
|
||
ldrb_ r1,cartflags @get cartflags | ||
bic r1,r1,#SRAM @don't use SRAM on this mapper | ||
strb_ r1,cartflags @set cartflags | ||
ldr r1,mapper159init | ||
str_ r1,writemem_tbl+12 | ||
|
||
ldr r0,=hook | ||
str_ r0,scanlinehook | ||
|
||
mov pc,lr | ||
@------------------------------------------------------- | ||
write0: | ||
@------------------------------------------------------- | ||
and addy,addy,#0x0f | ||
tst addy,#0x08 | ||
ldreq r1,=writeCHRTBL | ||
adrne r1,tbl-8*4 | ||
ldr pc,[r1,addy,lsl#2] | ||
wA: @--------------------------- | ||
and r0,r0,#1 | ||
strb_ r0,enable | ||
ldr_ r0,latch | ||
str_ r0,counter | ||
mov pc,lr | ||
wB: @--------------------------- | ||
strb_ r0,latch | ||
asdf: mov r1,#0 | ||
strb_ r1,latch+2 | ||
strb_ r1,latch+3 | ||
mov pc,lr | ||
wC: @--------------------------- | ||
strb_ r0,latch+1 | ||
b asdf | ||
|
||
tbl: .word map89AB_,mirrorKonami_,wA,wB,wC,void,void,void | ||
@------------------------------------------------------- | ||
hook: | ||
@------------------------------------------------------ | ||
ldrb_ r0,enable | ||
cmp r0,#0 | ||
beq h1 | ||
|
||
ldr_ r0,counter | ||
subs r0,r0,#113 | ||
str_ r0,counter | ||
@ bcc irq6502 | ||
bcc CheckI | ||
h1: | ||
fetch 0 | ||
@------------------------------------------------------- | ||
@.end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
@--------------------------------------------------------------------------------- | ||
.section .text,"ax" | ||
@--------------------------------------------------------------------------------- | ||
#include "equates.h" | ||
#include "6502mac.h" | ||
|
||
.global mapper42init | ||
|
||
countdown = mapperdata+0 | ||
rombank = mapperdata+1 | ||
|
||
@---------------------------------------------------------------------------- | ||
mapper42init: | ||
@---------------------------------------------------------------------------- | ||
.word chr01234567_,void,void,write3 | ||
mov addy,lr | ||
|
||
ldr r1,=rom_R60 @Swap in ROM at $6000-$7FFF. | ||
str_ r1,readmem_tbl+12 | ||
ldr r1,=empty_W @ROM. | ||
str_ r1,writemem_tbl+12 | ||
|
||
mov r0,#-1 | ||
bl map89ABCDEF_ | ||
|
||
@ ldr r0,=MMC3_IRQ_Hook | ||
@ str r0,scanlinehook | ||
|
||
mov r0,#0 | ||
bl map67_IRQ_Hook | ||
|
||
mov pc,addy | ||
|
||
@---------------------------------------------------------------------------- | ||
write0: @$8000-8001 | ||
@---------------------------------------------------------------------------- | ||
@ tst addy,#3 | ||
@ movne pc,lr | ||
b chr01234567_ | ||
@---------------------------------------------------------------------------- | ||
write3: @E000-E003 | ||
@---------------------------------------------------------------------------- | ||
and r1,addy,#3 | ||
ldr pc,[pc,r1,lsl#2] | ||
nothing: | ||
mov pc,lr | ||
@---------------------------------------------------------------------------- | ||
commandlist: .word map67_,cmd1,nothing,nothing | ||
cmd0: | ||
@ strb r1,rombank | ||
@ and r0,r0,#0xF | ||
b map67_IRQ_Hook | ||
cmd1: | ||
tst r0,#0x08 | ||
beq mirror2H_ | ||
b mirror2V_ | ||
cmd2: | ||
cmd3: | ||
@.end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.