Merge pull request #35 from FeralChild64/master

Latest development
This commit is contained in:
gardners authored and GitHub committed 2019-12-15 15:15:36 +10:30
commit 9a677e8647
304 files changed
+5690 -1364

No files matched your search

+1 -1
View File
@@ -5,7 +5,6 @@ kernal_hybrid.rom
# Compilation related files
assembler/KickAss*
build/*
# Input to the similarity tool - copyrighted material, we can't check it in!
@@ -15,5 +14,6 @@ build/*
# Various IDE project files, temporary files, etc.
dump.mem
*project
.*swp
+74 -14
View File
@@ -91,9 +91,33 @@ Planned for the future - not available yet.
### `CONFIG_MEMORY_MODEL_60K`
Uses RAM under BASIC, I/O and KERNAL, takes over `$C000`-`$CFFF` area requires special helper routines installed in `$2A7`-`$2FF` area (normally unused and free for the user). Gives the most free memory for BASIC programs, but it's the slowest and the least compatible model.
Uses RAM under BASIC, I/O and KERNAL, takes over `$C000`-`$CFFF` area requires special helper routines installed in `$2A7`-`$2FF` area (normally unused and free for the user). Gives the most free memory for BASIC programs, but it's the slowest (for example, forces disabling optimized LOAD loop for JiffyDOS) and the least compatible model.
Comparing to standard memoryy model, it needs about 180 bytes in BASIC segment and 80 bytes in KERNAL segment - at the moment of doing the test, these values are expected to change often.
Comparing to standard memory model, it needs about 180 bytes in BASIC segment and 80 bytes in KERNAL segment - at the moment of doing the test, these values are expected to change often.
## I/O devices
### `CONFIG_IEC`
Adds support for the IEEC bus - for serial printers, disk drives, etc.
Needs over 1000 bytes in KERNAL segment. If unsure - enable.
### `CONFIG_IEC_BLANK_SCREEN`
Causes screen blanking during some IEC operations (currently only JiffyDOS file loading) to increase the data transfer performance.
### `CONFIG_IEC_JIFFYDOS`
Adds support for JiffyDOS fast protocol to the IEC bus.
Needs about 430 bytes in KERNAL segment. If unsure - enable.
### `CONFIG_TAPE_TURBO`
Adds a minimal turbo tape support - just LOAD command (device 7, like on _Action Replay_ and _Final_ cartridges)
Needs about 400 bytes in KERNAL segment. If unsure - enable.
## Multiple SID support
@@ -105,7 +129,7 @@ The SID support in the ROM is very limited - it only disables the sound during s
Each of them add support for one additional SID - addresses should be given in `CONFIG_SID_2ND_ADDRESS` and `CONFIG_SID_3RD_ADDRESS`, respectively.
Each of these options needs 8 bytes in KERNAL segment.
Each of these options needs 3 bytes in KERNAL segment.
### `CONFIG_SID_D4XX` and `CONFIG_SID_D5XX`
@@ -125,7 +149,7 @@ Needs 30-250 more space in KERNAL segment (depending on the features enabled for
### `CONFIG_KEYBOARD_C128`
Allows to use additional keys found on the C128 keyboard. NOTE: might be buggy, on VICE emulator I can't get all the keys working.
Allows to use additional keys found on the C128 keyboard.
Needs about 130 bytes more space in KERNAL segment. If unsure - disable.
@@ -135,6 +159,10 @@ Allows to use CAPS LOCK key on the C128 keyboard, this is independent from `CONF
Needs about 50 bytes more space in KERNAL segment. If unsure - disable.
### `CONFIG_KEYBOARD_C65`, `CONFIG_KEYBOARD_C65_CAPS_LOCK`
Similar, but for C65 keyboard. Please note - the C65 keyboard support is (as of yet) completely untested!
### `CONFIG_KEY_REPEAT_DEFAULT`
Enables key repetition by default during the startup (sets `RPTFLG`).
@@ -157,25 +185,27 @@ Needs 13 bytes more space in KERNAL segment. Only disable if you are running out
Joystick movement also moves the cursor.
Needs about 65 bytes of ROM space to handle both joysticks.
Needs about 65 bytes of ROM space in KERNAL segment to handle both joysticks.
## Eye candy
### `CONFIG_PROGRAMMABLE_KEYS`
### `CONFIG_COLORS_BRAND`
Allows to assign command to any function key, `RUN` key and `HELP` key (if selected keybaord has one) - just fill-in appropriate `CONFIG_KEYCMD_*` variable(s). Keys not present on the selected keyboard are ignored.
Tries to adjust the color scheme to the selected brand. Some brands might not support this.
Needs 25 bytes more space in KERNAL segment for the code. In addition, each configured key takes 3 bytes + length of the command.
### `CONFIG_BANNER_SIMPLE`, `CONFIG_BANNER_FANCY`, `CONFIG_BANNER_BRAND`
## Screen editor
Select startup banner - either a simple one, or with some colorful elements. `CONFIG_BANNER_BRAND` heavily depends on the selected brand, not all the brands support it.
### `CONFIG_EDIT_STOPQUOTE`
Richer banners need more BASIC segment, varies between brands.
If enabled, STOP key terminates insert/quote mode (like on some _Black Box_ cartridges).
### `CONFIG_BANNER_PAL_NTSC`
Feature needs 12 bytes in KERNAL segment. If unsure - enable.
If enabled, prints video system on startup banner. Eye candy only.
### `CONFIG_EDIT_TABULATORS`
Feature needs some bytes in BASIC (depending on banner type) and about 25 bytes in KERNAL segment.
If enabled, allows use of TAB (or CTRL+>) and SHIFT+TAB (or CTRL+<) to switch between predefined tabulator positions.
Feature needs 35-45 bytes in KERNAL segment. If unsure - enable.
## Software features
@@ -191,12 +221,42 @@ If enabled, a simple DOS wedge is available from the direct mode - supports `@<d
Feature needs about 330 bytes in BASIC segment. If unsure - enable.
### `CONFIG_TAPE_WEDGE`
If enabled, a simple DOS wedge is available from the direct mode for turbo tape loading - supports `←L` only
Feature needs about 5 bytes in BASIC segment. If unsure - enable.
### `CONFIG_BCD_SAFE_INTERRUPTS`
On the most widespread CPUs the D flag is not cleared upon entering interrupts. Since the original Kernal does not clear it either, it's not safe to use BCD processor mode without disabling the interrupts first. This option makes sure the D flag is disabled at the start of the interrupt - this allows some optimizations in the code.
Feature needs 2 bytes in KERNAL segmment (for CPUs needing the patch), but at the same time allows optimizations allowing to gain some more bytes. If unsure - enable.
## Eye candy
### `CONFIG_COLORS_BRAND`
Tries to adjust the color scheme to the selected brand. Some brands might not support this.
### `CONFIG_BANNER_SIMPLE`, `CONFIG_BANNER_FANCY`, `CONFIG_BANNER_BRAND`
Select startup banner - either a simple one, or with some colorful elements. `CONFIG_BANNER_BRAND` heavily depends on the selected brand, not all the brands support it.
Richer banners need more BASIC segment, varies between brands.
### `CONFIG_SHOW_FEATURES`
If enabled, shows the most important compiled-in features on the startup screen.
It is recommended to keep it enabled for informational purposes.
### `CONFIG_BANNER_PAL_NTSC`
If enabled, prints video system on startup banner. Eye candy only.
Feature needs few bytes in BASIC and about 25 bytes in KERNAL segment.
## Debug options
Options in this section are for debug purposes only. If unsure - disable.
+27 -13
View File
@@ -1,4 +1,9 @@
# Test files
TESTDISK = testsuite/testdisk.d64
TESTTAPE = testsuite/testtape-turbo.tap
# Source files
SRCDIR_COMMON = c64/aliases
@@ -11,16 +16,23 @@ SRCDIR_BASIC = $(SRCDIR_COMMON) \
SRCDIR_KERNAL = $(SRCDIR_COMMON) \
c64/kernal \
c64/kernal/,stubs \
c64/kernal/assets \
c64/kernal/jumptable \
c64/kernal/iec \
c64/kernal/iec_fast \
c64/kernal/init \
c64/kernal/interrupts \
c64/kernal/iostack \
c64/kernal/jumptable \
c64/kernal/keyboard \
c64/kernal/memory \
c64/kernal/print \
c64/kernal/rom_revision \
c64/kernal/rs232 \
c64/kernal/screen \
c64/kernal/stubs
c64/kernal/tape \
c64/kernal/time
SRC_TOOLS = $(wildcard src/tools/*.c,src/tools/*.cc)
@@ -65,14 +77,16 @@ GIT_COMMIT:= $(shell git log -1 --pretty='%h' | tr '[:lower:]' '[:upper:]')
.PHONY: all clean updatebin
all: $(STD_TARGET_LIST) $(EXT_TARGET_LIST)
all:
$(MAKE) -j64 --output-sync=target $(STD_TARGET_LIST) $(EXT_TARGET_LIST)
clean:
@rm -rf build c64/basic/combined.s c64/kernal/combined.s
updatebin: $(STD_TARGET_LIST) $(TOOL_RELEASE)
$(TOOL_RELEASE) -i ./build -o ./bin basic_generic.rom kernal_generic.rom basic_testing.rom kernal_testing.rom basic_mega65.rom kernal_mega65.rom basic_ultimate64.rom kernal_ultimate64.rom
cp build/chargen.rom bin/chargen.rom
updatebin:
$(MAKE) -j64 --output-sync=target $(STD_TARGET_LIST) $(EXT_TARGET_LIST) $(TOOL_RELEASE)
$(TOOL_RELEASE) -i ./build -o ./bin basic_generic.rom kernal_generic.rom basic_testing.rom kernal_testing.rom basic_mega65.rom kernal_mega65.rom basic_ultimate64.rom kernal_ultimate64.rom newc65.rom
cp build/chargen.rom bin/chargen.rom
# Rules - tools
@@ -218,28 +232,28 @@ build/newc65.rom: build/kernal_mega65.rom build/basic_mega65.rom build/chargen.r
test: test_generic
test_generic: build/kernal_generic.rom build/basic_generic.rom build/symbols_generic.vs
x64 -kernal build/kernal_generic.rom -basic build/basic_generic.rom -moncommands build/symbols_generic.vs -8 empty.d64
x64 -kernal build/kernal_generic.rom -basic build/basic_generic.rom -moncommands build/symbols_generic.vs -1 $(TESTTAPE) -8 $(TESTDISK)
test_generic_x128: build/kernal_generic.rom build/basic_generic.rom build/symbols_generic.vs
x128 -go64 -kernal64 build/kernal_generic.rom -basic64 build/basic_generic.rom -moncommands build/symbols_generic.vs -8 empty.d64
x128 -go64 -kernal64 build/kernal_generic.rom -basic64 build/basic_generic.rom -moncommands build/symbols_generic.vs -1 $(TESTTAPE) -8 $(TESTDISK)
test_testing: build/kernal_testing.rom build/basic_testing.rom build/symbols_testing.vs
x64 -kernal build/kernal_testing.rom -basic build/basic_testing.rom -moncommands build/symbols_testing.vs -8 empty.d64
x64 -kernal build/kernal_testing.rom -basic build/basic_testing.rom -moncommands build/symbols_testing.vs -1 $(TESTTAPE) -8 $(TESTDISK)
test_mega65: build/kernal_mega65.rom build/basic_mega65.rom build/symbols_mega65.vs
x64 -kernal build/kernal_mega65.rom -basic build/basic_mega65.rom -moncommands build/symbols_mega65.vs -8 empty.d64
x64 -kernal build/kernal_mega65.rom -basic build/basic_mega65.rom -moncommands build/symbols_mega65.vs -1 $(TESTTAPE) -8 $(TESTDISK)
test_mega65_xemu: build/newc65.rom
../xemu/build/bin/xc65.native -dmarev 2 -rom build/newc65.rom
../xemu/build/bin/xmega65.native -dmarev 2 -forcerom -loadrom build/newc65.rom
test_ultimate64: build/kernal_ultimate64.rom build/basic_ultimate64.rom build/symbols_ultimate64.vs
x64 -kernal build/kernal_ultimate64.rom -basic build/basic_ultimate64.rom -moncommands build/symbols_ultimate64.vs -8 empty.d64
x64 -kernal build/kernal_ultimate64.rom -basic build/basic_ultimate64.rom -moncommands build/symbols_ultimate64.vs -1 $(TESTTAPE) -8 $(TESTDISK)
test_hybrid: build/kernal_hybrid.rom build/symbols_hybrid.vs
@echo
@echo $(HYBRID_WARNING)
@echo
x64 -kernal build/kernal_hybrid.rom -moncommands build/symbols_hybrid.vs -8 empty.d64
x64 -kernal build/kernal_hybrid.rom -moncommands build/symbols_hybrid.vs -1 $(TESTTAPE) -8 $(TESTDISK)
@echo
@echo $(HYBRID_WARNING)
@echo
+4 -1
View File
@@ -1,6 +1,9 @@
# open-roms
A project to create unencumbered open-source ROMs for use on selected retro computers. For the current status check [this document](STATUS.md)
A project to create unencumbered open-source ROMs for use on selected retro computers. Besides this manifest, the following documents are available:
* [implementation status](STATUS.md) of various APIs and functionalities
* [configuration options](CONFIG.md) for those willing to compile their own, customized build
# Problem Statement and Motivation
+62 -22
View File
@@ -1,17 +1,20 @@
# New features
Here are the features of the Open ROMs not found in the original ROMs from the 80s (many of them are [configurable](CONFIG.md)):
Here are the features of the Open ROMs not found in the original ROMs from the 80s (many of them are [configurable](CONFIG.md) during compilation):
* improved keyboard scanning, supports anti-ghosting and is resistant to joystick interference (one variant even supports multi-keyy rollover)
* improved keyboard scanning, resistant to ghosting and joystick interference (one variant even supports multi-keyy rollover), supports additional C128 keys
* joystick can be used to move text cursor
* pre-defined function keys
* uses RAM under ROM and I/O: 61438 bytes free
* cold/warm start silences multiple SID chips - all $D4xx and $D5xx addresses
* wark start due to BRK prints out the instruction address
* cold/warm start silences multiple SID chips - all $D4xx and $D5xx addresses, configured addresses
* warm start due to BRK prints out the instruction address
* extended `LOAD` command
* start/end addresses are displayed, in the Final cartridge style
* command with just the file name tries to use the last device if it's number seems sane; otherwise uses 8
* secondary address over 255 is considered a start address
* JiffyDOS protocol support
* turbo tape load support (as device 7 or using `←L`)
* DOS wedge (direct mode only) - `@<drive_number>`, `@<command>`, `@$`, `@$<params>`, `@`
NOTE: extra features and their syntax can change in the future!
@@ -19,6 +22,10 @@ NOTE: extra features and their syntax can change in the future!
# Features missing
The following ROM features are currently missing and are not planned due to space considerations:
* full tape support - VERIFY, SAVE, sequential files; tape is considered a legacy medium, so it's support is going to be limited
* mock 6551 emulation - this only complicates the RS-232 support for original ROMs, probably noone needs it
The following ROM features are currently missing:
@@ -26,12 +33,46 @@ The following ROM features are currently missing:
* BASIC variables
* BASIC expression parsing
* floating point routines
* tape support
* tape (normal mode) support
* RS-232 support
* breaking Kernal routines with RUN/STOP key
* NMI handling is incomplete
# Hardware support status
## Keyboard
| Driver | Status | Remarks |
| :-----------: | :------: | :------------------------------------------------: |
| C64 | DONE | |
| C128 | DONE | |
| C65 / Mega65 | NOT DONE | code should be complete, but is not tested yet |
## Tape storage (LOAD only!)
| Driver | Status | Remarks |
| :-----------: | :------: | :------------------------------------------------: |
| normal | NOT DONE | |
| turbo | PARTIAL | works, to do: use sync to calibrate read speed |
## IEC bus (disk drives, etc.)
| Driver | Status | Remarks |
| :-----------: | :------: | :------------------------------------------------: |
| standard | DONE | |
| JiffyDOS | DONE | |
| DolphinDOS | NOT DONE | |
| CIA burst mod | NOT DONE | |
## RS-232
| Driver | Status | Remarks |
| :-----------: | :------: | :------------------------------------------------: |
| UP2400 | NOT DONE | |
| UP9600 | NOT DONE | work in progress, not functional yet |
| ACIA 6551 | NOT DONE | |
# API status
@@ -48,8 +89,6 @@ For the current status of the low memory location implementation andd usage chec
### Official BASIC routines
Note: vectors at `$0300` are not supported yet - for now only the locations below can be used!
<br />
| Entry | Unofficial | Name | Status | Remarks |
@@ -84,6 +123,7 @@ Not all of them - only these we want to have implemented.
| `$A68E` | RUNC | DONE | |
| `$A7AE` | NEWSTT | PARTIAL | redirected to RUN command |
| `$AB1E` | STROUT | DONE | |
| `$AD9E` | FRMEVL | NOT DONE | |
| `$BDCD` | LINPRT | DONE | temporary implementation |
| `$E3BF` | INIT | NOT DONE | |
| `$E422` | INITMSG | DONE | |
@@ -103,8 +143,8 @@ NOTE: Even the 'DONE' routines won't support features described as missing in on
| :-------: | :--------: | :---------- | :------: | :--------------------------------------------------: |
| `($028F)` | | `KEYLOG` | DONE | |
| `$FF81` | `$FF5B` | `CINT` | DONE | |
| `$FF84` | `$FDA3` | `IOINIT` | PARTIAL | CIA initialization might be incomplete |
| `$FF87` | `$FD50` | `RAMTAS` | PARTIAL | probably shouldn't touch VIC and CIA's |
| `$FF84` | `$FDA3` | `IOINIT` | PARTIAL | CIA initialization incomplete |
| `$FF87` | `$FD50` | `RAMTAS` | DONE | |
| `$FF8A` | `$FD15` | `RESTOR` | DONE | |
| `$FF8D` | `$FD1A` | `VECTOR` | DONE | |
| `$FF90` | | `SETMSG` | DONE | |
@@ -126,26 +166,26 @@ NOTE: Even the 'DONE' routines won't support features described as missing in on
| `$FFC0` | `$F34A` | `OPEN` | DONE | |
| `$FFC3` | `$F291` | `CLOSE` | DONE | |
| `$FFC6` | `$F20E` | `CHKIN` | DONE | |
| `$FFC9` | `$F250` | `CKOUT` | PARTIAL | |
| `$FFC9` | `$F250` | `CKOUT` | DONE | |
| `$FFCC` | `$F333` | `CLRCHN` | DONE | |
| `$FFCF` | `$F157` | `CHRIN` | PARTIAL | |
| `$FFD2` | `$F1CA` | `CHROUT` | PARTIAL | |
| `$FFD5` | `$F49E` | `LOAD` | PARTIAL | not yet clear what's this entry doing |
| `($0330)` | `$F4A5` | `LOAD` | PARTIAL | no VERIFY support, no STOP key, check $F49E addr |
| `$FFD8` | `$F5DD` | `SAVE` | NOT DONE | |
| `($0332)` | `$F5ED` | `SAVE` | NOT DONE | |
| `$FFCF` | `$F157` | `CHRIN` | PARTIAL | no screen device support |
| `$FFD2` | `$F1CA` | `CHROUT` | DONE | |
| `$FFD5` | `$F49E` | `LOAD` | DONE | |
| `($0330)` | `$F4A5` | `LOAD` | DONE | |
| `$FFD8` | `$F5DD` | `SAVE` | DONE | |
| `($0332)` | `$F5ED` | `SAVE` | DONE | |
| `$FFDB` | | `SETTIM` | DONE | |
| `$FFDE` | | `RDTIM` | DONE | |
| `$FFE1` | `$F6ED` | `STOP` | DONE | |
| `$FFE4` | `$F13E` | `GETIN` | PARTIAL | only keyboard supported |
| `$FFE4` | `$F13E` | `GETIN` | PARTIAL | no screen device support |
| `$FFE7` | `$F32F` | `CLALL` | DONE | |
| `$FFEA` | | `UDTIM` | DONE | |
| `$FFED` | | `SCREEN` | DONE | |
| `$FFF0` | `$E50A` | `PLOT` | DONE | |
| `$FFF3` | | `IOBASE` | DONE | |
| `($FFFA)` | | NMI vec | PARTIAL | |
| `($FFFC)` | `$FCE2` | RESET vec | PARTIAL | |
| `($FFFE)` | | IRQ/BRK vec | PARTIAL | |
| `($FFFC)` | `$FCE2` | RESET vec | PARTIAL | see IOINIT status |
| `($FFFE)` | | IRQ/BRK vec | DONE | |
<br />
@@ -162,10 +202,11 @@ Not all of them - only these we want to have implemented.
| `$E544` | clear screen | DONE | |
| `$E50C` | set cursor position | PARTIAL | |
| `$E566` | home cursor | NOT DONE | |
| `$E5A0` | setup VIC II & IO | DONE | |
| `$E5A0` | setup VIC II & I/O | DONE | |
| `$E6B6` | advance cursor | NOT DONE | |
| `$E701` | previous line | NOT DONE | |
| `$E716` | screen CHROUT | NOT DONE | |
| `$E8DA` | color code table | DONE | |
| `$E8EA` | scroll line | NOT DONE | |
| `$E96C` | insert line on top | NOT DONE | |
| `$E9FF` | clear line | NOT DONE | |
@@ -176,7 +217,6 @@ Not all of them - only these we want to have implemented.
| `$F646` | IEC close | NOT DONE | |
| `$FD30` | default vectors | DONE | |
| `$FD90` | (unknown) | NOT DONE | |
| `$FD90` | (unknown) | NOT DONE | |
| `$FE2D` | memtop set part | DONE | |
| `$FE47` | default NMI | PARTIAL | |
| `$FE66` | default BRK | DONE | |
Executable → Regular
+3 -2
View File
@@ -1,2 +1,3 @@
-showmem
-symbolfile
# These are the defaults - not needed for Open ROMs build system
# -showmem
# -symbolfile
Executable → Regular
View File
File mode changed.
Executable → Regular
View File
File mode changed.
-1
View File
@@ -1 +0,0 @@
Put KickAss.jar and KickAss.cfg into this directory.
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
View File
Binary file not shown.
+52 -8
View File
@@ -1,5 +1,6 @@
.const CONFIG_ID = $00 // should be 1 byte, different for each config file!
.encoding "petscii_upper"
//
// Please read CONFIG.md before modifying this file!
@@ -37,6 +38,17 @@
// #define CONFIG_MEMORY_MODEL_60K
// I/O devices
#define CONFIG_IEC
#define CONFIG_IEC_BLANK_SCREEN
#define CONFIG_IEC_JIFFYDOS
// #define CONFIG_TAPE_NORMAL // please keep disabled for now
#define CONFIG_TAPE_TURBO
// #define CONFIG_RS232_UP2400 // please keep disabled for now
// #define CONFIG_RS232_UP9600 // please keep disabled for now
// Multiple SID support
// #define CONFIG_SID_2ND
@@ -52,14 +64,52 @@
// Keyboard settings
// #define CONFIG_LEGACY_SCNKEY
#define CONFIG_KEYBOARD_C128 // incomplete
#define CONFIG_KEYBOARD_C128
#define CONFIG_KEYBOARD_C128_CAPS_LOCK
// #define CONFIG_KEYBOARD_C65 // untested
// #define CONFIG_KEYBOARD_C65_CAPS_LOCK // untested
// #define CONFIG_KEY_REPEAT_DEFAULT
// #define CONFIG_KEY_REPEAT_ALWAYS
#define CONFIG_KEY_FAST_SCAN
#define CONFIG_JOY1_CURSOR
#define CONFIG_JOY2_CURSOR
#define CONFIG_PROGRAMMABLE_KEYS
.const CONFIG_KEYCMD_RUN = @"\$5FL"
.const CONFIG_KEYCMD_F1 = @"@"
.const CONFIG_KEYCMD_F2 = @""
.const CONFIG_KEYCMD_F3 = @"RUN:"
.const CONFIG_KEYCMD_F4 = @""
.const CONFIG_KEYCMD_F5 = @"LOAD"
.const CONFIG_KEYCMD_F6 = @""
.const CONFIG_KEYCMD_F7 = @"@$"
.const CONFIG_KEYCMD_F8 = @""
.const CONFIG_KEYCMD_HELP = @"LIST"
.const CONFIG_KEYCMD_F9 = @""
.const CONFIG_KEYCMD_F10 = @""
.const CONFIG_KEYCMD_F11 = @""
.const CONFIG_KEYCMD_F12 = @""
.const CONFIG_KEYCMD_F13 = @""
.const CONFIG_KEYCMD_F14 = @""
// Screen editor
#define CONFIG_EDIT_STOPQUOTE
#define CONFIG_EDIT_TABULATORS
// Software features
#define CONFIG_PANIC_SCREEN
#define CONFIG_DOS_WEDGE
#define CONFIG_TAPE_WEDGE
#define CONFIG_BCD_SAFE_INTERRUPTS
// Eye candy
@@ -67,16 +117,10 @@
// #define CONFIG_BANNER_SIMPLE
#define CONFIG_BANNER_FANCY
// #define CONFIG_BANNER_BRAND
#define CONFIG_SHOW_FEATURES
#define CONFIG_SHOW_PAL_NTSC
// Software features
#define CONFIG_PANIC_SCREEN
#define CONFIG_DOS_WEDGE
#define CONFIG_BCD_SAFE_INTERRUPTS
// Debug options
// #define CONFIG_DBG_STUBS_BRK
+54 -10
View File
@@ -1,5 +1,6 @@
.const CONFIG_ID = $01 // should be 1 byte, different for each config file!
.encoding "petscii_upper"
//
// Please read CONFIG.md before modifying this file!
@@ -33,19 +34,30 @@
// #define CONFIG_CPU_WDC_65816
// Memory model configuration
// Memory model
#define CONFIG_MEMORY_MODEL_38K
// #define CONFIG_MEMORY_MODEL_60K
// I/O devices
#define CONFIG_IEC
#define CONFIG_IEC_BLANK_SCREEN
#define CONFIG_IEC_JIFFYDOS
// #define CONFIG_TAPE_NORMAL // please keep disabled for now
// #define CONFIG_TAPE_TURBO
// #define CONFIG_RS232_UP2400 // please keep disabled for now
// #define CONFIG_RS232_UP9600 // please keep disabled for now
// Multiple SID support
#define CONFIG_SID_2ND
.const CONFIG_SID_2ND_ADDRESS = $D420
.const CONFIG_SID_2ND_ADDRESS = $D440
// #define CONFIG_SID_3RD
.const CONFIG_SID_3RD_ADDRESS = $D440
.const CONFIG_SID_3RD_ADDRESS = $D480
// #define CONFIG_SID_D4XX
// #define CONFIG_SID_D5XX
@@ -54,31 +66,63 @@
// Keyboard settings
// #define CONFIG_LEGACY_SCNKEY
// #define CONFIG_KEYBOARD_C128 // incomplete
// #define CONFIG_KEYBOARD_C128
// #define CONFIG_KEYBOARD_C128_CAPS_LOCK
#define CONFIG_KEYBOARD_C65 // untested
#define CONFIG_KEYBOARD_C65_CAPS_LOCK // untested
// #define CONFIG_KEY_REPEAT_DEFAULT
// #define CONFIG_KEY_REPEAT_ALWAYS
#define CONFIG_KEY_FAST_SCAN
#define CONFIG_JOY1_CURSOR
#define CONFIG_JOY2_CURSOR
#define CONFIG_PROGRAMMABLE_KEYS
// Eye candy
.const CONFIG_KEYCMD_RUN = @"LOAD\"*\""
#define CONFIG_COLORS_BRAND
// #define CONFIG_BANNER_SIMPLE
// #define CONFIG_BANNER_FANCY
#define CONFIG_BANNER_BRAND
// #define CONFIG_SHOW_PAL_NTSC
.const CONFIG_KEYCMD_F1 = @"@"
.const CONFIG_KEYCMD_F2 = @""
.const CONFIG_KEYCMD_F3 = @"RUN:"
.const CONFIG_KEYCMD_F4 = @""
.const CONFIG_KEYCMD_F5 = @"LOAD"
.const CONFIG_KEYCMD_F6 = @""
.const CONFIG_KEYCMD_F7 = @"@$"
.const CONFIG_KEYCMD_F8 = @""
.const CONFIG_KEYCMD_HELP = @"LIST"
.const CONFIG_KEYCMD_F9 = @""
.const CONFIG_KEYCMD_F10 = @""
.const CONFIG_KEYCMD_F11 = @""
.const CONFIG_KEYCMD_F12 = @""
.const CONFIG_KEYCMD_F13 = @""
.const CONFIG_KEYCMD_F14 = @""
// Screen editor
#define CONFIG_EDIT_STOPQUOTE
#define CONFIG_EDIT_TABULATORS
// Software features
#define CONFIG_PANIC_SCREEN
#define CONFIG_DOS_WEDGE
// #define CONFIG_TAPE_WEDGE
#define CONFIG_BCD_SAFE_INTERRUPTS
// Eye candy
#define CONFIG_COLORS_BRAND
// #define CONFIG_BANNER_SIMPLE
#define CONFIG_BANNER_FANCY
// #define CONFIG_BANNER_BRAND // do not enable for now, triggers screen editor bug under XEMU
#define CONFIG_SHOW_FEATURES
// #define CONFIG_SHOW_PAL_NTSC
// Debug options
// #define CONFIG_DBG_STUBS_BRK
+53 -9
View File
@@ -1,5 +1,6 @@
.const CONFIG_ID = $F0 // should be 1 byte, different for each config file!
.encoding "petscii_upper"
//
// Please read CONFIG.md before modifying this file!
@@ -32,18 +33,29 @@
// #define CONFIG_CPU_WDC_65816
// Memory model configuration
// Memory model
// #define CONFIG_MEMORY_MODEL_38K
#define CONFIG_MEMORY_MODEL_60K
// I/O devices
#define CONFIG_IEC
// #define CONFIG_IEC_BLANK_SCREEN
#define CONFIG_IEC_JIFFYDOS
// #define CONFIG_TAPE_NORMAL // please keep disabled for now
#define CONFIG_TAPE_TURBO
// #define CONFIG_RS232_UP2400 // please keep disabled for now
// #define CONFIG_RS232_UP9600 // please keep disabled for now
// Multiple SID support
#define CONFIG_SID_2ND
.const CONFIG_SID_2ND_ADDRESS = $D420
// #define CONFIG_SID_3RD
#define CONFIG_SID_3RD
.const CONFIG_SID_3RD_ADDRESS = $D440
// #define CONFIG_SID_D4XX
@@ -53,31 +65,63 @@
// Keyboard settings
#define CONFIG_LEGACY_SCNKEY
// #define CONFIG_KEYBOARD_C128 // incomplete
// #define CONFIG_KEYBOARD_C128
// #define CONFIG_KEYBOARD_C128_CAPS_LOCK
// #define CONFIG_KEYBOARD_C65 // untested
// #define CONFIG_KEYBOARD_C65_CAPS_LOCK // untested
// #define CONFIG_KEY_REPEAT_DEFAULT
// #define CONFIG_KEY_REPEAT_ALWAYS
#define CONFIG_KEY_FAST_SCAN
#define CONFIG_JOY1_CURSOR
#define CONFIG_JOY2_CURSOR
#define CONFIG_PROGRAMMABLE_KEYS
// Eye candy
.const CONFIG_KEYCMD_RUN = @"\$5FL"
// #define CONFIG_COLORS_BRAND
// #define CONFIG_BANNER_SIMPLE
#define CONFIG_BANNER_FANCY
// #define CONFIG_BANNER_BRAND
// #define CONFIG_SHOW_PAL_NTSC
.const CONFIG_KEYCMD_F1 = @"@"
.const CONFIG_KEYCMD_F2 = @""
.const CONFIG_KEYCMD_F3 = @"RUN:"
.const CONFIG_KEYCMD_F4 = @""
.const CONFIG_KEYCMD_F5 = @"LOAD"
.const CONFIG_KEYCMD_F6 = @""
.const CONFIG_KEYCMD_F7 = @"@$"
.const CONFIG_KEYCMD_F8 = @""
.const CONFIG_KEYCMD_HELP = @"LIST"
.const CONFIG_KEYCMD_F9 = @""
.const CONFIG_KEYCMD_F10 = @""
.const CONFIG_KEYCMD_F11 = @""
.const CONFIG_KEYCMD_F12 = @""
.const CONFIG_KEYCMD_F13 = @""
.const CONFIG_KEYCMD_F14 = @""
// Screen editor
#define CONFIG_EDIT_STOPQUOTE
#define CONFIG_EDIT_TABULATORS
// Software features
#define CONFIG_PANIC_SCREEN
#define CONFIG_DOS_WEDGE
#define CONFIG_TAPE_WEDGE
#define CONFIG_BCD_SAFE_INTERRUPTS
// Eye candy
// #define CONFIG_COLORS_BRAND
#define CONFIG_BANNER_SIMPLE
// #define CONFIG_BANNER_FANCY
// #define CONFIG_BANNER_BRAND
#define CONFIG_SHOW_FEATURES
#define CONFIG_SHOW_PAL_NTSC
// Debug options
// #define CONFIG_DBG_STUBS_BRK
+52 -8
View File
@@ -1,5 +1,6 @@
.const CONFIG_ID = $02 // should be 1 byte, different for each config file!
.encoding "petscii_upper"
//
// Please read CONFIG.md before modifying this file!
@@ -31,12 +32,23 @@
// #define CONFIG_CPU_WDC_65816
// Memory model configuration
// Memory model
#define CONFIG_MEMORY_MODEL_38K
// #define CONFIG_MEMORY_MODEL_60K
// I/O devices
#define CONFIG_IEC
#define CONFIG_IEC_BLANK_SCREEN
#define CONFIG_IEC_JIFFYDOS
// #define CONFIG_TAPE_NORMAL // please keep disabled for now
#define CONFIG_TAPE_TURBO
// #define CONFIG_RS232_UP2400 // please keep disabled for now
// #define CONFIG_RS232_UP9600 // please keep disabled for now
// Multiple SID support
// #define CONFIG_SID_2ND
@@ -52,31 +64,63 @@
// Keyboard settings
// #define CONFIG_LEGACY_SCNKEY
// #define CONFIG_KEYBOARD_C128 // incomplete
// #define CONFIG_KEYBOARD_C128
// #define CONFIG_KEYBOARD_C128_CAPS_LOCK
// #define CONFIG_KEYBOARD_C65 // untested
// #define CONFIG_KEYBOARD_C65_CAPS_LOCK // untested
// #define CONFIG_KEY_REPEAT_DEFAULT
// #define CONFIG_KEY_REPEAT_ALWAYS
#define CONFIG_KEY_FAST_SCAN
#define CONFIG_JOY1_CURSOR
#define CONFIG_JOY2_CURSOR
#define CONFIG_PROGRAMMABLE_KEYS
// Eye candy
.const CONFIG_KEYCMD_RUN = @"\$5FL"
#define CONFIG_COLORS_BRAND
// #define CONFIG_BANNER_SIMPLE
#define CONFIG_BANNER_FANCY
// #define CONFIG_BANNER_BRAND
#define CONFIG_SHOW_PAL_NTSC
.const CONFIG_KEYCMD_F1 = @"@"
.const CONFIG_KEYCMD_F2 = @""
.const CONFIG_KEYCMD_F3 = @"RUN:"
.const CONFIG_KEYCMD_F4 = @""
.const CONFIG_KEYCMD_F5 = @"LOAD"
.const CONFIG_KEYCMD_F6 = @""
.const CONFIG_KEYCMD_F7 = @"@$"
.const CONFIG_KEYCMD_F8 = @""
.const CONFIG_KEYCMD_HELP = @"LIST"
.const CONFIG_KEYCMD_F9 = @""
.const CONFIG_KEYCMD_F10 = @""
.const CONFIG_KEYCMD_F11 = @""
.const CONFIG_KEYCMD_F12 = @""
.const CONFIG_KEYCMD_F13 = @""
.const CONFIG_KEYCMD_F14 = @""
// Screen editor
#define CONFIG_EDIT_STOPQUOTE
#define CONFIG_EDIT_TABULATORS
// Software features
#define CONFIG_PANIC_SCREEN
#define CONFIG_DOS_WEDGE
#define CONFIG_TAPE_WEDGE
#define CONFIG_BCD_SAFE_INTERRUPTS
// Eye candy
// #define CONFIG_COLORS_BRAND
// #define CONFIG_BANNER_SIMPLE
#define CONFIG_BANNER_FANCY
// #define CONFIG_BANNER_BRAND
#define CONFIG_SHOW_FEATURES
#define CONFIG_SHOW_PAL_NTSC
// Debug options
// #define CONFIG_DBG_STUBS_BRK
+158 -11
View File
@@ -3,10 +3,11 @@
// Various configuration dependent aliases/macros/checks
//
.encoding "petscii_upper"
// Check that platform configuration is correct
{
.var selected = 0;
@@ -20,7 +21,6 @@
// Check that motherboard extras configuration is correct
{
.var selected = 0;
@@ -44,7 +44,6 @@
// Check that brand configuration is correct
{
.var selected = 0;
@@ -74,7 +73,6 @@
// Check that processor configuration is correct
{
.var selected = 0;
@@ -97,7 +95,6 @@
// Check that memory model configuration is correct
{
.var selected = 0;
@@ -112,9 +109,26 @@
}
// Check that I/O configuration is correct
{
#if CONFIG_IEC_JIFFYDOS && !CONFIG_IEC
.error "CONFIG_IEC_JIFFYDOS requires CONFIG_IEC"
#endif
.var selected_rs232 = 0;
#if CONFIG_RS232_UP2400
.eval selected_rs232++
#endif
#if CONFIG_RS232_UP9600
.eval selected_rs232++
#endif
.if (selected_rs232 > 1) .error "Please select at most one CONFIG_RS232_* option"
}
// Check that startup banner configuration is correct
{
.var selected = 0;
@@ -134,8 +148,8 @@
.error "CONFIG_BANNER_BRAND is not supported for your CONFIG_BRAND_*"
#endif
#if CONFIG_BANNER_BRAND && CONFIG_BRAND_MEGA_65 && CONFIG_SHOW_PAL_NTSC
.error "MEGA65 brand banner does not support showing PAL/NTSC"
#if CONFIG_MB_MEGA_65 && CONFIG_SHOW_PAL_NTSC
.error "MEGA65 can switch PAL/NTSC during run-time, CONFIG_SHOW_PAL_NTSC makes no sense"
#endif
}
@@ -143,15 +157,70 @@
// Check if keyboard options are correct
.function CHECK_KEYCMD(keycmd)
{
#if CONFIG_LEGACY_SCNKEY && (CONFIG_KEYBOARD_C128 || CONFIG_KEYBOARD_C128_CAPS_LOCK)
.error "CONFIG_LEGACY_SCNKEY and CONFIG_KEYBOARD_C128* are mutually exclusive"
.if (keycmd.size() > 0) .return 1
.return 0
}
{
#if CONFIG_LEGACY_SCNKEY && CONFIG_RS232_UP9600
.error "CONFIG_LEGACY_SCNKEY is not compatible with CONFIG_RS232_UP9600"
#endif
#if CONFIG_LEGACY_SCNKEY && (CONFIG_KEYBOARD_C128 || CONFIG_KEYBOARD_C128_CAPS_LOCK || CONFIG_KEYBOARD_C65 || CONFIG_KEYBOARD_C65_CAPS_LOCK)
.error "CONFIG_LEGACY_SCNKEY and CONFIG_KEYBOARD_C128* / CONFIG_KEYBOARD_C65* are mutually exclusive"
#endif
#if (CONFIG_MB_MEGA_65 || CONFIG_MB_ULTIMATE_64) && (CONFIG_KEYBOARD_C128 || CONFIG_KEYBOARD_C128_CAPS_LOCK)
.error "Selected CONFIG_MB_* is not compatible with CONFIG_KEYBOARD_C128*"
#endif
#if CONFIG_MB_ULTIMATE_64 && (CONFIG_KEYBOARD_C65 || CONFIG_KEYBOARD_C65_CAPS_LOCK)
.error "Selected CONFIG_MB_* is not compatible with CONFIG_KEYBOARD_C65*"
#endif
.var num_pkeys_base = 0
.var num_pkeys_ext1 = 0
.var num_pkeys_ext2 = 0
.eval num_pkeys_base += CHECK_KEYCMD(CONFIG_KEYCMD_RUN)
.eval num_pkeys_base += CHECK_KEYCMD(CONFIG_KEYCMD_F1)
.eval num_pkeys_base += CHECK_KEYCMD(CONFIG_KEYCMD_F2)
.eval num_pkeys_base += CHECK_KEYCMD(CONFIG_KEYCMD_F3)
.eval num_pkeys_base += CHECK_KEYCMD(CONFIG_KEYCMD_F4)
.eval num_pkeys_base += CHECK_KEYCMD(CONFIG_KEYCMD_F5)
.eval num_pkeys_base += CHECK_KEYCMD(CONFIG_KEYCMD_F6)
.eval num_pkeys_base += CHECK_KEYCMD(CONFIG_KEYCMD_F7)
.eval num_pkeys_base += CHECK_KEYCMD(CONFIG_KEYCMD_F8)
.eval num_pkeys_ext1 += CHECK_KEYCMD(CONFIG_KEYCMD_HELP)
.eval num_pkeys_ext2 += CHECK_KEYCMD(CONFIG_KEYCMD_F9)
.eval num_pkeys_ext2 += CHECK_KEYCMD(CONFIG_KEYCMD_F10)
.eval num_pkeys_ext2 += CHECK_KEYCMD(CONFIG_KEYCMD_F11)
.eval num_pkeys_ext2 += CHECK_KEYCMD(CONFIG_KEYCMD_F12)
.eval num_pkeys_ext2 += CHECK_KEYCMD(CONFIG_KEYCMD_F13)
.eval num_pkeys_ext2 += CHECK_KEYCMD(CONFIG_KEYCMD_F14)
.var num_pkeys = num_pkeys_base
#if !CONFIG_LEGACY_SCNKEY && (CONFIG_KEYBOARD_C128 || CONFIG_KEYBOARD_C65)
.eval num_pkeys += num_pkeys_ext1
#endif
#if !CONFIG_LEGACY_SCNKEY && CONFIG_KEYBOARD_C65
.eval num_pkeys += num_pkeys_ext2
#endif
#if CONFIG_PROGRAMMABLE_KEYS
.if (num_pkeys == 0) .error "CONFIG_PROGRAMMABLE_KEYS requires at least one defined key"
#endif
}
// Check that features are configured correctly
{
#if CONFIG_TAPE_WEDGE && !CONFIG_TAPE_TURBO
.error "CONFIG_TAPE_WEDGE requires CONFIG_TAPE_TURBO"
#endif
}
@@ -170,6 +239,12 @@
#endif
// Handle I/O configuration
#if CONFIG_RS232_UP2400 || CONFIG_RS232_UP9600
#define HAS_RS232
#endif
// Handle configuration of various features
@@ -200,3 +275,75 @@
STUB_IMPLEMENTATION_RTS()
#endif
}
// Function for printing out build features
.var feature_new_line = false
.function ADD_FEATURE(current_features, new_feature)
{
.var features_str = current_features
.if (!feature_new_line && features_str.size() > 0)
{
.eval features_str = features_str + ", "
}
.if (feature_new_line)
{
.eval feature_new_line = false
.eval features_str = features_str + @"\r"
}
.return features_str + new_feature
}
.function BUILD_FEATURES_STR()
{
.var features_str = ""
#if CONFIG_TAPE_NORMAL
.eval features_str = ADD_FEATURE(features_str, "TAPE LOAD NORMAL")
#elif CONFIG_TAPE_TURBO
.eval features_str = ADD_FEATURE(features_str, "TAPE LOAD TURBO")
#elif CONFIG_TAPE_NORMAL && CONFIG_TAPE_TURBO
.eval features_str = ADD_FEATURE(features_str, "TAPE LOAD NORMAL TURBO")
#endif
.eval feature_new_line = true
#if CONFIG_IEC
.var iec_features_str = "IEC"
#if CONFIG_IEC_DOLPHINDOS
.eval iec_features_str = iec_features_str + " DOLPHIN-DEV"
#endif
#if CONFIG_IEC_JIFFYDOS
.eval iec_features_str = iec_features_str + " JIFFY"
#endif
#if !CONFIG_IEC_DOLPHINDOS && !CONFIG_IEC_JIFFYDOS
.eval iec_features_str = iec_features_str + " NORMAL"
#endif
.eval features_str = ADD_FEATURE(features_str, iec_features_str)
#endif
.eval feature_new_line = true
#if CONFIG_RS232_UP2400
.eval features_str = ADD_FEATURE(features_str, "UP2400")
#endif
#if CONFIG_RS232_UP2400
.eval features_str = ADD_FEATURE(features_str, "UP9600")
#endif
#if CONFIG_KEYBOARD_C128
.eval features_str = ADD_FEATURE(features_str, "KBD 128")
#endif
#if CONFIG_KEYBOARD_C65
.eval features_str = ADD_FEATURE(features_str, "KBD 65")
#endif
.return features_str
}
+11
View File
@@ -17,6 +17,17 @@
}
//
// Trick to skip a 2-byte instruction
//
.pseudocommand skip_2_bytes_trash_nvz
{
.byte $2C
}
//
// Stack manipulation - some CPUs will leave .A unchanged, some will use it as temporary storage, so consider .A trashed
//
+8 -1
View File
@@ -70,6 +70,13 @@
.label VIC_XSCAN = $D02F // C128 only
.label VIC_CLKRATE = $D030 // C128 only
#endif
#if CONFIG_MB_MEGA_65
.label VIC_KEY = $D02F
.label VIC_XPOS = $D050
#endif
// SID registers
@@ -165,7 +172,7 @@
.const BIT_CIA2_PRA_CLK_IN = $40 // 0 - low (pulled), 1 - high (released)
.const BIT_CIA2_PRA_DAT_IN = $80 // 0 - low (pulled), 1 - high (released)
#if CONFIG_MB_MEGA_65
#if CONFIG_MB_MEGA_65
.const C65_EXTKEYS_PR = $D607
.const C65_EXTKEYS_DDR = $D608
+32 -22
View File
@@ -16,30 +16,35 @@
.const KEY_FLAG_SHIFT = %00000001
.const KEY_FLAG_VENDOR = %00000010
.const KEY_FLAG_CTRL = %00000100
.const KEY_FLAG_ALT = %00001000 // C65 / C128
.const KEY_CAPS_LOCK = %00010000 // C65 / C128
.const KEY_FLAG_NO_SCRL = %00100000 // C65 / C128, Open ROMs unofficial
#if CONFIG_KEYBOARD_C128 || CONFIG_KEYBOARD_C65
.const KEY_FLAG_ALT = %00001000
#if CONFIG_KEYBOARD_C128_CAPS_LOCK || CONFIG_KEYBOARD_C65_CAPS_LOCK
.const KEY_CAPS_LOCK = %00010000
#endif
.const KEY_FLAG_NO_SCRL = %00100000 // Open ROMs unofficial
#endif
// Note - the following PETSCII codes are currently unassigned, can be used for further extensions:
//
// $01, $04, $06, $0A, $0B, $0C, $0F, $18, $82
// $01, $02, $04, $06, $0A, $0B, $0C, $0F, $18, $82
.const KEY_NA = $00 // to indicate that no key is presed
// PETSCII codes for our extended screen editor XXX implement these
// PETSCII codes for our extended screen editor
.const KEY_BOTTOM = $02 // CTRL+B - Open ROMs unofficial, DolphinDOS compatible
.const KEY_TAB_FW = $8F // CTRL+>, TAB - Open ROMs unofficial, original TAB conflicts with C64 PETSCII
.const KEY_TAB_BW = $80 // CTRL+<, SHIFT+TAB - Open ROMs unofficial, original TAB conflicts with C64 PETSCII
// PETSCII codes for certain C128 and C65 functionalities XXX implement these
// PETSCII codes for certain C128 and C65 functionalities
.const KEY_BELL = $07 // C65 / C128, no key
.const KEY_ESC = $1B // C65 / C128
#if CONFIG_KEYBOARD_C128 || CONFIG_KEYBOARD_C65
.const KEY_BELL = $07 // no key, originally CTRL+G // XXX implement BELL
.const KEY_ESC = $1B
#endif
// PETSCII codes for programmable keys
@@ -48,22 +53,26 @@
.const KEY_RUN = $83
.const KEY_F1 = $85
.const KEY_F2 = $86
.const KEY_F3 = $87
.const KEY_F4 = $88
.const KEY_F5 = $89
.const KEY_F6 = $8A
.const KEY_F7 = $8B
.const KEY_F2 = $89
.const KEY_F3 = $86
.const KEY_F4 = $8A
.const KEY_F5 = $87
.const KEY_F6 = $8B
.const KEY_F7 = $88
.const KEY_F8 = $8C
.const KEY_F9 = $10 // C65
.const KEY_F10 = $15 // C65
.const KEY_F11 = $16 // C65
.const KEY_F12 = $17 // C65
.const KEY_F13 = $19 // C65
.const KEY_F14 = $1A // C65
#if CONFIG_KEYBOARD_C65
.const KEY_F9 = $10
.const KEY_F10 = $15
.const KEY_F11 = $16
.const KEY_F12 = $17
.const KEY_F13 = $19
.const KEY_F14 = $1A
#endif
.const KEY_HELP = $84 // C65, also used for our C128 support
#if CONFIG_KEYBOARD_C128 || CONFIG_KEYBOARD_C65
.const KEY_HELP = $84 // normally C65 only, also used for our C128 support
#endif
// PETSCII codes for cursor keys
@@ -151,4 +160,5 @@
.const KEY_GT = $3E
.const KEY_QUESTION = $3F
// XXX finish this: $4x, $5x, $6x, $7x, $Ax, $Bx, $Cx, $Dx, $Ex, $Fx
+27 -16
View File
@@ -89,24 +89,32 @@
.label C3PO = $94 // flag - is BSOUR content valid
.label BSOUR = $95 // serial bus buffered output byte
.label SYNO = $96 // -- NOT IMPLEMENTED --
.label XSAV = $97 // -- NOT IMPLEMENTED --
.label XSAV = $97 // temporary register storage for ASCII related routines [!] usage details might differ
.label LDTND = $98 // number of entries in LAT / FAT / SAT tables
.label DFLTN = $99 // default input device
.label DFLTO = $9A // default output device
.label PRTY = $9B // -- NOT IMPLEMENTED --
.label PRTY = $9B // tape storage for parity/checksum
#if !CONFIG_TAPE_NORMAL && !CONFIG_TAPE_TURBO
.label DPSW = $9C // -- NOT IMPLEMENTED --
#else
.label COLSTORE = $9C // [!] screen border storage for tape routines
#endif
.label MSGFLG = $9D // bit 6 = error messages, bit 7 = control message
.label PTR1 = $9E // -- NOT IMPLEMENTED --
.label PTR2 = $9F // -- NOT IMPLEMENTED --
.label TIME = $A0 // $A0-$A2 jiffy clock
.label TSFCNT = $A3 // temporary variable for tape and IEC, [!] our usage probably differs in details
#if !CONFIG_IEC_JIFFYDOS
.label TSFCNT = $A3 // temporary variable for tape and IEC, [!] our usage differs
#else
.label IECPROTO = $A3 // -- WIP -- [!] 0 = normal, 1 = JiffyDOS, >= $80 for unknown
#endif
.label TBTCNT = $A4 // temporary variable for tape and IEC, [!] our usage probably differs in details
.label CNTDN = $A5 // -- NOT IMPLEMENTED --
.label BUFPNT = $A6 // -- NOT IMPLEMENTED --
.label INBIT = $A7 // -- NOT IMPLEMENTED --
#if !CONFIG_LEGACY_SCNKEY
.label BITCI = $A8 // -- NOT IMPLEMENTED --
.label RINONE = $A9 // -- NOT IMPLEMENTED --
.label RINONE = $A9 // -- WIP -- (UP9600 only) RS-232 check for start bit flag
.label RIDDATA = $AA // -- NOT IMPLEMENTED --
.label RIPRTY = $AB // -- NOT IMPLEMENTED --
#endif
@@ -127,13 +135,13 @@
.label SA = $B9 // current secondary address
.label FA = $BA // current device number
.label FNADDR = $BB // $BB-$BC current file name pointer
.label ROPRTY = $BD // -- NOT IMPLEMENTED --
.label ROPRTY = $BD // tape / RS-232 temporary storage
.label FSBLK = $BE // -- NOT IMPLEMENTED --
.label MYCH = $BF // -- NOT IMPLEMENTED --
.label CAS1 = $C0 // -- NOT IMPLEMENTED --
.label CAS1 = $C0 // tape motor interlock
.label STAL = $C1 // $C1-$C2 LOAD/SAVE start address
.label MEMUSS = $C3 // $C3-$C4 temporary address for tape LOAD/SAVE
.label LSTX = $C5 // last keyy matrix position [!] our usage probably differs in details
.label LSTX = $C5 // last key matrix position [!] our usage probably differs in details
.label NDX = $C6 // number of chars in keyboard buffer
.label RVS = $C7 // flag, whether to print reversed characters
.label INDX = $C8 // end of logical line (column, 0-79)
@@ -142,7 +150,7 @@
.label BLNSW = $CC // cursor blink disable flag
.label BLNCT = $CD // cursor blink countdown
.label GDBLN = $CE // cursor saved character
.label BLNON = $CF // cursor visibilityy flag
.label BLNON = $CF // cursor visibility flag
.label CRSW = $D0 // whether to input from screen or keyboard
.label PNT = $D1 // $D1-$D2 pointer to the current screen line
.label PNTR = $D3 // current screen X position
@@ -154,8 +162,8 @@
.label LDTBL = $D9 // $D9-$F2 screen line link table, [!] our usage is different XXX give more details
.label USER = $F3 // $F3-$F4 pointer to current color RAM location
.label KEYTAB = $F5 // $F5-$F6 pointer to keyboard lookup table
.label RIBUF = $F7 // $F7-$F8 -- NOT IMPLEMENTED --
.label ROBUF = $F9 // $F9-$FA -- NOT IMPLEMENTED --
.label RIBUF = $F7 // $F7-$F8 -- WIP -- RS-232 receive buffer pointer
.label ROBUF = $F9 // $F9-$FA -- WIP -- RS-232 send buffer pointer
// $FB $FB-$FE -- UNUSED -- free for user software
.label BASZPT = $FF // -- NOT IMPLEMENTED --
@@ -198,14 +206,14 @@
.label M51CRT = $293 // -- NOT IMPLEMENTED -- mock 6551
.label M51CDR = $294 // -- NOT IMPLEMENTED -- mock 6551
.label M51AJB = $295 // $295-$296 -- NOT IMPLEMENTED -- mock 6551
.label RSSTAT = $297 // -- NOT IMPLEMENTED -- mock 6551, RS-232 status
.label RSSTAT = $297 // -- WIP -- (UP9600 only) mock 6551, RS-232 status
.label BITNUM = $298 // -- NOT IMPLEMENTED --
.label BAUDOF = $299 // $299-$29A -- NOT IMPLEMENTED --
#endif
.label RIDBE = $29B // -- NOT IMPLEMENTED --
.label RIDBS = $29C // -- NOT IMPLEMENTED --
.label RODBS = $29D // -- NOT IMPLEMENTED --
.label RODBE = $29E // -- NOT IMPLEMENTED --
.label RIDBE = $29B // -- WIP -- write pointer into RS-232 receive buffer
.label RIDBS = $29C // -- WIP -- read pointer into RS-232 receive buffer
.label RODBS = $29D // -- WIP -- read pointer into RS-232 send buffer
.label RODBE = $29E // -- WIP -- write pointer into RS-232 send buffer
.label IRQTMP = $29F // $29F-$2A0 -- NOT IMPLEMENTED --
.label ENABL = $2A1 // -- NOT IMPLEMENTED --
.label TODSNS = $2A2 // -- NOT IMPLEMENTED --
@@ -273,6 +281,9 @@
// $314 $334-$33B -- UNUSED -- free for user software
.label TBUFFR = $33C // $33C-$3FB, -- NOT IMPLEMENTED --, tape buffer
.label TBUFFR = $33C // $33C-$3FB [!] tape buffer, our usage details differ
#if CONFIG_RS232_UP9600
.label REVTAB = $37C // $37C-$3FB -- WIP -- [!] RS-232 precalculated data
#endif
// $3FC $3FC-$3FF -- UNUSED -- free for user software
+4
View File
@@ -19,6 +19,10 @@
.label print_return = KERNAL.print_return
.label print_space = KERNAL.print_space
#if CONFIG_SHOW_FEATURES
.label print_features = KERNAL.print_features
#endif
#if CONFIG_SHOW_PAL_NTSC
.label print_pal_ntsc = KERNAL.print_pal_ntsc
#endif
+5
View File
@@ -0,0 +1,5 @@
// XXX provide documentation and implementation
FRMEVL:
STUB_IMPLEMENTATION()
+3
View File
@@ -0,0 +1,3 @@
This routine is desribed in Mapping the C64, page 102, and used at least by CCGMS terminal software - see here:
- https://raw.githubusercontent.com/spathiwa/ccgmsterm/master/original/5a.gs
+15 -7
View File
@@ -62,17 +62,25 @@ rsl_l1:
lda __tokenise_work1
beq basic_read_next_line
#if CONFIG_DOS_WEDGE
// Check if a wedge should take over
#if CONFIG_DOS_WEDGE || CONFIG_TAPE_WEDGE
ldx __tokenise_work1 // here is the size of input
// Check if DOS wedge should take over
lda BUF
cmp #$40 // '@'
bne !+
ldx __tokenise_work1 // here is the size of input
jmp wedge_dos
!:
#endif // CONFIG_DOS_WEDGE
#if CONFIG_DOS_WEDGE
cmp #$40 // '@'
beq_far wedge_dos
#endif
#if CONFIG_TAPE_WEDGE
cmp #$1F // left arrow
beq_far wedge_tape
#endif
#endif
// Else, tokenise the line
jsr tokenise_line
+9 -7
View File
@@ -69,13 +69,13 @@ got_devicenumber:
lda #$00
sta SA
jsr injest_comma
bcs got_secondaryaddress
bcs cmd_load_got_secondaryaddress
jsr basic_parse_line_number
lda LINNUM+1
bne !+
lda LINNUM+0
sta SA
jmp got_secondaryaddress
jmp cmd_load_got_secondaryaddress
!:
// Second parameter is above 255, this can't be a secondary address
// Use it as load address instead
@@ -85,7 +85,7 @@ got_devicenumber:
ldy LINNUM+1
bne got_loadaddress
got_secondaryaddress:
cmd_load_got_secondaryaddress: // input for tape wedge
ldy TXTTAB+1
ldx TXTTAB+0
@@ -97,16 +97,18 @@ got_loadaddress:
jsr print_return
pla
plp
bcc !+
bcc load_no_error
// A = KERNAL error code, which also almost match
// basic ERROR codes, so we can just copy the
// error code to X, decrement, and handle normally
// basic ERROR codes
tax
dex
bpl !+
ldx #B_ERR_BREAK
!:
jmp do_basic_error
!:
load_no_error:
// $YYXX is the last loaded address, so store it
stx VARTAB+0
sty VARTAB+1
+43 -18
View File
@@ -10,27 +10,35 @@ initmsg_real:
ldy #>startup_banner
jsr STROUT
ldx #$02
ldy #$02
ldx #$01
ldy #$04
jsr plot_set
lda #<rom_revision_basic_string
ldy #>rom_revision_basic_string
jsr STROUT
ldx #$04
ldy #$02
ldx #$03
ldy #$04
jsr plot_set
#if CONFIG_SHOW_PAL_NTSC
jsr print_pal_ntsc
#endif
jsr initmsg_bytes_free
ldx #$07
ldx #$06
ldy #$00
#if CONFIG_SHOW_PAL_NTSC && CONFIG_SHOW_FEATURES
jsr plot_set
jsr print_features
jmp print_pal_ntsc
#elif CONFIG_SHOW_PAL_NTSC
jsr plot_set
jmp print_pal_ntsc
#elif CONFIG_SHOW_FEATURES
jsr plot_set
jmp print_features
#else
jmp plot_set
#endif
#elif CONFIG_BANNER_FANCY
@@ -38,7 +46,7 @@ initmsg_real:
ldy #>rainbow_logo
jsr STROUT
ldx #$01
ldx #$00
ldy #$0A
jsr plot_set
@@ -46,7 +54,7 @@ initmsg_real:
ldy #>startup_banner
jsr STROUT
ldx #$03
ldx #$01
ldy #$0A
jsr plot_set
@@ -58,19 +66,27 @@ initmsg_real:
ldy #>rom_revision_basic_string
jsr STROUT
ldx #$05
ldy #$00
ldx #$03
ldy #$0A
jsr plot_set
#if CONFIG_SHOW_PAL_NTSC
jsr print_pal_ntsc
#endif
jsr initmsg_bytes_free
ldx #$07
ldx #$06
ldy #$00
#if CONFIG_SHOW_PAL_NTSC && CONFIG_SHOW_FEATURES
jsr plot_set
jsr print_features
jmp print_pal_ntsc
#elif CONFIG_SHOW_PAL_NTSC
jsr plot_set
jmp print_pal_ntsc
#elif CONFIG_SHOW_FEATURES
jsr plot_set
jmp print_features
#else
jmp plot_set
#endif
#elif CONFIG_BANNER_BRAND && CONFIG_BRAND_MEGA_65
@@ -88,8 +104,17 @@ initmsg_real:
jsr initmsg_bytes_free
#if CONFIG_SHOW_FEATURES
ldx #$04
ldy #$00
jsr plot_set
jsr print_features
jmp print_return
#else
ldx #$05
ldy #$00
jmp plot_set
#endif
#endif
+3 -1
View File
@@ -3,6 +3,8 @@
// Startup banner, to be displayed during cold start
//
.encoding "petscii_upper"
.macro BANNER_TEXT() {
@@ -22,7 +24,7 @@ startup_banner:
#if CONFIG_BANNER_SIMPLE
.text " "
.text " "
BANNER_TEXT()
.byte $00
+7 -2
View File
@@ -66,6 +66,7 @@ wedge_dos_command:
!:
// Retrieve status, print it if not OK
jsr JCLALL
jsr print_return
jsr wedge_dos_status_get
lda BUF+0
cmp #$30 // '0'
@@ -92,6 +93,7 @@ wedge_dos_change_drive:
jmp do_ILLEGAL_DEVICE_NUMBER_error
!:
sta FA
jsr print_return
jmp basic_end_of_line
wedge_dos_status_get:
@@ -133,7 +135,9 @@ wedge_dos_x1:
rts
wedge_dos_status:
jsr wedge_dos_status_get
jsr print_return
// FALLTROUGH
wedge_dos_status_print:
@@ -178,6 +182,9 @@ wedge_dos_directory:
jsr JCHRIN
bcs wedge_dos_basic_error
// Print new line
jsr print_return
wedge_dos_directory_line:
// Load a single line, reuse BASIC input buffer
@@ -225,8 +232,6 @@ wedge_dos_directory_display:
wedge_dos_clean_exit:
jsr JCLALL
// Print new line
jsr print_return
jmp basic_main_loop
wedge_dos_basic_error:
+34
View File
@@ -0,0 +1,34 @@
#if CONFIG_TAPE_WEDGE
// .X has to contain size of the buffer
wedge_tape:
lda #$FF
sta CURLIN+1 // in case of error do not print line number
cpx #$02
bne_far do_SYNTAX_error
lda BUF+1
cmp #$4C // 'L'
bne_far do_SYNTAX_error
// Execute 'arrow + L'
lda #$00
sta FNLEN
ldy #$01
ldx #$07 // turbo tape device
jsr JSETFLS
ldy TXTTAB+1
ldx TXTTAB+0
jmp cmd_load_got_secondaryaddress
#endif // CONFIG_TAPE_WEDGE
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+6
View File
@@ -0,0 +1,6 @@
A color code table, see here:
- https://csdb.dk/forums/index.php?roomid=7&topicid=487
CCGMS termina program expects it to be under original location, see here:
- https://raw.githubusercontent.com/spathiwa/ccgmsterm/master/original/5a.gs
+40 -6
View File
@@ -3,6 +3,9 @@
// Messages to be prined out by Kernal
//
.encoding "petscii_upper"
// Double underscore prevents labels from being passed to VICE (would confuse monitor)
.label __MSG_KERNAL_SEARCHING_FOR = __msg_kernalsearching_for - __msg_kernal_first
@@ -12,6 +15,11 @@
.label __MSG_KERNAL_FROM_HEX = __msg_kernalfrom_hex - __msg_kernal_first
.label __MSG_KERNAL_TO_HEX = __msg_kernalto_hex - __msg_kernal_first
#if CONFIG_TAPE_NORMAL || CONFIG_TAPE_TURBO
.label __MSG_KERNAL_PRESS_PLAY = __msg_kernalplay - __msg_kernal_first
.label __MSG_KERNAL_FOUND = __msg_kernalfound - __msg_kernal_first
#endif
#if CONFIG_SHOW_PAL_NTSC
.label __MSG_KERNAL_PAL = __msg_kernalpal - __msg_kernal_first
.label __MSG_KERNAL_NTSC = __msg_kernalntsc - __msg_kernal_first
@@ -22,6 +30,9 @@
.label __MSG_KERNAL_PANIC_ROM_MISMATCH = __msg_kernalpanic_rom_mismatch - __msg_kernal_first
#endif
#if CONFIG_SHOW_FEATURES
.label __MSG_KERNAL_FEATURES = __msg_kernalfeatures - __msg_kernal_first
#endif
__msg_kernal_first:
@@ -42,8 +53,8 @@ __msg_kernalverifying:
__msg_kernalsaving:
.byte $0D
.text "SAVIN"
.byte $80 + $47 // end of string mark + 'G'
.text "SAVING"
.byte $80 + $20 // end of string mark + space
__msg_kernalfrom_hex:
.text " FROM "
@@ -53,15 +64,30 @@ __msg_kernalto_hex:
.text " TO "
.byte $80 + $24 // end of string mark + '$'
#if CONFIG_TAPE_NORMAL || CONFIG_TAPE_TURBO
__msg_kernalplay:
.byte $0D
.text "PRESS PLAY ON TAPE"
.byte $80 + $0D // end of string mark + return
__msg_kernalfound:
.text "FOUND"
.byte $80 + $20 // end of string mark + space
#endif
#if CONFIG_SHOW_PAL_NTSC
__msg_kernalpal:
.text "PAL,"
.byte $80 + $20 // end of string mark + space
.text "PAL"
.byte $0D
.byte $80 + $0D // end of string mark + return
__msg_kernalntsc:
.text "NTSC,"
.byte $80 + $20 // end of string mark + space
.text "NTSC"
.byte $0D
.byte $80 + $0D // end of string mark + return
#endif // CONFIG_SHOW_PAL_NTSC
@@ -76,3 +102,11 @@ __msg_kernalpanic_rom_mismatch:
.byte $80 + $48 // end of string mark + 'H'
#endif // CONFIG_PANIC_SCREEN
#if CONFIG_SHOW_FEATURES
__msg_kernalfeatures:
.text BUILD_FEATURES_STR()
.byte $80 + $0D // end of string mark + return
#endif // CONFIG_SHOW_FEATURES
-141
View File
@@ -1,141 +0,0 @@
//
// Official Kernal routines, described in:
//
// - [RG64] C64 Programmer's Reference Guide - page 275 (CHKIN) / 276 (CKOUT)
// - [CM64] Compute's Mapping the Commodore 64 - page 229
//
// CPU registers that has to be preserved (see [RG64]): .Y, possibly .A (XXX - see [CM64], page 213)
//
// CHKIN implementation
chkin_real:
// Store Y for preservation
phy_trash_a
// Reset status
jsr kernalstatus_reset
// First retrieve the FAT/LAT/SAT table index (and check if file is open)
txa
jsr find_fls
bcs chkinout_file_not_open
// Now we have table index in Y - first filter out unsuitable devices
lda FAT,Y
cmp #$01
beq chkinout_device_not_present // tape not implemented
cmp #$02
beq chkinout_device_not_present // RS-232 not implemented
// Fail if the file is open for writing (secondary address 1)
lda LAT, Y
cmp #$01
beq chkinout_file_not_input
// For IEC devices, send TALK + TKSA first
lda FAT,Y
jsr iec_check_devnum
bcs chkin_set_device
jsr TALK
bcs chkinout_device_not_present // don't set DFLTN in case of failure
lda LAT, Y
jsr TKSA
bcs chkinout_device_not_present
chkin_set_device:
lda FAT,Y
sta DFLTN
clc // for success
// FALLTROUGH
// Common part for booth CHKIN and CKOUT
// XXX add CPU-dependent optimizations here
chkinout_end:
tax
pla
tay
txa
rts
chkinout_file_not_open:
pla
tay
jmp kernalerror_FILE_NOT_OPEN
chkinout_device_not_present:
pla
tay
jsr kernalstatus_DEVICE_NOT_FOUND
jmp kernalerror_DEVICE_NOT_FOUND
chkinout_file_not_input:
pla
tay
jmp kernalerror_FILE_NOT_INPUT
chkinout_file_not_output:
pla
tay
jmp kernalerror_FILE_NOT_OUTPUT
// CKOUT implementation
ckout_real:
// Store Y for preservation
tya
pha
// Reset status
jsr kernalstatus_reset
// First retrieve the FAT/LAT/SAT table index (and check if file is open)
txa
jsr find_fls
bcs chkinout_file_not_open
// Now we have table index in Y - first filter out unsuitable devices
lda FAT,Y
cmp #$01
beq chkinout_device_not_present // tape not implemented
cmp #$02
beq chkinout_device_not_present // RS-232 not implemented
cmp #$00
beq chkinout_file_not_output // cannot output to keyboard - XXX check real ROM behaviour
// Fail if the file is open for reading (secondary address 0)
lda LAT, Y
beq chkinout_file_not_output
// For IEC devices, send LISTEN + SECOND first
lda FAT,Y
jsr iec_check_devnum
bcs chkout_set_device
jsr LISTEN
bcs chkinout_device_not_present // don't set DFLTO in case of failure
lda LAT, Y
jsr SECOND
bcs chkinout_device_not_present
chkout_set_device:
lda FAT,Y
sta DFLTO
clc // for success
jmp chkinout_end
-23
View File
@@ -1,23 +0,0 @@
// Common ppart of CLOSE and LOAD routines
close_load:
tax
// Command drive to stop talking and to close the file
jsr UNTLK
txa
jsr LISTEN
lda #$E0 // CLOSE command
sta TBTCNT
jsr iec_tx_command
jsr iec_tx_command_finalize
// Tell drive to unlisten
jsr UNLSN
rts
+12 -10
View File
@@ -63,17 +63,19 @@ kernalstatus_reset:
sta IOSTATUS
rts
kernalstatus_TIMEOUT_WRITE: // XXX detect this!
lda IOSTATUS
ora #K_STS_TIMEOUT_WRITE
sta IOSTATUS
rts
// The following two statuses are currentl not implemented - and most likely not really needed
kernalstatus_TIMEOUT_READ: // XXX detect this!
lda IOSTATUS
ora #K_STS_TIMEOUT_READ
sta IOSTATUS
rts
// kernalstatus_TIMEOUT_WRITE:
// lda IOSTATUS
// ora #K_STS_TIMEOUT_WRITE
// sta IOSTATUS
// rts
// kernalstatus_TIMEOUT_READ:
// lda IOSTATUS
// ora #K_STS_TIMEOUT_READ
// sta IOSTATUS
// rts
kernalstatus_EOI:
lda IOSTATUS
-6
View File
@@ -1,6 +0,0 @@
// Our implementation is longer than the original one,
// placing it here would cause a collision with CHROUT
CHRIN:
jmp chrin_real
-6
View File
@@ -1,6 +0,0 @@
// In our implementation CHKIN and CKOUT are closely tied,
// placing it here would cause a collision
CHKIN:
jmp chkin_real
-6
View File
@@ -1,6 +0,0 @@
// In our implementation CHKIN and CKOUT are closely tied,
// placing it here would cause a collision
CKOUT:
jmp ckout_real
-64
View File
@@ -1,64 +0,0 @@
//
// Official Kernal routine, described in:
//
// - [RG64] C64 Programmer's Reference Guide - page 281/282
// - [CM64] Compute's Mapping the Commodore 64 - page 229/230
// - https://www.pagetable.com/?p=1031, https://github.com/mist64/cbmbus_doc (IEC command)
//
// CPU registers that has to be preserved (see [RG64]): none
//
CLOSE:
// XXX this needs more testing (opening 10 files at once, closing in various orders, etc) once the code is more mature
// Find the LAT / SAT / FAT entry which LAT corresponds to A
jsr find_fls
bcs close_error_not_found // XXX can we report error in IOSTATUS here?
// We have the entry index in Y - check whether this is IEC device
lda FAT, y
jsr iec_check_devnum
bcs close_remove_from_table
// IEC device
jsr iec_tx_flush // make sure no byte is awaiting
lda SAT, y // get secondary address
cmp #$60
bne !+
// workaround for using CLOSE on reading executable - XXX is this a proper way?
jsr close_load
jmp close_remove_from_table
!:
ora $E0 // CLOSE command
sta TBTCNT
jsr iec_tx_command
bcs close_remove_from_table
jsr iec_tx_command_finalize
close_remove_from_table:
// Remove channel from the table
iny
cpy #$0A
bpl !+
lda LAT, y
sta LAT-1, y
lda FAT, y
sta FAT-1, y
lda SAT, y
sta SAT-1, y
jmp close_remove_from_table
!:
// Decrement the list size variable
dec LDTND
clc // report success - not sure if original CLOSE does this, but it's nevertheless a good practice
rts
close_error_not_found:
sec // report success - not sure if original CLOSE does this, but it's nevertheless a good practice
rts
-6
View File
@@ -1,6 +0,0 @@
// Our implementation is longer than the original one,
// placing it here would cause a collision with OPEN
CLRCHN:
jmp clrchn_real
-13
View File
@@ -1,13 +0,0 @@
//
// XXX Note: something unusual was done with LOAD routine - although the vector at $330 points to $F4A5,
// the Kernal jump table points to $F49E (see also Mapping the C64, page 76). By experimenting
// I have already discovered that $F4A5 performs indirect jump via ($0330) vector, but it must
// be doing a little bit more - not sure yet, what. Something similar is done with SAVE.
//
// This has to be clarified.
//
LOAD_INT:
jmp (ILOAD)
-144
View File
@@ -1,144 +0,0 @@
//
// Official Kernal routine, described in:
//
// - [RG64] C64 Programmer's Reference Guide - page 286
// - [CM64] Compute's Mapping the Commodore 64 - page 231
// - IEC reference at http://www.zimmers.net/anonftp/pub/cbm/programming/serial-bus.pdf
//
// CPU registers that has to be preserved (see [RG64]): none
//
// Expects that SETLFS and SETNAM are called before hand.
// $YYXX = load address.
// (ignored if SETLFS channel = 1, i.e., like ,8,1)
// If A=1 then VERIFY instead of LOAD.
// On exit, $YYXX is the highest address into which data
// will have been placed.
// XXX honor MSGFLG bit 6
// XXX add VERIFY support
LOAD:
// Are we loading or verifying?
sta VERCKK
// Store start address of LOAD
stx STAL+0
sty STAL+1
// Reset status
jsr kernalstatus_reset
#if CONFIG_MEMORY_MODEL_60K
// We need our helpers to get to filenames under ROMs or IO area
jsr install_ram_routines
#endif
// Check whether we support the requested device
lda FA
and #$FC
bne !+
jmp lvs_illegal_device_number // device number below 4, not an IEC device
!:
// Device numbers above 30 are also illegal (see https://www.pagetable.com/?p=1031),
// as the protocol combines device number with command code int one byte,
// above 30 it is no longer possible (UNLISTEN and UNTALK codes prevent using
// number 31), yet original ROMs show ILLEGAL DEVICE NUMBER error only
// for devices 0-3; in our implementation LISTEN / TALK will cause device
// not present detected for numbers above 30
// Display SEARCHING FOR + filename
jsr lvs_display_searching_for
// http://www.zimmers.net/anonftp/pub/cbm/programming/serial-bus.pdf
// p13, 16; also p16 tells us this routine doesn't mess with the file table
// in the C64, only in the drive.
// Call device to LISTEN (p16)
lda FA
jsr LISTEN
bcc !+
jmp lvs_device_not_found_error // XXX deduplicate with other jumps in this routine
!:
// Open channel 0 (reserved for file reading)
lda #$00
jsr iec_cmd_open
bcc !+
jmp lvs_device_not_found_error // XXX deduplicate with other jumps in this routine
!:
// Send file name
jsr lvs_send_file_name
bcc !+
jmp lvs_load_verify_error // XXX deduplicate with other jumps in this routine
!:
// Now command device to talk (p16)
lda FA
jsr TALK
bcc !+
jmp lvs_load_verify_error // XXX deduplicate with other jumps in this routine
!:
lda #$60 // open channel / data (p3) , required according to p13
sta TBTCNT
jsr iec_tx_command
bcc !+
jmp lvs_load_verify_error // XXX deduplicate with other jumps in this routine
!:
// We are currently talker, so do the IEC turn around so that we
// are the listener (p16)
jsr iec_turnaround_to_listen
bcc !+
jmp lvs_load_verify_error // XXX deduplicate with other jumps in this routine
!:
// Get load address and store it if secondary address is zero
jsr iec_rx_byte
bcc !+
jmp kernalerror_FILE_NOT_FOUND // XXX deduplicate with other jumps in this routine
!:
ldx SA
beq !+
sta STAL+0
!:
jsr iec_rx_byte
bcc !+
jmp kernalerror_FILE_NOT_FOUND // XXX deduplicate with other jumps in this routine
!:
ldx SA
beq !+
sta STAL+1
!:
// Display start address
jsr lvs_display_loading_verifying
load_loop:
// We are now ready to receive bytes
jsr iec_rx_byte
bcc !+
jmp lvs_load_verify_error // XXX deduplicate with other jumps in this routine
!:
// Handle the byte (store in memory / verify)
jsr lvs_handle_byte_load_verify
bcc !+
jmp lvs_load_verify_error // XXX deduplicate with other jumps in this routine
!:
// Advance pointer to data
jsr lvs_advance_pointer
bcc !+
jmp lvs_wrap_around_error
!:
// Check for EOI - if so, this was the last byte
lda IOSTATUS
and #K_STS_EOI
beq load_loop
// Display end address
jsr lvs_display_done
// Close file on drive
lda FA
jsr close_load
// Return last address
jmp lvs_return_last_address
-12
View File
@@ -1,12 +0,0 @@
//
// XXX Note: something unusual was done with LOAD routine - although the vector at $330 points to $F4A5,
// the Kernal jump table points to $F49E (see also Mapping the C64, page 76). By experimenting
// I have already discovered that $F4A5 performs indirect jump via ($0330) vector, but it must
// be doing a little bit more - not sure yet, what. Something similar is done with SAVE.
//
// This has to be clarified.
//
SAVE_INT:
jmp (ISAVE)
+17 -1
View File
@@ -10,5 +10,21 @@
ACPTR:
jsr kernalstatus_reset
lda IOSTATUS
beq !+
lda #$0D // tested on real ROMs
clc
rts
!:
#if CONFIG_IEC
#if CONFIG_IEC_JIFFYDOS
jmp iec_rx_dispatch
#else // no turbo supported
jmp iec_rx_byte
#endif
#else
jmp kernalerror_ILLEGAL_DEVICE_NUMBER
#endif
+31
View File
@@ -0,0 +1,31 @@
//
// IEC part of the CHKIN routine
//
#if CONFIG_IEC
chkin_iec:
// Fail if the file is open for writing (secondary address 1)
lda LAT, Y
cmp #$01
beq_far chkin_file_not_input
// Send TALK + TKSA first
lda FAT,Y
jsr TALK
bcs_far chkinout_device_not_present
lda LAT, Y
ora #$60
jsr TKSA
bcs_far chkinout_device_not_present
jmp chkin_set_device
#endif // CONFIG_IEC
+10
View File
@@ -0,0 +1,10 @@
//
// IEC part of the CHRIN routine
//
chrin_iec:
// XXX is this really all?
jmp JACPTR
+12
View File
@@ -0,0 +1,12 @@
//
// IEC part of the CHROUT routine
//
chrout_iec:
lda SCHAR
jsr JCIOUT
bcc_far chrout_done_success
jmp chrout_done_fail
@@ -11,6 +11,8 @@
CIOUT:
#if CONFIG_IEC
pha
lda C3PO
bne ciout_send_byte
@@ -31,7 +33,17 @@ ciout_store_in_buffer:
ciout_send_byte:
clc // don't send with EOI
#if CONFIG_IEC_JIFFYDOS
jsr iec_tx_dispatch
#else // no turbo supported
jsr iec_tx_byte
#endif
inc C3PO // iec_tx_byte sets it to 0, but we still have something to send
jmp ciout_store_in_buffer
#else
sec // indicate failure
rts
#endif
+31
View File
@@ -0,0 +1,31 @@
//
// IEC part of the CKOUT routine
//
#if CONFIG_IEC
ckout_iec:
// Fail if the file is open for reading (secondary address 0)
lda LAT, Y
beq_far ckout_file_not_output
// Send LISTEN + SECOND first
lda FAT,Y
jsr LISTEN
bcs_far chkinout_device_not_present
lda LAT, Y
ora #$60
jsr SECOND
bcs_far chkinout_device_not_present
jmp ckout_set_device
#endif // CONFIG_IEC
+35
View File
@@ -0,0 +1,35 @@
//
// IEC part of the CLOSE routine
//
#if CONFIG_IEC
// .Y contains LAT/FAT/SAT table index, it should stay this way
close_iec:
jsr iec_tx_flush // make sure no byte is awaiting
lda SAT, y // get secondary address
cmp #$60
bne !+
// workaround for using CLOSE on reading executable - XXX is this a proper way?
jsr iec_close_load
jmp close_remove_from_table
!:
ora $E0 // CLOSE command
sta TBTCNT
jsr iec_tx_command
bcs close_iec_end
jsr iec_tx_command_finalize
close_iec_end:
jmp close_remove_from_table
#endif // CONFIG_IEC
+30
View File
@@ -0,0 +1,30 @@
//
// IEC part of the CLRCHN routine
//
#if CONFIG_IEC
clrchn_iec:
// Check input device
lda DFLTN
jsr iec_check_devnum_oc
bcs !+
// It was IEC device - send UNTALK first
jsr UNTLK
!:
// Check output device
lda DFLTO
jsr iec_check_devnum_oc
// If it was IEC device - send UNLSN first
bcc_far UNLSN
rts
#endif // CONFIG_IEC
+22 -11
View File
@@ -5,18 +5,29 @@
// Preserves .A, .X and .Y
//
iec_check_devnum:
// 0, 1, 2, or 3 are illegal - reserved for non-IEC devices on Commodore
cmp #$04
bcs !+
#if CONFIG_IEC
iec_check_devnum_lvs: // for load/verify/save
cmp #$08 // below 8 are illegal for load/save
bcc iec_check_devnum_failed
// FALLTROUGH
iec_check_devnum_failed:
sec // indicate non-IEC device
rts
!:
iec_check_devnum_oc: // for open/close
cmp #$04 // below 4 are illegal, reserved for non-IEC devices on Commodore
bcc iec_check_devnum_failed
// 31 and above are illegal too, due to IEC command encoding scheme,
// see https://www.pagetable.com/?p=1031
cmp #$1F
bcs iec_check_devnum_failed
// Carry is clear here - indicates IEC device
cmp #$1F // sets carry for 31 or above
rts
iec_check_devnum_failed:
sec // indicate non-IEC device
rts
#endif // CONFIG_IEC
+31
View File
@@ -0,0 +1,31 @@
//
// Common part of CLOSE and LOAD/SAVE routines for IEC
//
#if CONFIG_IEC
iec_close_load:
tax
// Command drive to stop talking before closing the file
jsr UNTLK
txa
jsr LISTEN
lda #$E0 // CLOSE command
sta TBTCNT
jsr iec_tx_command
jsr iec_tx_command_finalize
// Tell drive to unlisten
jsr UNLSN
rts
#endif // CONFIG_IEC
+7
View File
@@ -5,6 +5,10 @@
// - https://www.pagetable.com/?p=1031, https://github.com/mist64/cbmbus_doc
//
#if CONFIG_IEC
iec_cmd_close:
jsr iec_check_channel_openclose
@@ -14,3 +18,6 @@ iec_cmd_close:
ora #$E0
jmp common_open_close_unlsn_second
#endif // CONFIG_IEC
+6
View File
@@ -6,6 +6,9 @@
//
#if CONFIG_IEC
iec_cmd_open: // similar to TKSA, but without turnaround
jsr iec_check_channel_openclose
@@ -40,3 +43,6 @@ iec_check_channel_openclose:
!:
clc // mark suitable channel number
rts
#endif // CONFIG_IEC
@@ -1,15 +0,0 @@
iec_pull_atn_clk_release_data:
// Pulled CLK = DATA considered invalid; for extra robustness on non-emulated
// hardware give some lines few more cycles to stabilize; see page 10 of
// http://www.zimmers.net/anonftp/pub/cbm/programming/serial-bus.pdf
lda CIA2_PRA
ora #BIT_CIA2_PRA_ATN_OUT // pull
sta CIA2_PRA
ora #BIT_CIA2_PRA_CLK_OUT // pull
sta CIA2_PRA
and #$FF - BIT_CIA2_PRA_DAT_OUT // release
sta CIA2_PRA
rts
@@ -1,13 +0,0 @@
iec_pull_clk_release_data:
// Pulled CLK = DATA considered invalid; for extra robustness on non-emulated
// hardware give some lines few more cycles to stabilize; see page 10 of
// http://www.zimmers.net/anonftp/pub/cbm/programming/serial-bus.pdf
lda CIA2_PRA
ora #BIT_CIA2_PRA_CLK_OUT // pull
sta CIA2_PRA
and #$FF - BIT_CIA2_PRA_DAT_OUT // release
sta CIA2_PRA
rts
@@ -1,8 +0,0 @@
iec_pull_clk_release_data_oneshot:
lda CIA2_PRA
ora #BIT_CIA2_PRA_CLK_OUT // pull
and #$FF - BIT_CIA2_PRA_DAT_OUT // release
sta CIA2_PRA
rts
@@ -1,15 +0,0 @@
iec_pull_data_release_atn_clk:
// Released CLK = DATA considered valid; for extra robustness on non-emulated
// hardware give some lines few more cycles to stabilize; see page 10 of
// http://www.zimmers.net/anonftp/pub/cbm/programming/serial-bus.pdf
lda CIA2_PRA
ora #BIT_CIA2_PRA_DAT_OUT // pull
sta CIA2_PRA
and #$FF - BIT_CIA2_PRA_CLK_OUT // release
sta CIA2_PRA
and #$FF - BIT_CIA2_PRA_ATN_OUT // release
sta CIA2_PRA
rts
+85
View File
@@ -0,0 +1,85 @@
//
// Helper IEC routines to pull/release certain lines
//
// Order of operation is set for extra robustness, on non-emulated hardware
// lines might need few cycles to stabilize (released CLK = DATA considered valid),
// see page 10 of http://www.zimmers.net/anonftp/pub/cbm/programming/serial-bus.pdf
//
#if CONFIG_IEC
iec_pull_atn_clk_release_data:
lda CIA2_PRA
ora #BIT_CIA2_PRA_ATN_OUT // pull
sta CIA2_PRA
// FALLTROUGH
iec_pull_clk_release_data:
lda CIA2_PRA
ora #BIT_CIA2_PRA_CLK_OUT // pull
sta CIA2_PRA
!:
and #$FF - BIT_CIA2_PRA_DAT_OUT // release
bne iec_pull_release_end // branch always
iec_pull_clk_release_data_oneshot:
lda CIA2_PRA
ora #BIT_CIA2_PRA_CLK_OUT // pull
bne !- // branch always
iec_release_atn_clk_data:
lda CIA2_PRA
and #$FF - BIT_CIA2_PRA_ATN_OUT // release
sta CIA2_PRA
// FALLTROUGH
iec_release_clk_data:
lda CIA2_PRA
and #$FF - BIT_CIA2_PRA_DAT_OUT // release
sta CIA2_PRA
and #$FF - BIT_CIA2_PRA_CLK_OUT // release
jmp iec_pull_release_end
iec_release_clk_pull_data:
lda CIA2_PRA
ora #BIT_CIA2_PRA_DAT_OUT // pull
sta CIA2_PRA
and #$FF - BIT_CIA2_PRA_CLK_OUT // release
bne iec_pull_release_end // branch always
iec_pull_data_release_atn_clk:
lda CIA2_PRA
ora #BIT_CIA2_PRA_DAT_OUT // pull
sta CIA2_PRA
and #$FF - BIT_CIA2_PRA_CLK_OUT // release
sta CIA2_PRA
// FALLTROUGH
iec_release_atn:
lda CIA2_PRA
and #$FF - BIT_CIA2_PRA_ATN_OUT // release
// FALLTROUGH
iec_pull_release_end:
sta CIA2_PRA
rts
#endif // CONFIG_IEC
-8
View File
@@ -1,8 +0,0 @@
iec_release_atn:
lda CIA2_PRA
and #$FF - BIT_CIA2_PRA_ATN_OUT // release
sta CIA2_PRA
rts
-16
View File
@@ -1,16 +0,0 @@
iec_release_atn_clk_data:
// Released CLK = DATA considered valid; for extra robustness on non-emulated
// hardware give some lines few more cycles to stabilize; see page 10 of
// http://www.zimmers.net/anonftp/pub/cbm/programming/serial-bus.pdf
lda CIA2_PRA
and #$FF - BIT_CIA2_PRA_ATN_OUT // release
sta CIA2_PRA
and #$FF - BIT_CIA2_PRA_DAT_OUT // release
sta CIA2_PRA
and #$FF - BIT_CIA2_PRA_CLK_OUT // release
sta CIA2_PRA
rts
-13
View File
@@ -1,13 +0,0 @@
iec_release_clk_data:
// Released CLK = DATA considered valid; for extra robustness on non-emulated
// hardware give some lines few more cycles to stabilize; see page 10 of
// http://www.zimmers.net/anonftp/pub/cbm/programming/serial-bus.pdf
lda CIA2_PRA
and #$FF - BIT_CIA2_PRA_DAT_OUT // release
sta CIA2_PRA
and #$FF - BIT_CIA2_PRA_CLK_OUT // release
sta CIA2_PRA
rts
@@ -1,13 +0,0 @@
iec_release_clk_pull_data:
// Released CLK = DATA considered valid; for extra robustness on non-emulated
// hardware give some lines few more cycles to stabilize; see page 10 of
// http://www.zimmers.net/anonftp/pub/cbm/programming/serial-bus.pdf
lda CIA2_PRA
ora #BIT_CIA2_PRA_DAT_OUT // pull
sta CIA2_PRA
and #$FF - BIT_CIA2_PRA_CLK_OUT // release
sta CIA2_PRA
rts
+7
View File
@@ -8,6 +8,10 @@
// take care about .A and IOSTATUS
//
#if CONFIG_IEC
iec_return_success:
// BSOUR is certainly not valid anymore
@@ -32,3 +36,6 @@ iec_return_DEVICE_NOT_FOUND:
plx_trash_a
// Report error
jmp kernalerror_DEVICE_NOT_FOUND
#endif // CONFIG_IEC
+16 -15
View File
@@ -4,6 +4,10 @@
//
// Preserves .X and .Y registers
#if CONFIG_IEC
iec_rx_byte:
// Store .X and .Y on the stack - preserve them
@@ -107,16 +111,8 @@ iec_rx_clk_wait2:
// Timeout
jsr kernalstatus_EOI
pla
// Restore registers
pla
tay
pla
tax
sec // XXX confirm that sec is really a way to report timeout here
cli
rts
jmp iec_rx_end
!:
// More bits?
dex
@@ -128,18 +124,23 @@ iec_rx_clk_wait2:
// the next byte. (p11).
jsr iec_release_clk_pull_data
// Retreive the received byte
// Retrieve the received byte
pla
// Restore registers
sta TBTCNT // $A4 is a byte buffer according to http://sta.c64.org/cbm64mem.html
pla
tay
pla
tax
// FALLTROUGH
iec_rx_end:
ply_trash_a
plx_trash_a
lda TBTCNT
clc
cli
rts
#endif // CONFIG_IEC
+44
View File
@@ -0,0 +1,44 @@
//
// Sends file (stream) name to IEC device
//
#if CONFIG_IEC
iec_send_file_name:
ldy #0
iec_send_file_name_loop:
cpy FNLEN
beq iec_send_file_name_done
#if CONFIG_MEMORY_MODEL_60K
ldx #<FNADDR+0
jsr peek_under_roms
#else // CONFIG_MEMORY_MODEL_38K
lda (FNADDR),y
#endif
iny
// Set Carry flag on the last file name character, to mark EOI
cpy FNLEN
clc
bne !+
sec
!:
// Transmit one character
sta TBTCNT
#if CONFIG_IEC_JIFFYDOS
jsr iec_tx_dispatch
#else // no turbo supported
jsr iec_tx_byte
#endif
jmp iec_send_file_name_loop
iec_send_file_name_done:
jmp UNLSN
#endif // CONFIG_IEC
+7
View File
@@ -1,7 +1,14 @@
#if CONFIG_IEC
iec_set_idle:
lda CIA2_PRA
ora #BIT_CIA2_PRA_CLK_OUT // pull
and #$FF - BIT_CIA2_PRA_DAT_OUT - BIT_CIA2_PRA_ATN_OUT // release
sta CIA2_PRA
rts
#endif // CONFIG_IEC
@@ -2,6 +2,10 @@
// pages 7--8.
// See also https://www.pagetable.com/?p=1135, https://github.com/mist64/cbmbus_doc
#if CONFIG_IEC
iec_turnaround_to_listen:
// Store .X and .Y on the stack - preserve them
@@ -34,3 +38,4 @@ iec_turnaround_to_listen:
jmp iec_return_success
#endif // CONFIG_IEC
+6
View File
@@ -2,6 +2,10 @@
// pages 7--8.
// See also https://www.pagetable.com/?p=1135, https://github.com/mist64/cbmbus_doc
#if CONFIG_IEC
iec_turnaround_to_talk:
// Store .X and .Y on the stack - preserve them
@@ -25,3 +29,5 @@ iec_turnaround_to_talk:
plp
jmp iec_return_success
#endif // CONFIG_IEC
+24 -4
View File
@@ -7,6 +7,8 @@
// Preserves .X and .Y registers
#if CONFIG_IEC
iec_tx_byte:
// Store .X and .Y on the stack - preserve them
@@ -26,7 +28,7 @@ iec_tx_common:
// Timing is critical here - execute on disabled IRQs
// The best practice would be to do PHP first, but it seems this is not
// what the original ROM does; furthermore, pushing additional bytes to
// stack can wreck autostart softwaree loading at $0100
// stack can wreck autostart software loading at $0100
sei
// Wait till all receivers are ready, they should all release DATA
@@ -37,7 +39,7 @@ iec_tx_common:
// At this point a delay 256 usec or more is considered EOI,
// receiver should now acknowledge it by pulling data for at least 60 usec
// Keep the implementation as simple as possible: data should be released now
// so wait until it's pushed and released again
// so wait until it is pushed and released again
jsr iec_wait_for_data_pull
jsr iec_wait_for_data_release
@@ -52,6 +54,20 @@ iec_tx_common:
ldx #7
iec_tx_common_sendbit:
#if CONFIG_IEC_JIFFYDOS
bne !+ // branch if not sending the last bit
lda IECPROTO
beq !+ // branch if standard protocol
// JiffyDOS ROM performs detection loop on every command; it seems we have to
// replicate this behaviour for compatibility with at least 1541 JiffyDOS ROM
jsr jiffydos_detect
!:
#endif // CONFIG_IEC_JIFFYDOS
// Is next bit 0 or 1?
lda TBTCNT
lsr
@@ -81,10 +97,11 @@ iec_tx_common_bit_is_sent:
cli
// Give device time to tell if they are busy by pulling DATA
// Give devices time to tell if they are busy by pulling DATA
// They should do it within 1ms
ldx #$FF
!: lda CIA2_PRA
!:
lda CIA2_PRA
// BPL here is checking that bit 7 clears,
// i.e, that the DATA line is pulled by drive
bpl !+
@@ -94,3 +111,6 @@ iec_tx_common_bit_is_sent:
jmp iec_return_DEVICE_NOT_FOUND
!:
jmp iec_return_success
#endif // CONFIG_IEC
+5
View File
@@ -7,6 +7,9 @@
// Preserves .X and .Y registers
#if CONFIG_IEC
iec_tx_command:
// Store .X and .Y on the stack - preserve them
@@ -36,3 +39,5 @@ iec_tx_command:
clc // Carry flag set is used for EOI mark
jmp iec_tx_common
#endif // CONFIG_IEC
+6
View File
@@ -3,6 +3,9 @@
// Implemented based on https://www.pagetable.com/?p=1135, https://github.com/mist64/cbmbus_doc
#if CONFIG_IEC
iec_tx_command_finalize:
// Store .X and .Y on the stack - preserve them
@@ -16,3 +19,6 @@ iec_tx_command_finalize:
jsr iec_wait20us
jmp iec_return_success
#endif // CONFIG_IEC
+7
View File
@@ -3,6 +3,10 @@
//
// Preserves .X, .Y and .A registers
#if CONFIG_IEC
iec_tx_flush:
pha
@@ -13,3 +17,6 @@ iec_tx_flush:
!:
pla
rts
#endif // CONFIG_IEC
+17 -1
View File
@@ -4,12 +4,23 @@
//
// On NTSC this means 1023 cycles (slightly less on PAL, but we have to be sure).
// We can't count on badlines, as the screen might be disabled.
// Delay here is implemeented using VIC-II raster register. Since one raster is
// Delay here is implemented using VIC-II raster register. Since one raster is
// 63 cycles, we need at least 17 full rasters to be 100% sure we wait enough
#if CONFIG_IEC
iec_wait1ms:
ldx #18 // we probably won't start with the beginning of raster
#endif // CONFIG_IEC
#if CONFIG_IEC || CONFIG_TAPE_TURBO || CONFIG_TAPE_NORMAL
wait_x_bars: // additional entry point for tape support
// has to preserve .Y and put .X to 0
lda VIC_RASTER
!:
cmp VIC_RASTER
@@ -18,4 +29,9 @@ iec_wait1ms:
dex
bne !-
iec_wait_rts: // dummy RTS, for very short waits
rts
#endif // CONFIG_IEC || CONFIG_TAPE_TURBO || CONFIG_TAPE_NORMAL
Loaded 100 of 304 files, more files were not shown because too many files have changed in this diff. Show more