Compare commits
No commits in common. "main" and "python3" have entirely different histories.
8 changed files with 22 additions and 183 deletions
43
.github/workflows/build.yml
vendored
43
.github/workflows/build.yml
vendored
|
|
@ -1,43 +0,0 @@
|
|||
name: Build
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
release:
|
||||
types: [published]
|
||||
check_suite:
|
||||
types: [rerequested]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: install deps
|
||||
run: sudo apt install vice cc65
|
||||
|
||||
- name: build toolchain
|
||||
run: make toolchain-exomizer -j$(nproc)
|
||||
|
||||
- name: build 80columns
|
||||
run: make -j$(nproc)
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: artifacts
|
||||
path: |
|
||||
*.d64
|
||||
*.prg
|
||||
|
||||
- name: Create release
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
files: |
|
||||
*.d64
|
||||
fail_on_unmatched_files: true
|
||||
body: "Automatically created release"
|
||||
6
.gitignore
vendored
6
.gitignore
vendored
|
|
@ -1,8 +1,4 @@
|
|||
*.bin
|
||||
*.d64
|
||||
*.dbg
|
||||
*.lst
|
||||
*.map
|
||||
*.o
|
||||
*.prg
|
||||
*.bin
|
||||
bin
|
||||
|
|
|
|||
2
.gitmodules
vendored
2
.gitmodules
vendored
|
|
@ -3,4 +3,4 @@
|
|||
url = https://github.com/cc65/cc65
|
||||
[submodule "exomizer"]
|
||||
path = exomizer
|
||||
url = https://bitbucket.org/magli143/exomizer/
|
||||
url = https://github.com/bitshifters/exomizer
|
||||
|
|
|
|||
|
|
@ -1,2 +0,0 @@
|
|||
USE_REU = 1
|
||||
.include "80columns.s"
|
||||
85
80columns.s
85
80columns.s
|
|
@ -45,61 +45,6 @@ VICSCN = $C000 ; NEW Video Matrix: 25 Lines X 80 Columns
|
|||
VICCOL = $D800 ; new color RAM is in RAM at the same address
|
||||
BITMAP = $E000
|
||||
|
||||
.ifndef USE_REU
|
||||
USE_REU = 0
|
||||
.endif
|
||||
|
||||
.if USE_REU
|
||||
|
||||
REU_STATUS = $DF00 ; Status register
|
||||
REU_COMMAND = $DF01 ; Command register
|
||||
REU_C64ADDR = $DF02 ; C64 base address register
|
||||
REU_REUADDR = $DF04 ; REU base address register
|
||||
REU_COUNT = $DF07 ; Transfer count register
|
||||
REU_IRQMASK = $DF09 ; IRQ mask register
|
||||
REU_CONTROL = $DF0A ; Control register
|
||||
REU_TRIGGER = $FF00 ; REU command trigger
|
||||
|
||||
OP_COPYFROM = $ED
|
||||
OP_COPYTO = $EC
|
||||
.macro REU_OP addr, len, op
|
||||
lda R6510
|
||||
pha
|
||||
lda #%00110101
|
||||
sta R6510
|
||||
lda #0
|
||||
sta $DF0A ; hold neither address
|
||||
lda #<(addr)
|
||||
sta REU_C64ADDR
|
||||
lda #>(addr)
|
||||
sta REU_C64ADDR+1
|
||||
|
||||
|
||||
lda #<(len)
|
||||
sta REU_COUNT
|
||||
lda #>(len)
|
||||
sta REU_COUNT+1
|
||||
|
||||
ldx #op
|
||||
jsr reu_op
|
||||
pla
|
||||
sta R6510
|
||||
|
||||
.endmacro
|
||||
|
||||
.macro REU_COPYFROM addr, len
|
||||
REU_OP addr, len, OP_COPYFROM
|
||||
.endmacro
|
||||
|
||||
.macro REU_COPYTO addr, len
|
||||
REU_OP addr, len, OP_COPYTO
|
||||
.endmacro
|
||||
|
||||
.macro REU_MEMMOVE addr1, addr2, len
|
||||
REU_COPYTO addr1, len
|
||||
REU_COPYFROM addr2, len
|
||||
.endmacro
|
||||
.endif
|
||||
; constants
|
||||
COLUMNS = 80
|
||||
LINES = 25
|
||||
|
|
@ -572,17 +517,9 @@ scroll_up:
|
|||
bne @1
|
||||
dey
|
||||
bne @1
|
||||
@2:
|
||||
; note that Y is now 0
|
||||
; ***END*** identical to $E94B in KERNAL
|
||||
; scroll screen up
|
||||
.if USE_REU
|
||||
; move bitmap RAM (starting at BITMAP) up by 320 bytes
|
||||
REU_MEMMOVE BITMAP+320, BITMAP, 24*40*8
|
||||
; move character RAM (starting at VICSCN) up by 80 bytes
|
||||
REU_MEMMOVE VICSCN+80, VICSCN, 24*80
|
||||
.else
|
||||
lda #COLUMNS
|
||||
@2: lda #COLUMNS
|
||||
sta PNT
|
||||
lda #>VICSCN
|
||||
sta PNT + 1
|
||||
|
|
@ -605,9 +542,7 @@ scroll_up:
|
|||
cpy #$a0
|
||||
beq :+
|
||||
jmp :-
|
||||
:
|
||||
.endif
|
||||
ldy #40
|
||||
: ldy #40
|
||||
lda #>VICCOL
|
||||
sty USER
|
||||
sta USER + 1
|
||||
|
|
@ -636,6 +571,7 @@ scroll_up:
|
|||
lda #4
|
||||
sta BLNCT
|
||||
rts ;returns Z clear because of LDA
|
||||
|
||||
petscii_to_screencode:
|
||||
cmp #$FF ; PI
|
||||
bne @1
|
||||
|
|
@ -930,21 +866,6 @@ new_cinv:
|
|||
jsr calc_user
|
||||
@a6: jmp $EA61
|
||||
|
||||
.if USE_REU
|
||||
reu_op:
|
||||
lda #0
|
||||
sta REU_REUADDR
|
||||
sta REU_REUADDR+1
|
||||
sta REU_REUADDR+2
|
||||
|
||||
stx REU_COMMAND
|
||||
|
||||
lda REU_TRIGGER
|
||||
sta REU_TRIGGER
|
||||
|
||||
rts
|
||||
.endif
|
||||
|
||||
.macro exec0 addr, save_y
|
||||
php
|
||||
sei
|
||||
|
|
|
|||
44
Makefile
44
Makefile
|
|
@ -2,24 +2,24 @@ export PATH:= $(abspath bin):$(PATH)
|
|||
|
||||
.PHONY: all
|
||||
all: 80columns-compressed.prg 80c2-compressed.prg 80c3-compressed.prg 80c4-compressed.prg
|
||||
all: 80colreu-compressed.prg 80r2-compressed.prg 80r3-compressed.prg 80r4-compressed.prg
|
||||
all: charset.prg charset2.prg charset3.prg charset4.prg
|
||||
|
||||
ifneq ($(shell which c1541 2>/dev/null),)
|
||||
all: 80columns.d64
|
||||
endif
|
||||
|
||||
80columns.d64: 80columns-compressed.prg 80colreu-compressed.prg charset.prg charset2.prg charset3.prg charset4.prg
|
||||
80columns.d64: 80columns-compressed.prg charset.prg charset2.prg charset3.prg charset4.prg
|
||||
rm -f $@
|
||||
c1541 -format 80columns,80 d64 80columns.d64.tmp \
|
||||
$(foreach fn,$^,-write $(fn) $(patsubst %-compressed,%,$(patsubst %.prg,%,$(fn))))
|
||||
c1541 -format 80columns,80 d64 80columns.d64.tmp
|
||||
for i in $^; do \
|
||||
c1541 -attach 80columns.d64.tmp -write $$i $${i%[-.]*}; \
|
||||
done
|
||||
mv -f 80columns.d64.tmp 80columns.d64
|
||||
|
||||
EXOMIZER_SFX := exomizer sfx 51200 -q -n -T4 -M256 -Di_perf=2
|
||||
.INTERMEDIATE: charset.bin
|
||||
charset.prg: charset.bin
|
||||
(printf '\0\320'; cat $<) > $@.tmp
|
||||
$(EXOMIZER_SFX) -o $@ $@.tmp
|
||||
exomizer sfx 51200 -q -n -o $@ $@.tmp
|
||||
rm -f $@.tmp
|
||||
|
||||
charset.bin: charset.o charset.cfg
|
||||
|
|
@ -27,14 +27,14 @@ charset.bin: charset.o charset.cfg
|
|||
|
||||
charset%.prg: charset%.bin
|
||||
(printf '\0\320'; cat $<) > $@.tmp
|
||||
$(EXOMIZER_SFX) -o $@ $@.tmp
|
||||
exomizer sfx 51200 -q -n -o $@ $@.tmp
|
||||
rm -f $@.tmp
|
||||
|
||||
charset%.bin: charset%.o charset.cfg
|
||||
ld65 -C charset.cfg $< -o $@
|
||||
|
||||
%-compressed.prg: %-uncompressed.prg
|
||||
$(EXOMIZER_SFX) -o $@ $<
|
||||
exomizer sfx 51200 -q -n -o $@ $<
|
||||
|
||||
%-uncompressed.prg: %.bin
|
||||
(printf '\0\310'; cat $<) > $@
|
||||
|
|
@ -50,33 +50,19 @@ update-font-images: charset.bin charset2.bin charset3.bin charset4.bin mkfontimg
|
|||
python3 mkfontimg.py -l charset4.bin img/t4.png
|
||||
python3 mkfontimg.py charset4.bin img/g4.png
|
||||
|
||||
.INTERMEDIATE: 80colreu.bin
|
||||
80colreu.bin: 80colreu.o charset.o 80columns.cfg
|
||||
ld65 -C 80columns.cfg $(filter %.o,$^) -o $@ --mapfile ${@:.bin=.map}
|
||||
|
||||
.INTERMEDIATE: 80columns.bin
|
||||
80columns.bin: 80columns.o charset.o 80columns.cfg
|
||||
ld65 -C 80columns.cfg $(filter %.o,$^) -o $@ --mapfile ${@:.bin=.map}
|
||||
|
||||
80r%.bin: 80colreu.o charset%.o 80columns.cfg
|
||||
ld65 -C 80columns.cfg $(filter %.o,$^) -o $@ --mapfile ${@:.bin=.map} --dbgfile ${@:.bin=.dbg}
|
||||
ld65 -C 80columns.cfg $(filter %.o,$^) -o $@
|
||||
|
||||
80c%.bin: 80columns.o charset%.o 80columns.cfg
|
||||
ld65 -C 80columns.cfg $(filter %.o,$^) -o $@ --mapfile ${@:.bin=.map} --dbgfile ${@:.bin=.dbg}
|
||||
|
||||
80r%.bin: 80colreu.o charset%.o 80columns.cfg
|
||||
ld65 -C 80columns.cfg $(filter %.o,$^) -o $@ --mapfile ${@:.bin=.map} --dbgfile ${@:.bin=.dbg}
|
||||
|
||||
80colreu.s: 80columns.s
|
||||
|
||||
80colreu.s: 80columns.s
|
||||
ld65 -C 80columns.cfg $(filter %.o,$^) -o $@
|
||||
|
||||
%.o: %.s
|
||||
ca65 -o $@ $< --debug --listing ${@:.o=.lst}
|
||||
ca65 -o $@ $<
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f *.lst *.map *.prg *.bin *.o 80columns.d64
|
||||
rm -f *.prg *.bin *.o 80columns.d64
|
||||
|
||||
.PHONY: toolchain
|
||||
toolchain: toolchain-cc65 toolchain-exomizer
|
||||
|
|
@ -94,13 +80,13 @@ toolchain-cc65:
|
|||
|
||||
.PHONY: toolchain-exomizer
|
||||
toolchain-exomizer:
|
||||
[ -d exomizer/src ] || git submodule update --init exomizer
|
||||
[ -d exomizer/exomizer2/src ] || git submodule update --init exomizer
|
||||
|
||||
$(MAKE) -C exomizer/src CFLAGS="-Wall -Wstrict-prototypes -pedantic -O3"
|
||||
$(MAKE) -C exomizer/exomizer2/src CFLAGS="-Wall -Wstrict-prototypes -pedantic -O3"
|
||||
|
||||
mkdir -p bin
|
||||
|
||||
cp exomizer/src/exomizer bin/
|
||||
cp exomizer/exomizer2/src/exomizer bin/
|
||||
|
||||
# have to do this, or git will report untracked files
|
||||
(cd exomizer && git clean -dxf)
|
||||
|
|
|
|||
21
README.md
21
README.md
|
|
@ -26,31 +26,12 @@ The source contains four character sets (`charset.s`, `charset2.s` etc.) from di
|
|||
You can also `LOAD`/`RUN` a new exomizer-compressed character set into memory, though this destroys the currently-loaded BASIC program.
|
||||
|
||||
### charset.s: 80COLUMNS
|
||||

