add Pay Day

This commit is contained in:
4am 2024-04-03 19:56:08 -04:00
parent 90f1d0b4bc
commit 9dc81d9c67
86 changed files with 314 additions and 79 deletions

Binary file not shown.

BIN
res/ACTION.DHGR/PAY.DAY Normal file

Binary file not shown.

8
res/ATTRACT/PAY.DAY Normal file
View File

@ -0,0 +1,8 @@
#
# Attract mode for PAY.DAY
# This file is automatically generated
#
PAY.DAY=B
[eof]

Binary file not shown.

Binary file not shown.

View File

@ -51,6 +51,7 @@
00001,MICROCHESS=MicroChess
00001,NINE.MENS=Nine Men's Morris
10001,ONE.ON.ONE=One on One
01100,PAY.DAY=Pay Day
00001,PENSATE=Pensate
00001,PITSTOP.II=Pitstop II
10001,POOL=Pool

View File

@ -5,6 +5,7 @@
BATTLE.CHESS
TEST.DRIVE5=TEST.DRIVE
SS.BASKETBALL3=SS.BASKETBALL
PAY.DAY
CALI.GAMES3=CALI.GAMES
SS.FOOTBALL2=SS.FOOTBALL
WINTER.EDITION5=WINTER.EDITION

View File

@ -14,5 +14,6 @@ SUMMER.EDITION
WORLD.GAMES
SS.BASKETBALL
SLICKS
PAY.DAY
[eof]

BIN
res/TITLE.DHGR/PAY.DAY Normal file

Binary file not shown.

Binary file not shown.

View File

@ -13,6 +13,7 @@
- MicroChess
- Mu Torere
- Nine Men's Morris
- Pay Day
- Reversi
- Rock & Scroll
- Seega

View File

@ -9,7 +9,7 @@
compressed_data
!bin "src/OBJ.X"
DECRUNCH_FORWARDS = 1
FORWARD_DECRUNCHING = 1
SHOW_PROGRESS_DURING_DECRUNCH = 0
!src "../common/src/exodecrunch.a"

View File

@ -42,6 +42,7 @@ MIXEDGFX = $C053
PAGE1 = $C054 ; page 1 (affects text, HGR, DHGR)
PAGE2 = $C055 ; page 2 (affects text, HGR, DHGR)
HIRES = $C057
AUXMOVE = $C311
ROM_TEXT = $FB2F
ROM_FINALIZE_RESET = $FB6F
ROM_MACHINEID = $FBB3

View File

