-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/Al-Nafuur/1942-bB
- Loading branch information
Showing
8 changed files
with
507 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,4 @@ | |
**/includes.bB | ||
**/2600basic_variable_redefs.h | ||
**/*.bas.asm | ||
**/.DS_Store |
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,84 @@ | ||
; Provided under the CC0 license. See the included LICENSE.txt for details. | ||
|
||
ifconst bankswitch | ||
if bankswitch == 8 | ||
ifconst PlusROM_functions | ||
ORG $2FF0 | ||
RORG $FFF0 | ||
.byte 0 ; WriteToBuffer | ||
.byte 0 ; WriteSendBuffer | ||
.byte 0 ; ReceiveBuffer | ||
.byte $ff ; ReceiveBufferSize (none zero for detection of PlusROM support) | ||
ORG $2FFA | ||
RORG $FFFA | ||
.word (PlusROM_API) | ||
else | ||
ORG $2FFC | ||
RORG $FFFC | ||
endif | ||
endif | ||
if bankswitch == 16 | ||
ifconst PlusROM_functions | ||
ORG $4FF0 | ||
RORG $FFF0 | ||
.byte 0 ; WriteToBuffer | ||
.byte 0 ; WriteSendBuffer | ||
.byte 0 ; ReceiveBuffer | ||
.byte $ff ; ReceiveBufferSize (none zero for detection of PlusROM support) | ||
ORG $4FFA | ||
RORG $FFFA | ||
.word (PlusROM_API) | ||
else | ||
ORG $4FFC | ||
RORG $FFFC | ||
endif | ||
endif | ||
if bankswitch == 32 | ||
ifconst PlusROM_functions | ||
ORG $8FF0 | ||
RORG $FFF0 | ||
.byte 0 ; WriteToBuffer | ||
.byte 0 ; WriteSendBuffer | ||
.byte 0 ; ReceiveBuffer | ||
.byte $ff ; ReceiveBufferSize (none zero for detection of PlusROM support) | ||
ORG $8FFA | ||
RORG $FFFA | ||
.word (PlusROM_API) | ||
else | ||
ORG $8FFC | ||
RORG $FFFC | ||
endif | ||
endif | ||
if bankswitch == 64 | ||
ORG $10FF0 | ||
RORG $1FFF0 | ||
lda $ffe0 ; we use wasted space to assist stella with EF format auto-detection | ||
ORG $10FF8 | ||
RORG $1FFF8 | ||
ifconst superchip | ||
.byte "E","F","S","C" | ||
else | ||
.byte "E","F","E","F" | ||
endif | ||
ORG $10FFC | ||
RORG $1FFFC | ||
endif | ||
else | ||
ifconst ROM2k | ||
ifconst PlusROM_functions | ||
ORG $F7FA | ||
.word (PlusROM_API) | ||
else | ||
ORG $F7FC | ||
endif | ||
else | ||
ifconst PlusROM_functions | ||
ORG $FFFA | ||
.word (PlusROM_API) | ||
else | ||
ORG $FFFC | ||
endif | ||
endif | ||
endif | ||
.word (start & $ffff) | ||
.word (start & $ffff) |
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,15 @@ | ||
PlusROM_functions = 1 | ||
WriteToBuffer = $1ff0 | ||
WriteSendBuffer = $1ff1 | ||
ReceiveBuffer = $1ff2 | ||
ReceiveBufferSize = $1ff3 | ||
|
||
MAC SET_PLUSROM_API ; {1} = path, {2} = domain | ||
OLD_RORG = * | ||
REND | ||
PlusROM_API | ||
.byte {1}, 0, {2}, 0 | ||
ECHO "Size of PlusROM API definition: ", [( * - PlusROM_API )]d | ||
RORG (OLD_RORG + ( * - PlusROM_API )) | ||
ENDM | ||
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,65 @@ | ||
; Provided under the CC0 license. See the included LICENSE.txt for details. | ||
|
||
; every bank has this stuff at the same place | ||
; this code can switch to/from any bank at any entry point | ||
; and can preserve register values | ||
; note: lines not starting with a space are not placed in all banks | ||
; | ||
; line below tells the compiler how long this is - do not remove | ||
;size=35 | ||
|
||
begin_bscode | ||
ldx #$ff | ||
ifconst FASTFETCH ; using DPC+ | ||
stx FASTFETCH | ||
endif | ||
txs | ||
if bankswitch == 64 | ||
lda #(((>(start-1)) & $0F) | $F0) | ||
else | ||
lda #>(start-1) | ||
endif | ||
pha | ||
lda #<(start-1) | ||
pha | ||
|
||
BS_return | ||
pha | ||
txa | ||
pha | ||
tsx | ||
|
||
if bankswitch != 64 | ||
lda 4,x ; get high byte of return address | ||
|
||
rol | ||
rol | ||
rol | ||
rol | ||
and #bs_mask ;1 3 or 7 for F8/F6/F4 | ||
tax | ||
inx | ||
else | ||
lda 4,x ; get high byte of return address | ||
tay | ||
ora #$10 ; change our bank nibble into a valid rom mirror | ||
sta 4,x | ||
tya | ||
lsr | ||
lsr | ||
lsr | ||
lsr | ||
tax | ||
inx | ||
endif | ||
|
||
BS_jsr | ||
lda bankswitch_hotspot-1,x | ||
pla | ||
tax | ||
pla | ||
rts | ||
if ((* & $1FFF) > ((bankswitch_hotspot & $1FFF) - 1)) | ||
echo "WARNING: size parameter in banksw.asm too small - the program probably will not work." | ||
echo "Change to",[(*-begin_bscode+1)&$FF]d,"and try again." | ||
endif |
Oops, something went wrong.