|
||||

|
||||
|
||||
### charset2.s: COLOR 80 by Richvale Telecommunications
|
||||

|
||||

|
||||
|
||||
### charset3.s: Highspeed80 by CKtwo
|
||||

|
||||

|
||||
|
||||
### charset4.s: SCREEN-80 by Compute’s Gazette
|
||||

|
||||

|
||||


### charset2.s: COLOR 80 by Richvale Telecommunications


### charset3.s: Highspeed80 by CKtwo


### charset4.s: SCREEN-80 by Compute’s Gazette


|
||||
|
||||
## Memory Layout
|
||||
|
||||
The object code resides at $c800-$cfff. The two character sets are located at $d000-$d7ff. The virtual 80x25 Screen RAM (in order to read back screen contents) is at $c000-$c7ff. The bitmap is at $e000-$ff40, and the color matrix for bitmap mode is at $d800-$dbe8. All this lies beyond the top of BASIC RAM, so BASIC continues to have 38911 bytes free.
|
||||
|
||||
The address range where the character sets reside is the normal location of special I/O registers (e.g., the VIC-II registers start at $d000). The normal LOAD command cannot load to this range of memory (instead there are random seeming side-effects such as blanking the screen), but the exomizer uncruncher can.
|
||||
|
||||
## REU
|
||||
|
||||
If the REU version is used, up to the first 32kB of the REU are used to accelerate screen scrolling operations. By copying the screen to the REU, then from REU back to RAM shifted by 1 screen row, a higher throughput can be obtained.
|
||||
|
||||
## TODO
|
||||
|
||||
* Support LOCK and UNLOCK codes. (On the C64, these are 8 and 9, on the C128 they are 11 and 12...)
|
||||
|
|
|
|||
2
exomizer
2
exomizer
|
|
@ -1 +1 @@
|
|||
Subproject commit 6a152b5605648f7a41eadd4b011a93ec92f74dd8
|
||||
Subproject commit 2426d97207c8dff23cd2a94cc768c8be87a7b5d0
|
||||
Loading…
Reference in a new issue