@ -171,6 +171,7 @@ decrunch:
sta $05A8+(20-(kExoProgressWidth/2))+kExoProgressWidth+1
lda #$A8+(20-(kExoProgressWidth/2))
sta ExoProgressPtr+1
decrunch_no_reset_progress:
}
; -------------------------------------------------------------------
; init zeropage, x and y regs. (12 bytes)
@ -242,17 +243,6 @@ no_fixup_lohi:
!ifndef FORWARD_DECRUNCHING {
!set FORWARD_DECRUNCHING = 1
}
!if FORWARD_DECRUNCHING = 0 {
literal_start1:
tya
bne no_hi_decr
dec zp_dest_hi
no_hi_decr:
dey
jsr get_crunched_byte
sta (zp_dest_lo),y
} else {
literal_start1:
!IF SHOW_PROGRESS_DURING_DECRUNCH = 1 {
dec ExoProgressCounter
@ -263,7 +253,15 @@ ExoProgressPtr
inc ExoProgressPtr+1
+
}
!if FORWARD_DECRUNCHING = 0 {
tya
bne no_hi_decr
dec zp_dest_hi
no_hi_decr:
dey
jsr get_crunched_byte
sta (zp_dest_lo),y
} else {
jsr get_crunched_byte
sta (zp_dest_lo),y
iny

View File

@ -9,7 +9,7 @@
compressed_data
!bin "src/OBJ.X"
DECRUNCH_FORWARDS = 1
FORWARD_DECRUNCHING = 1
SHOW_PROGRESS_DURING_DECRUNCH = 1
kExoProgressWidth = 18 ; depends on total size, max 38
!src "../common/src/exodecrunch.a"

View File

@ -9,7 +9,7 @@
compressed_data
!bin "src/OBJ.X"
DECRUNCH_FORWARDS = 1
FORWARD_DECRUNCHING = 1
SHOW_PROGRESS_DURING_DECRUNCH = 1
kExoProgressWidth = 14 ; depends on total size, max 38
!src "../common/src/exodecrunch.a"

View File

@ -10,7 +10,7 @@
compressed_data
!bin "src/BANNER.X"
!bin "src/OBJ.X"
DECRUNCH_FORWARDS = 1
FORWARD_DECRUNCHING = 1
SHOW_PROGRESS_DURING_DECRUNCH = 0
!src "../common/src/exodecrunch.a"

View File

@ -9,7 +9,7 @@
compressed_data
!bin "src/OBJ.X"
DECRUNCH_FORWARDS = 1
FORWARD_DECRUNCHING = 1
SHOW_PROGRESS_DURING_DECRUNCH = 1
kExoProgressWidth = 19 ; depends on total size, max 38
!src "../common/src/exodecrunch.a"

View File

@ -11,7 +11,7 @@ credits
!bin "src/CREDITS"
compressed_data
!bin "src/OBJ.X"
DECRUNCH_FORWARDS = 1
FORWARD_DECRUNCHING = 1
SHOW_PROGRESS_DURING_DECRUNCH = 0
!src "../common/src/exodecrunch.a"

View File

@ -9,7 +9,7 @@
compressed_data
!bin "src/OBJ.X"
DECRUNCH_FORWARDS = 1
FORWARD_DECRUNCHING = 1
SHOW_PROGRESS_DURING_DECRUNCH = 0
!src "../common/src/exodecrunch.a"

View File

@ -9,7 +9,7 @@
compressed_data
!bin "src/OBJ.X"
DECRUNCH_FORWARDS = 1
FORWARD_DECRUNCHING = 1
SHOW_PROGRESS_DURING_DECRUNCH = 1
kExoProgressWidth = 18 ; depends on total size, max 38
!src "../common/src/exodecrunch.a"

View File

@ -9,7 +9,7 @@
compressed_data
!bin "src/OBJ.X"
DECRUNCH_FORWARDS = 1
FORWARD_DECRUNCHING = 1
SHOW_PROGRESS_DURING_DECRUNCH = 1
kExoProgressWidth = 18 ; depends on total size, max 38
!src "../common/src/exodecrunch.a"

View File

@ -0,0 +1,53 @@
# https://sourceforge.net/projects/acme-crossass/
ACME=acme
# https://github.com/mach-kernel/cadius
CADIUS=cadius
# note: flags set to decrunch backwards
EXOMIZER=exomizer mem -lnone -P23 -q
BUILDDIR=build
DISKVOLUME=PAY.DAY
LOADER=$(BUILDDIR)/LOADER.SYSTEM\#FF2000
EXE=$(BUILDDIR)/PAY.DAY\#060800
COMPRESSED=src/AUXOBJ.X
SOURCES=$(wildcard src/*.a) $(COMPRESSED)
RES=$(wildcard res/*) $(wildcard ../common/res/*)
BUILDDISK=$(BUILDDIR)/$(DISKVOLUME).po
.PHONY: clean mount all
$(BUILDDISK): $(EXE) $(LOADER) $(RES)
$(LOADER): $(SOURCES) | $(BUILDDIR)
$(ACME) src/loader.a
$(CADIUS) REPLACEFILE "$(BUILDDISK)" "/$(DISKVOLUME)/" "$(LOADER)" -C
@touch "$@"
$(EXE): $(SOURCES) $(COMPRESSED) | $(BUILDDIR)
$(ACME) src/pay.day.a
$(CADIUS) REPLACEFILE "$(BUILDDISK)" "/$(DISKVOLUME)/" "$(EXE)" -C
@touch "$@"
$(RES): $(BUILDDIR)
$(CADIUS) REPLACEFILE "$(BUILDDISK)" "/$(DISKVOLUME)/" "$@" -C
@touch "$@"
$(COMPRESSED):
$(EXOMIZER) src/AUXOBJ@0x3000 -o "$@"
$(EXOMIZER) src/OBJ@0x4000 -o res/OBJ.X\#060000
mount: $(BUILDDISK)
@open "$(BUILDDISK)"
clean:
rm -rf "$(BUILDDIR)"
$(BUILDDIR):
mkdir -p "$@"
$(CADIUS) CREATEVOLUME "$(BUILDDISK)" "$(DISKVOLUME)" 140KB -C
all: clean mount
.NOTPARALLEL:

View File

@ -0,0 +1,33 @@
WINDOWS is $3908/$8A01 (compressed/decompressed)
can be decompressed to anywhere because it immediately gets moved to auxmem ($800+, $4000+)
(code for this is in LD.SYSTEM)
*must* be decompressed backwards because there literally isn't room to fit both ($C309) in mainmem
PAYDAY is $30CC/$7616
decompressed to $4000/main
loads PAYINTRO (title screen) then PAYINTRO2 (credits code) then BOARD (game screen)
XXXXX PAYINTRO is $13CB/$3FF8
XXXXX is DHGR title screen, could be rearranged so mainmem data is first, then
XXXXX decompressed into $2000-$5FF8 then copy $4000/main to $2000/aux
XXXXX but this would have to happen before loading PAYDAY
PAYINTRO2 displays secondary title/credits screen with resume prompt
BOARD is DHGR screen of game board, loaded once at start of game
no disk access once game starts (unless you save)
after end of game, jumps to $4000 (code from PAYDAY, still in place)
to reload and redisplay title screen
so PAYDAY is persistent in mainmem, WINDOWS is persistent in auxmem,
and everything else is transient and reloaded
LD.SYSTEM is loaded by ProDOS during boot but never reloaded,
can be named anything.SYSTEM
idea: WINDOWS.X and PAYDAY.X can both fit in mainmem at the same time,
could potentially copy compressed WINDOWS.X to auxmem and duplicate
exodecrunch in auxmem, then decompress directly into auxmem
(would require either no progress bar or bank switching during progress update)

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
res/ports/pay-day/src/OBJ Normal file

Binary file not shown.

View File

@ -0,0 +1,35 @@
!cpu 6502
*=$2000
!to "build/LOADER.SYSTEM#FF2000",plain
STAGE2 = $BA00
PREFIX_BUFFER = $BB00
!src "../common/src/constants.a"
!src "../common/src/macros.a"
!src "../common/src/prodos.init.a"
+SHORT_COPY move_stage2_start, move_stage2_end, STAGE2
jmp STAGE2
move_stage2_start
!pseudopc STAGE2 {
+READ_ENTIRE_FILE parm_boot_open, parm_boot_read
jmp (entry)
parm_boot_open
!byte 3
!word filename
!word PREFIX_BUFFER
!byte 0
parm_boot_read
!byte 4
!byte 1
entry !word $0800
!word $FFFF
!word 0
filename
!text 7,"PAY.DAY"
}
move_stage2_end

View File

@ -0,0 +1,84 @@
!cpu 6502
*=$0800
!to "build/PAY.DAY#060800",plain
!src "../common/src/constants.a"
!src "../common/src/macros.a"
+INIT_MACHINE
jsr decrunch ; decompress code to go into auxmem (originally WINDOWS file)
lda #$00 ; move code from original game (LD.SYSTEM)
sta $3C
lda #$30
sta $3D
lda #$00
sta $42
lda #$08
sta $43
lda #$1C
sta $3E
lda #$47
sta $3F
sec
jsr AUXMOVE
lda #$1D
sta $3C
lda #$47
sta $3D
lda #$00
sta $42
lda #$40
sta $43
lda #$1C
sta $3E
lda #$BA
sta $3F
sec
jsr AUXMOVE
+READ_ENTIRE_FILE parm_obj_x_open, parm_obj_x_read
lda #$D4
sta _byte_lo
lda #$50
sta _byte_hi
jsr decrunch_no_reset_progress
!if * != $879 {
!serious "Adjust prelaunch to patch JSR at ", *
}
jmp $4000
parm_obj_x_open
!byte 3
!word filename
!word $1C00
!byte 0
parm_obj_x_read
!byte 4
!byte 1
!word $2000
!word $FFFF
!word 0
filename
!text 5,"OBJ.X"
get_crunched_byte
lda _byte_lo
bne +
dec _byte_hi
+ dec _byte_lo
_byte_lo = * + 1
_byte_hi = * + 2
lda end_of_compressed_data
rts
FORWARD_DECRUNCHING = 0
SHOW_PROGRESS_DURING_DECRUNCH = 1
kExoProgressWidth = 24 ; depends on total size, max 38
!src "../common/src/exodecrunch.a"
compressed_data
!bin "src/AUXOBJ.X"
end_of_compressed_data

View File

@ -11,7 +11,7 @@ title
!bin "src/TITLE.7E9C"
compressed_data
!bin "src/OBJ.X"
DECRUNCH_FORWARDS = 1
FORWARD_DECRUNCHING = 1
SHOW_PROGRESS_DURING_DECRUNCH = 1
kExoProgressWidth = 10 ; depends on total size, max 38
!src "../common/src/exodecrunch.a"

View File

@ -10,7 +10,7 @@
compressed_data
!bin "src/OBJ.X"
DECRUNCH_FORWARDS = 1
FORWARD_DECRUNCHING = 1
SHOW_PROGRESS_DURING_DECRUNCH = 1
kExoProgressWidth = 18 ; depends on total size, max 38
!src "../common/src/exodecrunch.a"

View File

@ -9,7 +9,7 @@
compressed_data
!bin "src/OBJ.X"
DECRUNCH_FORWARDS = 1
FORWARD_DECRUNCHING = 1
SHOW_PROGRESS_DURING_DECRUNCH = 1
kExoProgressWidth = 18 ; depends on total size, max 38
!src "../common/src/exodecrunch.a"

View File

@ -9,7 +9,7 @@
compressed_data
!bin "src/OBJ.X"
DECRUNCH_FORWARDS = 1
FORWARD_DECRUNCHING = 1
SHOW_PROGRESS_DURING_DECRUNCH = 1
kExoProgressWidth = 19 ; depends on total size, max 38
!src "../common/src/exodecrunch.a"

View File

@ -9,7 +9,7 @@
compressed_data
!bin "src/OBJ.X"
DECRUNCH_FORWARDS = 1
FORWARD_DECRUNCHING = 1
SHOW_PROGRESS_DURING_DECRUNCH = 1
kExoProgressWidth = 13 ; depends on total size, max 38
!src "../common/src/exodecrunch.a"

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 2144467
!be24 2165856
!le16 571

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 2131775
!be24 2153108
!le16 978

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 2123047
!be24 2144293
!le16 329

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 2124832
!le16 601
!be24 2146104
!le16 608

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 2127011
!be24 2148290
!le16 563

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 2129814
!le16 876
!be24 2151119
!le16 890

View File

@ -3,4 +3,4 @@
;
; This file is automatically generated
;
!word 40
!word 41

View File

@ -3,4 +3,4 @@
;
; This file is automatically generated
;
!word 61
!word 62

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 2145038
!be24 2166427
!le16 306

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 2145688
!be24 2167077
!le16 336

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 2146024
!be24 2167413
!le16 303

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 1728254
!be24 1749500
!le16 69

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 2135393
!be24 2156726
!le16 1640

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 2145420
!be24 2166809
!le16 67

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 2144455
!be24 2165844
!le16 12

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 2143593
!le16 810
!be24 2164968
!le16 824

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 2141585
!le16 243
!be24 2162946
!le16 257

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 2132753
!be24 2154086
!le16 2640

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 2137391
!le16 1085
!be24 2158724
!le16 1099

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 2145344
!be24 2166733
!le16 76

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 2144403
!be24 2165792
!le16 52

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 2145487
!be24 2166876
!le16 201

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 2141828
!be24 2163203
!le16 350

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 2142178
!be24 2163553
!le16 129

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 2142307
!be24 2163682
!le16 92

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 2142399
!be24 2163774
!le16 192

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 2142591
!be24 2163966
!le16 713

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 2143304
!be24 2164679
!le16 285

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 2143589
!be24 2164964
!le16 4

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 2146327
!be24 2167716
!le16 2370

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 2139596
!le16 563
!be24 2160943
!le16 577

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 2140159
!be24 2161520
!le16 526

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 2130690
!le16 1085
!be24 2152009
!le16 1099

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 580139
!be24 597035
!le16 8184

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 596515
!be24 613411
!le16 8184

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 588323
!be24 605219
!le16 8192

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 2122101
!be24 2143347
!le16 946

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 2123376
!le16 1456
!be24 2144622
!le16 1482

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 2125433
!be24 2146712
!le16 1578

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 2127574
!le16 2240
!be24 2148853
!le16 2266

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 2137033
!be24 2158366
!le16 358

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 2138476
!be24 2159823
!le16 1120

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 2140685
!be24 2162046
!le16 900

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 2121595
!be24 2142841
!le16 506

19
src/prelaunch/pay.day.a Normal file
View File

@ -0,0 +1,19 @@
;license:MIT
!cpu 6502
!to "build/PRELAUNCH.INDEXED/PAY.DAY",plain
*=$106
!source "src/prelaunch/common.a"
+ENABLE_ACCEL
lda #$4C
sta $879
jsr $800
+DISABLE_ACCEL
+RESET_VECTOR $100
jmp $87C
!if * > $1C0 {
!error "code is too large, ends at ", *
}