mirror of
https://github.com/a2-4am/4cade.git
synced 2025-03-30 08:31:49 +00:00
.
This commit is contained in:
parent
2d4579946e
commit
d0609ba88d
BIN
res/hgr/ALCAZAR
Normal file
BIN
res/hgr/ALCAZAR
Normal file
Binary file not shown.
BIN
res/hgr/BELLHOP
Normal file
BIN
res/hgr/BELLHOP
Normal file
Binary file not shown.
BIN
res/hgr/BLISTER.BALL
Normal file
BIN
res/hgr/BLISTER.BALL
Normal file
Binary file not shown.
BIN
res/hgr/BUDGETRILOGY
Normal file
BIN
res/hgr/BUDGETRILOGY
Normal file
Binary file not shown.
BIN
res/hgr/CANYON.CLIMBER
Normal file
BIN
res/hgr/CANYON.CLIMBER
Normal file
Binary file not shown.
BIN
res/hgr/DAVIDS.MAGIC
Normal file
BIN
res/hgr/DAVIDS.MAGIC
Normal file
Binary file not shown.
BIN
res/hgr/DROL
Normal file
BIN
res/hgr/DROL
Normal file
Binary file not shown.
BIN
res/hgr/FS1
Normal file
BIN
res/hgr/FS1
Normal file
Binary file not shown.
BIN
res/hgr/HEAD.ON
Normal file
BIN
res/hgr/HEAD.ON
Normal file
Binary file not shown.
BIN
res/hgr/MAD.BOMBER
Normal file
BIN
res/hgr/MAD.BOMBER
Normal file
Binary file not shown.
BIN
res/hgr/MARIO.BROS
Normal file
BIN
res/hgr/MARIO.BROS
Normal file
Binary file not shown.
BIN
res/hgr/MONTEZUMA
Normal file
BIN
res/hgr/MONTEZUMA
Normal file
Binary file not shown.
Binary file not shown.
141
src/4cade.a
141
src/4cade.a
@ -2,14 +2,134 @@
|
||||
!to "build/LAUNCHER.SYSTEM",plain
|
||||
*=$2000
|
||||
|
||||
MEMFLAG = $FF ; bit 7 = 0 if 64K, 1 if 128K
|
||||
Has128KStatus =$FF ; [byte] set by Has128K
|
||||
|
||||
MACHID = $BF98 ; machine identification byte
|
||||
!source "src/constants.a"
|
||||
!source "src/macros.a"
|
||||
|
||||
lda MACHID
|
||||
and #$30
|
||||
cmp #$30 ; C=0 if 64K, C=1 if 128K
|
||||
ror MEMFLAG ; set bit 7 from C
|
||||
jsr Has128K
|
||||
- ldx #0
|
||||
beq -
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; Has128K
|
||||
; Checks whether computer has auxiliary memory (i.e. 128K)
|
||||
;
|
||||
; in: none
|
||||
; out: zero page $FF has
|
||||
; $00 = not a //e
|
||||
; $20 = //e but no 80-col card
|
||||
; $40 = 80-col card but no aux mem
|
||||
; $80 = aux mem detected (yay!)
|
||||
; all other flags clobbered
|
||||
; all registers clobbered
|
||||
; zero page $1A-$1D clobbered
|
||||
;
|
||||
; original was AUX.MEM.CHECK from "Extra K"
|
||||
; (c) 1986 Beagle Bros
|
||||
; written by Alan Bird and Mark Simonsen, 1986-03-28
|
||||
;------------------------------------------------------------------------------
|
||||
Has128K
|
||||
php
|
||||
sei
|
||||
lda $E000 ; store values from language card
|
||||
sta $1A ; (used later to determine which
|
||||
lda $D000 ; RAM bank is active and reset it)
|
||||
sta $1B
|
||||
lda $D400
|
||||
sta $1C
|
||||
lda $D800
|
||||
sta $1D
|
||||
lda ROMIN
|
||||
lda ROMIN
|
||||
lda MACHINEID
|
||||
cmp #$06
|
||||
bne @noiie
|
||||
lda SLOT3STATUS
|
||||
bmi @no80col
|
||||
lda AUXMEMSTATUS
|
||||
bmi @yesauxmem
|
||||
lda AUXZPSTATUS
|
||||
bmi @yesauxmem
|
||||
ldy #$28
|
||||
- ldx @checker,Y
|
||||
lda $100,Y
|
||||
sta @checker,Y
|
||||
txa
|
||||
sta $100,Y
|
||||
dey
|
||||
bpl -
|
||||
jmp $100
|
||||
@postcheck
|
||||
ldy #$28
|
||||
- lda @checker,Y
|
||||
sta $100,Y
|
||||
dey
|
||||
bpl -
|
||||
bcs @noauxmem
|
||||
@yesauxmem
|
||||
lda #$80
|
||||
+HIDE_NEXT_2_BYTES
|
||||
@noauxmem
|
||||
lda #$40
|
||||
+HIDE_NEXT_2_BYTES
|
||||
@no80col
|
||||
lda #$20
|
||||
+HIDE_NEXT_2_BYTES
|
||||
@noiie
|
||||
lda #$00
|
||||
sta Has128KStatus
|
||||
lda $E000
|
||||
cmp $1A
|
||||
bne @tryRAMbank1
|
||||
lda $D000
|
||||
cmp $1B
|
||||
bne @tryRAMbank1
|
||||
lda $D400
|
||||
cmp $1C
|
||||
bne @tryRAMbank1
|
||||
lda $D800
|
||||
cmp $1D
|
||||
beq @done
|
||||
@tryRAMbank1
|
||||
lda LCBANK1READ
|
||||
lda $E000
|
||||
cmp $1A
|
||||
bne @tryRAMbank2
|
||||
lda $D000
|
||||
cmp $1B
|
||||
bne @tryRAMbank2
|
||||
lda $D400
|
||||
cmp $1C
|
||||
bne @tryRAMbank2
|
||||
lda $D800
|
||||
cmp $1D
|
||||
beq @done
|
||||
@tryRAMbank2
|
||||
lda LCBANK2READ
|
||||
@done
|
||||
plp
|
||||
lda Has128KStatus
|
||||
rts
|
||||
@checker
|
||||
lda #$EE
|
||||
sta WRITEAUXMEM
|
||||
sta READAUXMEM
|
||||
sta $800
|
||||
lda $C00
|
||||
cmp #$EE
|
||||
bne @auxworks
|
||||
asl $C00
|
||||
lda $800
|
||||
cmp $C00
|
||||
bne @auxworks
|
||||
sec
|
||||
+HIDE_NEXT_BYTE
|
||||
@auxworks
|
||||
clc
|
||||
sta WRITEMAINMEM
|
||||
sta READMAINMEM
|
||||
jmp @postcheck
|
||||
|
||||
; jsr init ; initialize ProRWTS2
|
||||
; lda $C08B
|
||||
@ -27,12 +147,9 @@ MACHID = $BF98 ; machine identification byte
|
||||
; bit $C052
|
||||
; bit $C057
|
||||
; bit $C050
|
||||
- lda #0
|
||||
beq -
|
||||
|
||||
cover !byte cover_e-cover_b
|
||||
cover_b !text "COVER"
|
||||
cover_e
|
||||
;cover !byte cover_e-cover_b
|
||||
;cover_b !text "COVER"
|
||||
;cover_e
|
||||
|
||||
;LoadDHGR
|
||||
; sta $C000
|
||||
|
@ -2,9 +2,30 @@
|
||||
;(c) 2018 by 4am
|
||||
;
|
||||
|
||||
; soft switches
|
||||
STOREOFF = $C000 ; write to use following flags:
|
||||
READMAINMEM = $C002 ; write to R main mem
|
||||
READAUXMEM = $C003 ; write to R aux mem
|
||||
WRITEMAINMEM = $C004 ; write to W main mem
|
||||
WRITEAUXMEM = $C005 ; write to W aux mem
|
||||
SETMAINZP = $C008 ; write to R/W main mem zero page
|
||||
SETAUXZP = $C009 ; write to R/W aux mem zero page
|
||||
AUXMEMSTATUS = $C013 ; read high bit only
|
||||
AUXZPSTATUS = $C016 ; read high bit only
|
||||
SLOT3STATUS = $C017 ; read high bit only
|
||||
|
||||
LCBANK2READ = $C080 ; read once to R RAM bank 2 / no write
|
||||
ROMIN = $C081 ; read twice to R ROM / W RAM bank 2
|
||||
LCBANK2 = $C083 ; read twice to R/W RAM bank 2
|
||||
LCBANK1READ = $C088 ; read once to R RAM bank 1 / no write
|
||||
LCBANK1 = $C08B ; read twice to R/W RAM bank 1
|
||||
|
||||
; ROM
|
||||
MACHINEID = $FBB3
|
||||
|
||||
; zero page
|
||||
PARAM = $00 ; used by PARAMS_ON_STACK macro, so basically everywhere
|
||||
PTR = $02
|
||||
SRC = $04
|
||||
DEST = $06
|
||||
SAVE = $08
|
||||
PARAM = $00 ; used by PARAMS_ON_STACK macro, so basically everywhere
|
||||
PTR = $02
|
||||
SRC = $04
|
||||
DEST = $06
|
||||
SAVE = $08
|
||||
|
Loading…
x
Reference in New Issue
Block a user