mirror of
https://github.com/a2-4am/4sports.git
synced 2024-12-21 08:31:23 +00:00
source code for some recent ports
This commit is contained in:
parent
2dae78bc67
commit
995e099c07
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,3 +1,3 @@
|
||||
.DS_Store
|
||||
__pycache__
|
||||
/build/
|
||||
build
|
||||
|
BIN
res/ports/common/res/PRODOS#FF0000
Normal file
BIN
res/ports/common/res/PRODOS#FF0000
Normal file
Binary file not shown.
71
res/ports/common/src/constants.a
Normal file
71
res/ports/common/src/constants.a
Normal file
@ -0,0 +1,71 @@
|
||||
;license:MIT
|
||||
;(c) 2024 by 4am
|
||||
;
|
||||
|
||||
!ifndef _CONSTANTS_ {
|
||||
|
||||
SELF_MODIFIED_BYTE = $FD
|
||||
SELF_MODIFIED_WORD = $FDFD
|
||||
|
||||
; standard memory addresses
|
||||
CH = $24
|
||||
CV = $25
|
||||
BASL = $28
|
||||
INVFLG = $32
|
||||
RWTS_PTR = $48
|
||||
RNDL = $4E
|
||||
RNDH = $4F
|
||||
PRODOS_MLI = $BF00
|
||||
PRODOS_BOOT_UNIT = $BF30
|
||||
PRODOS_MEMORY_MAP = $BF58
|
||||
PRODOS_MACHID = $BF98
|
||||
KBD = $C000
|
||||
CLEARKBD = $C010
|
||||
STOREOFF = $C000 ; STA then use the following 4 flags:
|
||||
READMAINMEM = $C002 ; STA to read from main mem
|
||||
READAUXMEM = $C003 ; STA to read from aux mem
|
||||
WRITEMAINMEM = $C004 ; STA to write to main mem
|
||||
WRITEAUXMEM = $C005 ; STA to write to aux mem
|
||||
CLR80VID = $C00C ; 40 columns
|
||||
PRIMARYCHARSET = $C00E ; no mousetext for you
|
||||
ALTCHARSET = $C00F ; yay mousetext
|
||||
CLEARKBD = $C010 ; clear last key pressed
|
||||
SLOT3STATUS = $C017 ; bit 7 only
|
||||
MONOCOLOR = $C021 ; IIgs bit 7 switches composite mono/color modes
|
||||
TBCOLOR = $C022 ; IIgs text foreground and background colors (also VidHD but write-only)
|
||||
NEWVIDEO = $C029 ; IIgs graphics modes (also VidHD)
|
||||
CLOCKCTL = $C034 ; bits 0-3 are IIgs border color (also VidHD)
|
||||
GFXMODE = $C050
|
||||
TEXTMODE = $C051
|
||||
FULLGFX = $C052
|
||||
MIXEDGFX = $C053
|
||||
PAGE1 = $C054 ; page 1 (affects text, HGR, DHGR)
|
||||
PAGE2 = $C055 ; page 2 (affects text, HGR, DHGR)
|
||||
HIRES = $C057
|
||||
ROM_TEXT = $FB2F
|
||||
ROM_FINALIZE_RESET = $FB6F
|
||||
ROM_MACHINEID = $FBB3
|
||||
ROM_BASCALC = $FBC1
|
||||
ROM_HOME = $FC58
|
||||
ROM_CLREOL_FROM_Y = $FC9E
|
||||
ROM_WAIT = $FCA8
|
||||
ROM_KEYIN = $FD1B
|
||||
ROM_COUT = $FDED
|
||||
ROM_INVERSE = $FE80 ; INVERSE text
|
||||
ROM_NORMAL = $FE84 ; NORMAL text (instead of INVERSE or FLASH)
|
||||
ROM_IN0 = $FE89 ; SETKBD
|
||||
ROM_PR0 = $FE93 ; SETVID
|
||||
|
||||
; ProDOS constants
|
||||
CMD_QUIT = $65
|
||||
CMD_ONLINE = $C5
|
||||
CMD_SETPREFIX = $C6
|
||||
CMD_GETPREFIX = $C7
|
||||
CMD_OPEN = $C8
|
||||
CMD_READ = $CA
|
||||
CMD_WRITE = $CB
|
||||
CMD_CLOSE = $CC
|
||||
CMD_SEEK = $CE
|
||||
|
||||
_CONSTANTS_=*
|
||||
}
|
489
res/ports/common/src/exodecrunch.a
Normal file
489
res/ports/common/src/exodecrunch.a
Normal file
@ -0,0 +1,489 @@
|
||||
; This source code is altered and is not the original version found on
|
||||
; the Exomizer homepage.
|
||||
; It contains modifications made by qkumba to depack a packed file
|
||||
; optionally crunched forward, and additional modifications by 4am
|
||||
; for an optional progress UI.
|
||||
;
|
||||
; Original copyright statement follows:
|
||||
;
|
||||
; Copyright (c) 2002 - 2018 Magnus Lind.
|
||||
;
|
||||
; This software is provided 'as-is', without any express or implied warranty.
|
||||
; In no event will the authors be held liable for any damages arising from
|
||||
; the use of this software.
|
||||
;
|
||||
; Permission is granted to anyone to use this software for any purpose,
|
||||
; including commercial applications, and to alter it and redistribute it
|
||||
; freely, subject to the following restrictions:
|
||||
;
|
||||
; 1. The origin of this software must not be misrepresented; you must not
|
||||
; claim that you wrote the original software. If you use this software in a
|
||||
; product, an acknowledgment in the product documentation would be
|
||||
; appreciated but is not required.
|
||||
;
|
||||
; 2. Altered source versions must be plainly marked as such, and must not
|
||||
; be misrepresented as being the original software.
|
||||
;
|
||||
; 3. This notice may not be removed or altered from any distribution.
|
||||
;
|
||||
; 4. The names of this software and/or it's copyright holders may not be
|
||||
; used to endorse or promote products derived from this software without
|
||||
; specific prior written permission.
|
||||
;
|
||||
; -------------------------------------------------------------------
|
||||
; The decruncher jsr:s to the get_crunched_byte address when it wants to
|
||||
; read a crunched byte into A. This subroutine has to preserve X and Y
|
||||
; register and must not modify the state of the carry nor the overflow flag.
|
||||
; -------------------------------------------------------------------
|
||||
;.import get_crunched_byte
|
||||
; -------------------------------------------------------------------
|
||||
; this function is the heart of the decruncher.
|
||||
; It initializes the decruncher zeropage locations and precalculates the
|
||||
; decrunch tables and decrunches the data
|
||||
; This function will not change the interrupt status bit and it will not
|
||||
; modify the memory configuration.
|
||||
; -------------------------------------------------------------------
|
||||
;.export decrunch
|
||||
|
||||
; -------------------------------------------------------------------
|
||||
; Controls if the shared get_bits routines should be inlined or not.
|
||||
;INLINE_GET_BITS=1
|
||||
; -------------------------------------------------------------------
|
||||
; if literal sequences is not used (the data was crunched with the -c
|
||||
; flag) then the following line can be uncommented for shorter and.
|
||||
; slightly faster code.
|
||||
;LITERAL_SEQUENCES_NOT_USED = 1
|
||||
; -------------------------------------------------------------------
|
||||
; if the sequence length is limited to 256 (the data was crunched with
|
||||
; the -M256 flag) then the following line can be uncommented for
|
||||
; shorter and slightly faster code.
|
||||
;MAX_SEQUENCE_LENGTH_256 = 1
|
||||
; -------------------------------------------------------------------
|
||||
; if the sequence length 3 has its own offset table then the following
|
||||
; line can be uncommented for in some situations slightly better
|
||||
; compression at the cost of a larger decrunch table.
|
||||
EXTRA_TABLE_ENTRY_FOR_LENGTH_THREE = 1
|
||||
; -------------------------------------------------------------------
|
||||
; optional progress UI
|
||||
!IFNDEF SHOW_PROGRESS_DURING_DECRUNCH {
|
||||
!set SHOW_PROGRESS_DURING_DECRUNCH = 0
|
||||
}
|
||||
; -------------------------------------------------------------------
|
||||
; zero page addresses used
|
||||
; -------------------------------------------------------------------
|
||||
zp_len_lo = $a7
|
||||
zp_len_hi = $a8
|
||||
|
||||
zp_src_lo = $ae
|
||||
zp_src_hi = zp_src_lo + 1
|
||||
|
||||
zp_bits_hi = $fc
|
||||
|
||||
zp_bitbuf = $fd
|
||||
zp_dest_lo = zp_bitbuf + 1 ; dest addr lo
|
||||
zp_dest_hi = zp_bitbuf + 2 ; dest addr hi
|
||||
|
||||
!IFDEF EXTRA_TABLE_ENTRY_FOR_LENGTH_THREE {
|
||||
encoded_entries = 68
|
||||
} ELSE {
|
||||
encoded_entries = 52
|
||||
}
|
||||
|
||||
tabl_bi = decrunch_table
|
||||
tabl_lo = decrunch_table + encoded_entries
|
||||
tabl_hi = decrunch_table + encoded_entries * 2
|
||||
|
||||
;; refill bits is always inlined
|
||||
!MACRO mac_refill_bits {
|
||||
pha
|
||||
jsr get_crunched_byte
|
||||
rol
|
||||
sta zp_bitbuf
|
||||
pla
|
||||
}
|
||||
|
||||
!IFDEF INLINE_GET_BITS {
|
||||
!MACRO mac_get_bits {
|
||||
adc #$80 ; needs c=0, affects v
|
||||
asl
|
||||
bpl gb_skip
|
||||
gb_next:
|
||||
asl zp_bitbuf
|
||||
bne gb_ok
|
||||
mac_refill_bits
|
||||
gb_ok:
|
||||
rol
|
||||
bmi gb_next
|
||||
gb_skip:
|
||||
bvc skip
|
||||
gb_get_hi:
|
||||
sec
|
||||
sta zp_bits_hi
|
||||
jsr get_crunched_byte
|
||||
skip:
|
||||
}
|
||||
} ELSE {
|
||||
!MACRO mac_get_bits {
|
||||
jsr get_bits
|
||||
}
|
||||
get_bits:
|
||||
adc #$80 ; needs c=0, affects v
|
||||
asl
|
||||
bpl gb_skip
|
||||
gb_next:
|
||||
asl zp_bitbuf
|
||||
bne gb_ok
|
||||
+mac_refill_bits
|
||||
gb_ok:
|
||||
rol
|
||||
bmi gb_next
|
||||
gb_skip:
|
||||
bvs gb_get_hi
|
||||
rts
|
||||
gb_get_hi:
|
||||
sec
|
||||
sta zp_bits_hi
|
||||
jmp get_crunched_byte
|
||||
}
|
||||
; -------------------------------------------------------------------
|
||||
; no code below this comment has to be modified in order to generate
|
||||
; a working decruncher of this source file.
|
||||
; However, you may want to relocate the tables last in the file to a
|
||||
; more suitable address.
|
||||
; -------------------------------------------------------------------
|
||||
|
||||
; -------------------------------------------------------------------
|
||||
; jsr this label to decrunch, it will in turn init the tables and
|
||||
; call the decruncher
|
||||
; no constraints on register content, however the
|
||||
; decimal flag has to be #0 (it almost always is, otherwise do a cld)
|
||||
decrunch:
|
||||
|
||||
!IF SHOW_PROGRESS_DURING_DECRUNCH = 1 {
|
||||
ldx #(kExoProgressWidth+2)
|
||||
lda #$DF
|
||||
- sta $0528+(20-(kExoProgressWidth/2))-1, x
|
||||
sta $05A8+(20-(kExoProgressWidth/2))-1, x
|
||||
dex
|
||||
bpl -
|
||||
lda #$20
|
||||
sta $05A8+(20-(kExoProgressWidth/2))-1
|
||||
sta $05A8+(20-(kExoProgressWidth/2))+kExoProgressWidth+1
|
||||
lda #$A8+(20-(kExoProgressWidth/2))
|
||||
sta ExoProgressPtr+1
|
||||
}
|
||||
; -------------------------------------------------------------------
|
||||
; init zeropage, x and y regs. (12 bytes)
|
||||
;
|
||||
ldy #0
|
||||
ldx #3
|
||||
init_zp:
|
||||
jsr get_crunched_byte
|
||||
sta zp_bitbuf - 1,x
|
||||
dex
|
||||
bne init_zp
|
||||
; -------------------------------------------------------------------
|
||||
; calculate tables (62 bytes) + get_bits macro
|
||||
; x and y must be #0 when entering
|
||||
;
|
||||
clc
|
||||
table_gen:
|
||||
tax
|
||||
tya
|
||||
and #$0f
|
||||
sta tabl_lo,y
|
||||
beq shortcut ; start a new sequence
|
||||
; -------------------------------------------------------------------
|
||||
txa
|
||||
adc tabl_lo - 1,y
|
||||
sta tabl_lo,y
|
||||
lda zp_len_hi
|
||||
adc tabl_hi - 1,y
|
||||
shortcut:
|
||||
sta tabl_hi,y
|
||||
; -------------------------------------------------------------------
|
||||
lda #$01
|
||||
sta <zp_len_hi
|
||||
lda #$78 ; %01111000
|
||||
+mac_get_bits
|
||||
; -------------------------------------------------------------------
|
||||
lsr
|
||||
tax
|
||||
beq rolled
|
||||
php
|
||||
rolle:
|
||||
asl zp_len_hi
|
||||
sec
|
||||
ror
|
||||
dex
|
||||
bne rolle
|
||||
plp
|
||||
rolled:
|
||||
ror
|
||||
sta tabl_bi,y
|
||||
bmi no_fixup_lohi
|
||||
lda zp_len_hi
|
||||
stx zp_len_hi
|
||||
!BYTE $24
|
||||
no_fixup_lohi:
|
||||
txa
|
||||
; -------------------------------------------------------------------
|
||||
iny
|
||||
cpy #encoded_entries
|
||||
bne table_gen
|
||||
; -------------------------------------------------------------------
|
||||
; prepare for main decruncher
|
||||
ldy zp_dest_lo
|
||||
stx zp_dest_lo
|
||||
stx zp_bits_hi
|
||||
; -------------------------------------------------------------------
|
||||
; copy one literal byte to destination (11(10) bytes)
|
||||
;
|
||||
!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
|
||||
bne +
|
||||
lda #$20
|
||||
ExoProgressPtr
|
||||
sta $0500 ; SMC lo byte
|
||||
inc ExoProgressPtr+1
|
||||
+
|
||||
}
|
||||
|
||||
jsr get_crunched_byte
|
||||
sta (zp_dest_lo),y
|
||||
iny
|
||||
bne no_hi_incr
|
||||
inc zp_dest_hi
|
||||
no_hi_incr:
|
||||
}
|
||||
; -------------------------------------------------------------------
|
||||
; fetch sequence length index (15 bytes)
|
||||
; x must be #0 when entering and contains the length index + 1
|
||||
; when exiting or 0 for literal byte
|
||||
next_round:
|
||||
dex
|
||||
lda zp_bitbuf
|
||||
no_literal1:
|
||||
asl
|
||||
bne nofetch8
|
||||
jsr get_crunched_byte
|
||||
rol
|
||||
nofetch8:
|
||||
inx
|
||||
bcc no_literal1
|
||||
sta zp_bitbuf
|
||||
; -------------------------------------------------------------------
|
||||
; check for literal byte (2 bytes)
|
||||
;
|
||||
beq literal_start1
|
||||
; -------------------------------------------------------------------
|
||||
; check for decrunch done and literal sequences (4 bytes)
|
||||
;
|
||||
cpx #$11
|
||||
!IFDEF INLINE_GET_BITS {
|
||||
bcc skip_jmp
|
||||
jmp exit_or_lit_seq
|
||||
skip_jmp:
|
||||
} ELSE {
|
||||
bcs exit_or_lit_seq
|
||||
}
|
||||
; -------------------------------------------------------------------
|
||||
; calulate length of sequence (zp_len) (18(11) bytes) + get_bits macro
|
||||
;
|
||||
lda tabl_bi - 1,x
|
||||
+mac_get_bits
|
||||
adc tabl_lo - 1,x ; we have now calculated zp_len_lo
|
||||
sta zp_len_lo
|
||||
!IFNDEF MAX_SEQUENCE_LENGTH_256 {
|
||||
lda zp_bits_hi
|
||||
adc tabl_hi - 1,x ; c = 0 after this.
|
||||
sta zp_len_hi
|
||||
; -------------------------------------------------------------------
|
||||
; here we decide what offset table to use (27(26) bytes) + get_bits_nc macro
|
||||
; z-flag reflects zp_len_hi here
|
||||
;
|
||||
ldx zp_len_lo
|
||||
} ELSE {
|
||||
tax
|
||||
}
|
||||
lda #$e1
|
||||
!IFDEF EXTRA_TABLE_ENTRY_FOR_LENGTH_THREE {
|
||||
cpx #$04
|
||||
} ELSE {
|
||||
cpx #$03
|
||||
}
|
||||
bcs gbnc2_next
|
||||
lda tabl_bit - 1,x
|
||||
gbnc2_next:
|
||||
asl zp_bitbuf
|
||||
bne gbnc2_ok
|
||||
tax
|
||||
jsr get_crunched_byte
|
||||
rol
|
||||
sta zp_bitbuf
|
||||
txa
|
||||
gbnc2_ok:
|
||||
rol
|
||||
bcs gbnc2_next
|
||||
tax
|
||||
; -------------------------------------------------------------------
|
||||
; calulate absolute offset (zp_src) (21(23) bytes) + get_bits macro
|
||||
;
|
||||
!IFNDEF MAX_SEQUENCE_LENGTH_256 {
|
||||
lda #0
|
||||
sta zp_bits_hi
|
||||
}
|
||||
lda tabl_bi,x
|
||||
+mac_get_bits
|
||||
!if FORWARD_DECRUNCHING = 0 {
|
||||
adc tabl_lo,x
|
||||
sta zp_src_lo
|
||||
lda zp_bits_hi
|
||||
adc tabl_hi,x
|
||||
adc zp_dest_hi
|
||||
} else {
|
||||
clc
|
||||
adc tabl_lo,x
|
||||
eor #$ff
|
||||
sta zp_src_lo
|
||||
lda zp_dest_hi
|
||||
bcc skip_dest_hi
|
||||
sbc #1
|
||||
clc
|
||||
skip_dest_hi:
|
||||
sbc zp_bits_hi
|
||||
sbc tabl_hi,x
|
||||
clc
|
||||
}
|
||||
sta zp_src_hi
|
||||
; -------------------------------------------------------------------
|
||||
; prepare for copy loop (2 bytes)
|
||||
;
|
||||
pre_copy:
|
||||
ldx zp_len_lo
|
||||
; -------------------------------------------------------------------
|
||||
; main copy loop (30 bytes)
|
||||
;
|
||||
copy_next:
|
||||
!if FORWARD_DECRUNCHING = 0 {
|
||||
tya
|
||||
bne copy_skip_hi
|
||||
dec zp_dest_hi
|
||||
dec zp_src_hi
|
||||
copy_skip_hi:
|
||||
dey
|
||||
}
|
||||
!IFNDEF LITERAL_SEQUENCES_NOT_USED {
|
||||
bcs get_literal_byte
|
||||
}
|
||||
lda (zp_src_lo),y
|
||||
literal_byte_gotten:
|
||||
sta (zp_dest_lo),y
|
||||
!if FORWARD_DECRUNCHING = 1 {
|
||||
iny
|
||||
bne copy_skip_hi
|
||||
inc zp_dest_hi
|
||||
inc zp_src_hi
|
||||
copy_skip_hi:
|
||||
}
|
||||
dex
|
||||
bne copy_next
|
||||
!IFNDEF MAX_SEQUENCE_LENGTH_256 {
|
||||
lda zp_len_hi
|
||||
!IFDEF INLINE_GET_BITS {
|
||||
bne copy_next_hi
|
||||
}
|
||||
}
|
||||
begin_stx:
|
||||
stx zp_bits_hi
|
||||
!IFNDEF INLINE_GET_BITS {
|
||||
beq next_round
|
||||
} ELSE {
|
||||
jmp next_round
|
||||
}
|
||||
!IFNDEF MAX_SEQUENCE_LENGTH_256 {
|
||||
copy_next_hi:
|
||||
dec zp_len_hi
|
||||
jmp copy_next
|
||||
}
|
||||
!IFNDEF LITERAL_SEQUENCES_NOT_USED {
|
||||
get_literal_byte:
|
||||
jsr get_crunched_byte
|
||||
bcs literal_byte_gotten
|
||||
}
|
||||
; -------------------------------------------------------------------
|
||||
; exit or literal sequence handling (16(12) bytes)
|
||||
;
|
||||
exit_or_lit_seq:
|
||||
!IFNDEF LITERAL_SEQUENCES_NOT_USED {
|
||||
beq decr_exit
|
||||
jsr get_crunched_byte
|
||||
!IFNDEF MAX_SEQUENCE_LENGTH_256 {
|
||||
sta zp_len_hi
|
||||
}
|
||||
jsr get_crunched_byte
|
||||
tax
|
||||
bcs copy_next
|
||||
decr_exit:
|
||||
}
|
||||
rts
|
||||
!IFDEF EXTRA_TABLE_ENTRY_FOR_LENGTH_THREE {
|
||||
; -------------------------------------------------------------------
|
||||
; the static stable used for bits+offset for lengths 1, 2 and 3 (3 bytes)
|
||||
; bits 2, 4, 4 and offsets 64, 48, 32 corresponding to
|
||||
; %10010000, %11100011, %11100010
|
||||
tabl_bit:
|
||||
!BYTE $90, $e3, $e2
|
||||
} ELSE {
|
||||
; -------------------------------------------------------------------
|
||||
; the static stable used for bits+offset for lengths 1 and 2 (2 bytes)
|
||||
; bits 2, 4 and offsets 48, 32 corresponding to %10001100, %11100010
|
||||
tabl_bit:
|
||||
!BYTE $8c, $e2
|
||||
}
|
||||
!IF SHOW_PROGRESS_DURING_DECRUNCH = 1 {
|
||||
ExoProgressCounter
|
||||
!byte $00
|
||||
}
|
||||
; -------------------------------------------------------------------
|
||||
; end of decruncher
|
||||
; -------------------------------------------------------------------
|
||||
|
||||
; -------------------------------------------------------------------
|
||||
; this 156 (204) byte table area may be relocated. It may also be
|
||||
; clobbered by other data between decrunches.
|
||||
; -------------------------------------------------------------------
|
||||
decrunch_table=$200;;:
|
||||
;; .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
;; .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
;; .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
;;.IFDEF EXTRA_TABLE_ENTRY_FOR_LENGTH_THREE
|
||||
;; .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
;; .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
;; .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
;;.ENDIF
|
||||
;; .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
;; .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
;; .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
;; .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
;; .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
;; .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
;; .byte 0,0,0,0,0,0,0,0,0,0,0,0
|
||||
; -------------------------------------------------------------------
|
||||
; end of decruncher
|
||||
; -------------------------------------------------------------------
|
27
res/ports/common/src/macros.a
Normal file
27
res/ports/common/src/macros.a
Normal file
@ -0,0 +1,27 @@
|
||||
!macro INIT_MACHINE {
|
||||
cld
|
||||
bit $C082
|
||||
sta PRIMARYCHARSET
|
||||
sta CLR80VID
|
||||
sta STOREOFF
|
||||
sta READMAINMEM
|
||||
jsr ROM_TEXT
|
||||
jsr ROM_HOME
|
||||
jsr ROM_PR0
|
||||
jsr ROM_IN0
|
||||
}
|
||||
|
||||
!macro READ_ENTIRE_FILE .parm_open, .parm_read {
|
||||
jsr PRODOS_MLI
|
||||
!byte CMD_OPEN
|
||||
!word .parm_open
|
||||
jsr PRODOS_MLI
|
||||
!byte CMD_READ
|
||||
!word .parm_read
|
||||
jsr PRODOS_MLI
|
||||
!byte CMD_CLOSE
|
||||
!word +
|
||||
!byte $2C
|
||||
+ !byte 1
|
||||
!byte 0
|
||||
}
|
51
res/ports/fox-and-geese/Makefile
Normal file
51
res/ports/fox-and-geese/Makefile
Normal file
@ -0,0 +1,51 @@
|
||||
# https://sourceforge.net/projects/acme-crossass/
|
||||
ACME=acme
|
||||
|
||||
# https://github.com/mach-kernel/cadius
|
||||
CADIUS=cadius
|
||||
|
||||
EXOMIZER=exomizer mem -lnone -P23 -f -q
|
||||
|
||||
BUILDDIR=build
|
||||
DISKVOLUME=FOX.AND.GEESE
|
||||
LOADER=$(BUILDDIR)/LOADER.SYSTEM\#FF2000
|
||||
EXE=$(BUILDDIR)/FOX.AND.GEESE\#068000
|
||||
COMPRESSED=src/OBJ.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/fox.and.geese.a
|
||||
$(CADIUS) REPLACEFILE "$(BUILDDISK)" "/$(DISKVOLUME)/" "$(EXE)" -C
|
||||
@touch "$@"
|
||||
|
||||
$(RES): $(BUILDDIR)
|
||||
$(CADIUS) REPLACEFILE "$(BUILDDISK)" "/$(DISKVOLUME)/" "$@" -C
|
||||
@touch "$@"
|
||||
|
||||
$(COMPRESSED):
|
||||
$(EXOMIZER) src/OBJ@0x0900 -o "$@"
|
||||
|
||||
mount: $(BUILDDISK)
|
||||
@open "$(BUILDDISK)"
|
||||
|
||||
clean:
|
||||
rm -rf "$(BUILDDIR)"
|
||||
|
||||
$(BUILDDIR):
|
||||
mkdir -p "$@"
|
||||
$(CADIUS) CREATEVOLUME "$(BUILDDISK)" "$(DISKVOLUME)" 140KB -C
|
||||
|
||||
all: clean mount
|
||||
|
||||
.NOTPARALLEL:
|
BIN
res/ports/fox-and-geese/src/BOARD.PIC
Normal file
BIN
res/ports/fox-and-geese/src/BOARD.PIC
Normal file
Binary file not shown.
BIN
res/ports/fox-and-geese/src/OBJ
Normal file
BIN
res/ports/fox-and-geese/src/OBJ
Normal file
Binary file not shown.
BIN
res/ports/fox-and-geese/src/OBJ.X
Normal file
BIN
res/ports/fox-and-geese/src/OBJ.X
Normal file
Binary file not shown.
50
res/ports/fox-and-geese/src/fox.and.geese.a
Normal file
50
res/ports/fox-and-geese/src/fox.and.geese.a
Normal file
@ -0,0 +1,50 @@
|
||||
!cpu 6502
|
||||
*=$8000
|
||||
!to "build/FOX.AND.GEESE#068000",plain
|
||||
|
||||
!src "../common/src/constants.a"
|
||||
!src "../common/src/macros.a"
|
||||
|
||||
jmp start
|
||||
|
||||
compressed_data
|
||||
!bin "src/OBJ.X"
|
||||
DECRUNCH_FORWARDS = 1
|
||||
SHOW_PROGRESS_DURING_DECRUNCH = 1
|
||||
kExoProgressWidth = 18 ; depends on total size, max 38
|
||||
!src "../common/src/exodecrunch.a"
|
||||
|
||||
start
|
||||
+INIT_MACHINE
|
||||
!if * != $B9ED {
|
||||
!serious "Adjust prelaunch to patch JSR at ", *
|
||||
}
|
||||
jsr decrunch ; compressed data contains target address
|
||||
bit GFXMODE
|
||||
bit PAGE1
|
||||
bit HIRES
|
||||
bit FULLGFX
|
||||
jsr $900
|
||||
ldx #$20
|
||||
ldy #$00
|
||||
@a lda $9000, y
|
||||
@b sta $2000, y
|
||||
iny
|
||||
bne @a
|
||||
inc @a+2
|
||||
inc @b+2
|
||||
dex
|
||||
bne @a
|
||||
jsr $906
|
||||
bit CLEARKBD
|
||||
jsr PRODOS_MLI
|
||||
!byte CMD_QUIT
|
||||
!word +
|
||||
+ !byte 4
|
||||
|
||||
get_crunched_byte
|
||||
lda compressed_data
|
||||
inc get_crunched_byte+1
|
||||
bne +
|
||||
inc get_crunched_byte+2
|
||||
+ rts
|
25
res/ports/fox-and-geese/src/loader.a
Normal file
25
res/ports/fox-and-geese/src/loader.a
Normal file
@ -0,0 +1,25 @@
|
||||
!cpu 6502
|
||||
*=$2000
|
||||
!to "build/LOADER.SYSTEM#FF2000",plain
|
||||
|
||||
!src "../common/src/constants.a"
|
||||
!src "../common/src/macros.a"
|
||||
|
||||
+READ_ENTIRE_FILE parm_boot_open, parm_boot_read
|
||||
jmp (entry)
|
||||
|
||||
parm_boot_open
|
||||
!byte 3
|
||||
!word filename
|
||||
!word $2100
|
||||
!byte 0
|
||||
|
||||
parm_boot_read
|
||||
!byte 4
|
||||
!byte 1
|
||||
entry !word $8000
|
||||
!word $FFFF
|
||||
!word 0
|
||||
|
||||
filename
|
||||
!text 13,"FOX.AND.GEESE"
|
51
res/ports/kono/Makefile
Normal file
51
res/ports/kono/Makefile
Normal file
@ -0,0 +1,51 @@
|
||||
# https://sourceforge.net/projects/acme-crossass/
|
||||
ACME=acme
|
||||
|
||||
# https://github.com/mach-kernel/cadius
|
||||
CADIUS=cadius
|
||||
|
||||
EXOMIZER=exomizer mem -lnone -P23 -f -q
|
||||
|
||||
BUILDDIR=build
|
||||
DISKVOLUME=KONO
|
||||
LOADER=$(BUILDDIR)/LOADER.SYSTEM\#FF2000
|
||||
EXE=$(BUILDDIR)/KONO\#068000
|
||||
COMPRESSED=src/OBJ.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/kono.a
|
||||
$(CADIUS) REPLACEFILE "$(BUILDDISK)" "/$(DISKVOLUME)/" "$(EXE)" -C
|
||||
@touch "$@"
|
||||
|
||||
$(RES): $(BUILDDIR)
|
||||
$(CADIUS) REPLACEFILE "$(BUILDDISK)" "/$(DISKVOLUME)/" "$@" -C
|
||||
@touch "$@"
|
||||
|
||||
$(COMPRESSED):
|
||||
$(EXOMIZER) src/OBJ@0x0900 -o "$@"
|
||||
|
||||
mount: $(BUILDDISK)
|
||||
@open "$(BUILDDISK)"
|
||||
|
||||
clean:
|
||||
rm -rf "$(BUILDDIR)"
|
||||
|
||||
$(BUILDDIR):
|
||||
mkdir -p "$@"
|
||||
$(CADIUS) CREATEVOLUME "$(BUILDDISK)" "$(DISKVOLUME)" 140KB -C
|
||||
|
||||
all: clean mount
|
||||
|
||||
.NOTPARALLEL:
|
37
res/ports/kono/notes.txt
Normal file
37
res/ports/kono/notes.txt
Normal file
@ -0,0 +1,37 @@
|
||||
BLOAD OBJ.0900 ($0900..$3FFF)
|
||||
BLOAD OBJ.5000 ($5000..$8FFF)
|
||||
JSR $900
|
||||
BLOAD BOARD.PIC ($2000.$3FFF)
|
||||
JSR $906
|
||||
MLI quit
|
||||
|
||||
-=-=-
|
||||
|
||||
BLOAD OBJ ($0900..$AFFF)
|
||||
JSR $900
|
||||
copy $20 pages from $9000 to $2000
|
||||
JSR $906
|
||||
MLI quit
|
||||
|
||||
-=-=-
|
||||
|
||||
exomizer mem -q -P23 -lnone -f "OBJ"@0x0900 -o "OBJ.X"
|
||||
|
||||
-f means forward decrunching so it'll start at $900 and
|
||||
work its way up
|
||||
|
||||
use version of exodecrunch that's in Passport with
|
||||
DECRUNCH_FORWARDS = 1
|
||||
|
||||
that version also supports drawing a progress bar
|
||||
|
||||
it's OK if earlier compressed data gets overwritten by
|
||||
uncompressed data (decrunch never needs to go back to
|
||||
previous data) so just load compressed data high enough
|
||||
in memory that it can read and write the final bytes
|
||||
i.e. uncompressed data ends at $AFFF so compressed data
|
||||
can start before that as long as it ends after $B000
|
||||
|
||||
warning: XSingle index pads reads to 512 bytes
|
||||
so don't put compressed data TOO high or the padding
|
||||
might end up clobbering ProDOS code at $BF00
|
BIN
res/ports/kono/src/OBJ
Normal file
BIN
res/ports/kono/src/OBJ
Normal file
Binary file not shown.
BIN
res/ports/kono/src/OBJ.X
Normal file
BIN
res/ports/kono/src/OBJ.X
Normal file
Binary file not shown.
50
res/ports/kono/src/kono.a
Normal file
50
res/ports/kono/src/kono.a
Normal file
@ -0,0 +1,50 @@
|
||||
!cpu 6502
|
||||
*=$8000
|
||||
!to "build/KONO#068000",plain
|
||||
|
||||
!src "../common/src/constants.a"
|
||||
!src "../common/src/macros.a"
|
||||
|
||||
jmp start
|
||||
|
||||
compressed_data
|
||||
!bin "src/OBJ.X"
|
||||
DECRUNCH_FORWARDS = 1
|
||||
SHOW_PROGRESS_DURING_DECRUNCH = 1
|
||||
kExoProgressWidth = 19 ; depends on total size, max 38
|
||||
!src "../common/src/exodecrunch.a"
|
||||
|
||||
start
|
||||
+INIT_MACHINE
|
||||
!if * != $B9AD {
|
||||
!serious "Adjust prelaunch to patch JSR at ", *
|
||||
}
|
||||
jsr decrunch ; compressed data contains target address
|
||||
bit GFXMODE
|
||||
bit PAGE1
|
||||
bit HIRES
|
||||
bit FULLGFX
|
||||
jsr $900
|
||||
ldx #$20
|
||||
ldy #$00
|
||||
@a lda $9000, y
|
||||
@b sta $2000, y
|
||||
iny
|
||||
bne @a
|
||||
inc @a+2
|
||||
inc @b+2
|
||||
dex
|
||||
bne @a
|
||||
jsr $906
|
||||
bit CLEARKBD
|
||||
jsr PRODOS_MLI
|
||||
!byte CMD_QUIT
|
||||
!word +
|
||||
+ !byte 4
|
||||
|
||||
get_crunched_byte
|
||||
lda compressed_data
|
||||
inc get_crunched_byte+1
|
||||
bne +
|
||||
inc get_crunched_byte+2
|
||||
+ rts
|
25
res/ports/kono/src/loader.a
Normal file
25
res/ports/kono/src/loader.a
Normal file
@ -0,0 +1,25 @@
|
||||
!cpu 6502
|
||||
*=$2000
|
||||
!to "build/LOADER.SYSTEM#FF2000",plain
|
||||
|
||||
!src "../common/src/constants.a"
|
||||
!src "../common/src/macros.a"
|
||||
|
||||
+READ_ENTIRE_FILE parm_boot_open, parm_boot_read
|
||||
jmp (entry)
|
||||
|
||||
parm_boot_open
|
||||
!byte 3
|
||||
!word filename
|
||||
!word $2100
|
||||
!byte 0
|
||||
|
||||
parm_boot_read
|
||||
!byte 4
|
||||
!byte 1
|
||||
entry !word $8000
|
||||
!word $FFFF
|
||||
!word 0
|
||||
|
||||
filename
|
||||
!text 4,"KONO"
|
51
res/ports/mu-torere/Makefile
Normal file
51
res/ports/mu-torere/Makefile
Normal file
@ -0,0 +1,51 @@
|
||||
# https://sourceforge.net/projects/acme-crossass/
|
||||
ACME=acme
|
||||
|
||||
# https://github.com/mach-kernel/cadius
|
||||
CADIUS=cadius
|
||||
|
||||
EXOMIZER=exomizer mem -lnone -P23 -f -q
|
||||
|
||||
BUILDDIR=build
|
||||
DISKVOLUME=MU.TORERE
|
||||
LOADER=$(BUILDDIR)/LOADER.SYSTEM\#FF2000
|
||||
EXE=$(BUILDDIR)/MU.TORERE\#068000
|
||||
COMPRESSED=src/OBJ.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/mu.torere.a
|
||||
$(CADIUS) REPLACEFILE "$(BUILDDISK)" "/$(DISKVOLUME)/" "$(EXE)" -C
|
||||
@touch "$@"
|
||||
|
||||
$(RES): $(BUILDDIR)
|
||||
$(CADIUS) REPLACEFILE "$(BUILDDISK)" "/$(DISKVOLUME)/" "$@" -C
|
||||
@touch "$@"
|
||||
|
||||
$(COMPRESSED):
|
||||
$(EXOMIZER) src/OBJ@0x0900 -o "$@"
|
||||
|
||||
mount: $(BUILDDISK)
|
||||
@open "$(BUILDDISK)"
|
||||
|
||||
clean:
|
||||
rm -rf "$(BUILDDIR)"
|
||||
|
||||
$(BUILDDIR):
|
||||
mkdir -p "$@"
|
||||
$(CADIUS) CREATEVOLUME "$(BUILDDISK)" "$(DISKVOLUME)" 140KB -C
|
||||
|
||||
all: clean mount
|
||||
|
||||
.NOTPARALLEL:
|
BIN
res/ports/mu-torere/src/OBJ
Normal file
BIN
res/ports/mu-torere/src/OBJ
Normal file
Binary file not shown.
BIN
res/ports/mu-torere/src/OBJ.X
Normal file
BIN
res/ports/mu-torere/src/OBJ.X
Normal file
Binary file not shown.
25
res/ports/mu-torere/src/loader.a
Normal file
25
res/ports/mu-torere/src/loader.a
Normal file
@ -0,0 +1,25 @@
|
||||
!cpu 6502
|
||||
*=$2000
|
||||
!to "build/LOADER.SYSTEM#FF2000",plain
|
||||
|
||||
!src "../common/src/constants.a"
|
||||
!src "../common/src/macros.a"
|
||||
|
||||
+READ_ENTIRE_FILE parm_boot_open, parm_boot_read
|
||||
jmp (entry)
|
||||
|
||||
parm_boot_open
|
||||
!byte 3
|
||||
!word filename
|
||||
!word $2100
|
||||
!byte 0
|
||||
|
||||
parm_boot_read
|
||||
!byte 4
|
||||
!byte 1
|
||||
entry !word $8000
|
||||
!word $FFFF
|
||||
!word 0
|
||||
|
||||
filename
|
||||
!text 9,"MU.TORERE"
|
50
res/ports/mu-torere/src/mu.torere.a
Normal file
50
res/ports/mu-torere/src/mu.torere.a
Normal file
@ -0,0 +1,50 @@
|
||||
!cpu 6502
|
||||
*=$8000
|
||||
!to "build/MU.TORERE#068000",plain
|
||||
|
||||
!src "../common/src/constants.a"
|
||||
!src "../common/src/macros.a"
|
||||
|
||||
jmp start
|
||||
|
||||
compressed_data
|
||||
!bin "src/OBJ.X"
|
||||
DECRUNCH_FORWARDS = 1
|
||||
SHOW_PROGRESS_DURING_DECRUNCH = 1
|
||||
kExoProgressWidth = 18 ; depends on total size, max 38
|
||||
!src "../common/src/exodecrunch.a"
|
||||
|
||||
start
|
||||
+INIT_MACHINE
|
||||
!if * != $B75E {
|
||||
!serious "Adjust prelaunch to patch JSR at ", *
|
||||
}
|
||||
jsr decrunch ; compressed data contains target address
|
||||
bit GFXMODE
|
||||
bit PAGE1
|
||||
bit HIRES
|
||||
bit FULLGFX
|
||||
jsr $900
|
||||
ldx #$20
|
||||
ldy #$00
|
||||
@a lda $9000, y
|
||||
@b sta $2000, y
|
||||
iny
|
||||
bne @a
|
||||
inc @a+2
|
||||
inc @b+2
|
||||
dex
|
||||
bne @a
|
||||
jsr $906
|
||||
bit CLEARKBD
|
||||
jsr PRODOS_MLI
|
||||
!byte CMD_QUIT
|
||||
!word +
|
||||
+ !byte 4
|
||||
|
||||
get_crunched_byte
|
||||
lda compressed_data
|
||||
inc get_crunched_byte+1
|
||||
bne +
|
||||
inc get_crunched_byte+2
|
||||
+ rts
|
51
res/ports/nine-mens-morris/Makefile
Normal file
51
res/ports/nine-mens-morris/Makefile
Normal file
@ -0,0 +1,51 @@
|
||||
# https://sourceforge.net/projects/acme-crossass/
|
||||
ACME=acme
|
||||
|
||||
# https://github.com/mach-kernel/cadius
|
||||
CADIUS=cadius
|
||||
|
||||
EXOMIZER=exomizer mem -lnone -P23 -f -q
|
||||
|
||||
BUILDDIR=build
|
||||
DISKVOLUME=NINE.MENS
|
||||
LOADER=$(BUILDDIR)/LOADER.SYSTEM\#FF2000
|
||||
EXE=$(BUILDDIR)/NINE.MENS\#068000
|
||||
COMPRESSED=src/OBJ.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/nine.mens.a
|
||||
$(CADIUS) REPLACEFILE "$(BUILDDISK)" "/$(DISKVOLUME)/" "$(EXE)" -C
|
||||
@touch "$@"
|
||||
|
||||
$(RES): $(BUILDDIR)
|
||||
$(CADIUS) REPLACEFILE "$(BUILDDISK)" "/$(DISKVOLUME)/" "$@" -C
|
||||
@touch "$@"
|
||||
|
||||
$(COMPRESSED):
|
||||
$(EXOMIZER) src/OBJ@0x0900 -o "$@"
|
||||
|
||||
mount: $(BUILDDISK)
|
||||
@open "$(BUILDDISK)"
|
||||
|
||||
clean:
|
||||
rm -rf "$(BUILDDIR)"
|
||||
|
||||
$(BUILDDIR):
|
||||
mkdir -p "$@"
|
||||
$(CADIUS) CREATEVOLUME "$(BUILDDISK)" "$(DISKVOLUME)" 140KB -C
|
||||
|
||||
all: clean mount
|
||||
|
||||
.NOTPARALLEL:
|
BIN
res/ports/nine-mens-morris/src/OBJ
Normal file
BIN
res/ports/nine-mens-morris/src/OBJ
Normal file
Binary file not shown.
BIN
res/ports/nine-mens-morris/src/OBJ.X
Normal file
BIN
res/ports/nine-mens-morris/src/OBJ.X
Normal file
Binary file not shown.
25
res/ports/nine-mens-morris/src/loader.a
Normal file
25
res/ports/nine-mens-morris/src/loader.a
Normal file
@ -0,0 +1,25 @@
|
||||
!cpu 6502
|
||||
*=$2000
|
||||
!to "build/LOADER.SYSTEM#FF2000",plain
|
||||
|
||||
!src "../common/src/constants.a"
|
||||
!src "../common/src/macros.a"
|
||||
|
||||
+READ_ENTIRE_FILE parm_boot_open, parm_boot_read
|
||||
jmp (entry)
|
||||
|
||||
parm_boot_open
|
||||
!byte 3
|
||||
!word filename
|
||||
!word $2100
|
||||
!byte 0
|
||||
|
||||
parm_boot_read
|
||||
!byte 4
|
||||
!byte 1
|
||||
entry !word $8000
|
||||
!word $FFFF
|
||||
!word 0
|
||||
|
||||
filename
|
||||
!text 9,"NINE.MENS"
|
50
res/ports/nine-mens-morris/src/nine.mens.a
Normal file
50
res/ports/nine-mens-morris/src/nine.mens.a
Normal file
@ -0,0 +1,50 @@
|
||||
!cpu 6502
|
||||
*=$8000
|
||||
!to "build/NINE.MENS#068000",plain
|
||||
|
||||
!src "../common/src/constants.a"
|
||||
!src "../common/src/macros.a"
|
||||
|
||||
jmp start
|
||||
|
||||
compressed_data
|
||||
!bin "src/OBJ.X"
|
||||
DECRUNCH_FORWARDS = 1
|
||||
SHOW_PROGRESS_DURING_DECRUNCH = 1
|
||||
kExoProgressWidth = 18 ; depends on total size, max 38
|
||||
!src "../common/src/exodecrunch.a"
|
||||
|
||||
start
|
||||
+INIT_MACHINE
|
||||
!if * != $BC5B {
|
||||
!serious "Adjust prelaunch to patch JSR at ", *
|
||||
}
|
||||
jsr decrunch ; compressed data contains target address
|
||||
bit GFXMODE
|
||||
bit PAGE1
|
||||
bit HIRES
|
||||
bit FULLGFX
|
||||
jsr $900
|
||||
ldx #$20
|
||||
ldy #$00
|
||||
@a lda $9000, y
|
||||
@b sta $2000, y
|
||||
iny
|
||||
bne @a
|
||||
inc @a+2
|
||||
inc @b+2
|
||||
dex
|
||||
bne @a
|
||||
jsr $906
|
||||
bit CLEARKBD
|
||||
jsr PRODOS_MLI
|
||||
!byte CMD_QUIT
|
||||
!word +
|
||||
+ !byte 4
|
||||
|
||||
get_crunched_byte
|
||||
lda compressed_data
|
||||
inc get_crunched_byte+1
|
||||
bne +
|
||||
inc get_crunched_byte+2
|
||||
+ rts
|
51
res/ports/seega/Makefile
Normal file
51
res/ports/seega/Makefile
Normal file
@ -0,0 +1,51 @@
|
||||
# https://sourceforge.net/projects/acme-crossass/
|
||||
ACME=acme
|
||||
|
||||
# https://github.com/mach-kernel/cadius
|
||||
CADIUS=cadius
|
||||
|
||||
EXOMIZER=exomizer mem -lnone -P23 -f -q
|
||||
|
||||
BUILDDIR=build
|
||||
DISKVOLUME=SEEGA
|
||||
LOADER=$(BUILDDIR)/LOADER.SYSTEM\#FF2000
|
||||
EXE=$(BUILDDIR)/SEEGA\#068000
|
||||
COMPRESSED=src/OBJ.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/seega.a
|
||||
$(CADIUS) REPLACEFILE "$(BUILDDISK)" "/$(DISKVOLUME)/" "$(EXE)" -C
|
||||
@touch "$@"
|
||||
|
||||
$(RES): $(BUILDDIR)
|
||||
$(CADIUS) REPLACEFILE "$(BUILDDISK)" "/$(DISKVOLUME)/" "$@" -C
|
||||
@touch "$@"
|
||||
|
||||
$(COMPRESSED):
|
||||
$(EXOMIZER) src/OBJ@0x0900 -o "$@"
|
||||
|
||||
mount: $(BUILDDISK)
|
||||
@open "$(BUILDDISK)"
|
||||
|
||||
clean:
|
||||
rm -rf "$(BUILDDIR)"
|
||||
|
||||
$(BUILDDIR):
|
||||
mkdir -p "$@"
|
||||
$(CADIUS) CREATEVOLUME "$(BUILDDISK)" "$(DISKVOLUME)" 140KB -C
|
||||
|
||||
all: clean mount
|
||||
|
||||
.NOTPARALLEL:
|
BIN
res/ports/seega/src/OBJ
Normal file
BIN
res/ports/seega/src/OBJ
Normal file
Binary file not shown.
BIN
res/ports/seega/src/OBJ.X
Normal file
BIN
res/ports/seega/src/OBJ.X
Normal file
Binary file not shown.
25
res/ports/seega/src/loader.a
Normal file
25
res/ports/seega/src/loader.a
Normal file
@ -0,0 +1,25 @@
|
||||
!cpu 6502
|
||||
*=$2000
|
||||
!to "build/LOADER.SYSTEM#FF2000",plain
|
||||
|
||||
!src "../common/src/constants.a"
|
||||
!src "../common/src/macros.a"
|
||||
|
||||
+READ_ENTIRE_FILE parm_boot_open, parm_boot_read
|
||||
jmp (entry)
|
||||
|
||||
parm_boot_open
|
||||
!byte 3
|
||||
!word filename
|
||||
!word $2100
|
||||
!byte 0
|
||||
|
||||
parm_boot_read
|
||||
!byte 4
|
||||
!byte 1
|
||||
entry !word $8000
|
||||
!word $FFFF
|
||||
!word 0
|
||||
|
||||
filename
|
||||
!text 5,"SEEGA"
|
50
res/ports/seega/src/seega.a
Normal file
50
res/ports/seega/src/seega.a
Normal file
@ -0,0 +1,50 @@
|
||||
!cpu 6502
|
||||
*=$8000
|
||||
!to "build/SEEGA#068000",plain
|
||||
|
||||
!src "../common/src/constants.a"
|
||||
!src "../common/src/macros.a"
|
||||
|
||||
jmp start
|
||||
|
||||
compressed_data
|
||||
!bin "src/OBJ.X"
|
||||
DECRUNCH_FORWARDS = 1
|
||||
SHOW_PROGRESS_DURING_DECRUNCH = 1
|
||||
kExoProgressWidth = 18 ; depends on total size, max 38
|
||||
!src "../common/src/exodecrunch.a"
|
||||
|
||||
start
|
||||
+INIT_MACHINE
|
||||
!if * != $B9DE {
|
||||
!serious "Adjust prelaunch to patch JSR at ", *
|
||||
}
|
||||
jsr decrunch ; compressed data contains target address
|
||||
bit GFXMODE
|
||||
bit PAGE1
|
||||
bit HIRES
|
||||
bit FULLGFX
|
||||
jsr $900
|
||||
ldx #$20
|
||||
ldy #$00
|
||||
@a lda $9000, y
|
||||
@b sta $2000, y
|
||||
iny
|
||||
bne @a
|
||||
inc @a+2
|
||||
inc @b+2
|
||||
dex
|
||||
bne @a
|
||||
jsr $906
|
||||
bit CLEARKBD
|
||||
jsr PRODOS_MLI
|
||||
!byte CMD_QUIT
|
||||
!word +
|
||||
+ !byte 4
|
||||
|
||||
get_crunched_byte
|
||||
lda compressed_data
|
||||
inc get_crunched_byte+1
|
||||
bne +
|
||||
inc get_crunched_byte+2
|
||||
+ rts
|
51
res/ports/wari/Makefile
Normal file
51
res/ports/wari/Makefile
Normal file
@ -0,0 +1,51 @@
|
||||
# https://sourceforge.net/projects/acme-crossass/
|
||||
ACME=acme
|
||||
|
||||
# https://github.com/mach-kernel/cadius
|
||||
CADIUS=cadius
|
||||
|
||||
EXOMIZER=exomizer mem -lnone -P23 -f -q
|
||||
|
||||
BUILDDIR=build
|
||||
DISKVOLUME=WARI
|
||||
LOADER=$(BUILDDIR)/LOADER.SYSTEM\#FF2000
|
||||
EXE=$(BUILDDIR)/WARI\#068000
|
||||
COMPRESSED=src/OBJ.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/wari.a
|
||||
$(CADIUS) REPLACEFILE "$(BUILDDISK)" "/$(DISKVOLUME)/" "$(EXE)" -C
|
||||
@touch "$@"
|
||||
|
||||
$(RES): $(BUILDDIR)
|
||||
$(CADIUS) REPLACEFILE "$(BUILDDISK)" "/$(DISKVOLUME)/" "$@" -C
|
||||
@touch "$@"
|
||||
|
||||
$(COMPRESSED):
|
||||
$(EXOMIZER) src/OBJ@0x0900 -o "$@"
|
||||
|
||||
mount: $(BUILDDISK)
|
||||
@open "$(BUILDDISK)"
|
||||
|
||||
clean:
|
||||
rm -rf "$(BUILDDIR)"
|
||||
|
||||
$(BUILDDIR):
|
||||
mkdir -p "$@"
|
||||
$(CADIUS) CREATEVOLUME "$(BUILDDISK)" "$(DISKVOLUME)" 140KB -C
|
||||
|
||||
all: clean mount
|
||||
|
||||
.NOTPARALLEL:
|
BIN
res/ports/wari/src/OBJ
Normal file
BIN
res/ports/wari/src/OBJ
Normal file
Binary file not shown.
BIN
res/ports/wari/src/OBJ.X
Normal file
BIN
res/ports/wari/src/OBJ.X
Normal file
Binary file not shown.
25
res/ports/wari/src/loader.a
Normal file
25
res/ports/wari/src/loader.a
Normal file
@ -0,0 +1,25 @@
|
||||
!cpu 6502
|
||||
*=$2000
|
||||
!to "build/LOADER.SYSTEM#FF2000",plain
|
||||
|
||||
!src "../common/src/constants.a"
|
||||
!src "../common/src/macros.a"
|
||||
|
||||
+READ_ENTIRE_FILE parm_boot_open, parm_boot_read
|
||||
jmp (entry)
|
||||
|
||||
parm_boot_open
|
||||
!byte 3
|
||||
!word filename
|
||||
!word $2100
|
||||
!byte 0
|
||||
|
||||
parm_boot_read
|
||||
!byte 4
|
||||
!byte 1
|
||||
entry !word $8000
|
||||
!word $FFFF
|
||||
!word 0
|
||||
|
||||
filename
|
||||
!text 4,"WARI"
|
50
res/ports/wari/src/wari.a
Normal file
50
res/ports/wari/src/wari.a
Normal file
@ -0,0 +1,50 @@
|
||||
!cpu 6502
|
||||
*=$8000
|
||||
!to "build/WARI#068000",plain
|
||||
|
||||
!src "../common/src/constants.a"
|
||||
!src "../common/src/macros.a"
|
||||
|
||||
jmp start
|
||||
|
||||
compressed_data
|
||||
!bin "src/OBJ.X"
|
||||
DECRUNCH_FORWARDS = 1
|
||||
SHOW_PROGRESS_DURING_DECRUNCH = 1
|
||||
kExoProgressWidth = 19 ; depends on total size, max 38
|
||||
!src "../common/src/exodecrunch.a"
|
||||
|
||||
start
|
||||
+INIT_MACHINE
|
||||
!if * != $BA3C {
|
||||
!serious "Adjust prelaunch to patch JSR at ", *
|
||||
}
|
||||
jsr decrunch ; compressed data contains target address
|
||||
bit GFXMODE
|
||||
bit PAGE1
|
||||
bit HIRES
|
||||
bit FULLGFX
|
||||
jsr $900
|
||||
ldx #$20
|
||||
ldy #$00
|
||||
@a lda $9000, y
|
||||
@b sta $2000, y
|
||||
iny
|
||||
bne @a
|
||||
inc @a+2
|
||||
inc @b+2
|
||||
dex
|
||||
bne @a
|
||||
jsr $906
|
||||
bit CLEARKBD
|
||||
jsr PRODOS_MLI
|
||||
!byte CMD_QUIT
|
||||
!word +
|
||||
+ !byte 4
|
||||
|
||||
get_crunched_byte
|
||||
lda compressed_data
|
||||
inc get_crunched_byte+1
|
||||
bne +
|
||||
inc get_crunched_byte+2
|
||||
+ rts
|
Loading…
Reference in New Issue
Block a user