Kernal size optimizations
This commit is contained in:
1 parent
1b49724c50
commit
dff590c979
7 files changed
+161
-72
No files matched your search
@@ -50,29 +50,41 @@ The following ROM features are currently missing:
|
||||
|
||||
## Keyboard
|
||||
|
||||
<br />
|
||||
|
||||
| Driver | Status | Remarks |
|
||||
| :----------------: | :------: | :------------------------------------------------: |
|
||||
| C64 | DONE | |
|
||||
| C128 | DONE | |
|
||||
| Mega65 | NOT DONE | code should be complete, but is not tested yet |
|
||||
|
||||
<br />
|
||||
|
||||
## Screen
|
||||
|
||||
<br />
|
||||
|
||||
| Driver | Status | Remarks |
|
||||
| :----------------: | :------: | :------------------------------------------------: |
|
||||
| VIC-II | DONE | |
|
||||
| 80 columns, VDC | NOT DONE | |
|
||||
| 80 columns, Mega65 | NOT DONE | |
|
||||
|
||||
<br />
|
||||
|
||||
## Tape port (LOAD only!)
|
||||
|
||||
* Tapuino
|
||||
* Datasette
|
||||
|
||||
<br />
|
||||
|
||||
| Driver | Status | Remarks |
|
||||
| :----------------: | :------: | :------------------------------------------------: |
|
||||
| normal | DONE | |
|
||||
| turbo (250 blocks) | DONE | |
|
||||
| normal | DONE | up to 202 blocks, like original ROM |
|
||||
| turbo | DONE | up to 250 blocks, like the best implementations |
|
||||
|
||||
<br />
|
||||
|
||||
## IEC bus
|
||||
|
||||
@@ -81,6 +93,8 @@ The following ROM features are currently missing:
|
||||
* most disk drives and printers
|
||||
* some hard drives
|
||||
|
||||
<br />
|
||||
|
||||
| Driver | Status | Remarks |
|
||||
| :----------------: | :------: | :------------------------------------------------: |
|
||||
| standard | DONE | |
|
||||
@@ -89,27 +103,36 @@ The following ROM features are currently missing:
|
||||
| CIA burst mod | NOT DONE | |
|
||||
| Mega65 burst | NOT DONE | |
|
||||
|
||||
<br />
|
||||
|
||||
## IEEE-488 bus
|
||||
|
||||
* petSD+
|
||||
* PET era disk drives and printers
|
||||
* various scientific equipment
|
||||
|
||||
<br />
|
||||
|
||||
| Driver | Status | Remarks |
|
||||
| :----------------: | :------: | :------------------------------------------------: |
|
||||
| CBM cartridge | NOT DONE | |
|
||||
|
||||
<br />
|
||||
|
||||
## RS-232
|
||||
|
||||
* modems (telephone, WiFi)
|
||||
* parallel port printers
|
||||
|
||||
<br />
|
||||
|
||||
| Driver | Status | Remarks |
|
||||
| :----------------: | :------: | :------------------------------------------------: |
|
||||
| UP2400 | NOT DONE | |
|
||||
| UP9600 | NOT DONE | work started, not functional yet |
|
||||
| ACIA 6551 | NOT DONE | |
|
||||
|
||||
<br />
|
||||
|
||||
# API status
|
||||
|
||||
@@ -202,19 +225,19 @@ Not all of them - only these we want to have implemented.
|
||||
| Address | Name | Status | Remarks |
|
||||
| :-------: | :----------- | :------: | :------------------------------------------------: |
|
||||
| `$A004` | revision str | DONE | |
|
||||
| `$A408` | REASON | NOT DONE | |
|
||||
| `$A408` | `REASON` | NOT DONE | |
|
||||
| `$A453` | (unknown) | NOT DONE | |
|
||||
| `$A533` | LINKPRG | DONE | |
|
||||
| `$A533` | `LINKPRG` | DONE | |
|
||||
| `$A644` | new | NOT DONE | |
|
||||
| `$A659` | set txt ptr | NOT DONE | |
|
||||
| `$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 | |
|
||||
| `$E453` | RVECT | NOT DONE | |
|
||||
| `$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 | |
|
||||
| `$E453` | `RVECT` | NOT DONE | |
|
||||
|
||||
<br />
|
||||
|
||||
|
||||
@@ -11,16 +11,20 @@
|
||||
|
||||
// Label definitions
|
||||
|
||||
.label VK1__RAMTAS = $4000 + 2 * 0
|
||||
.label VK1__load_tape_normal = $4000 + 2 * 1
|
||||
.label VK1__load_tape_turbo = $4000 + 2 * 2
|
||||
.label VK1__load_tape_auto = $4000 + 2 * 3
|
||||
.label VK1__IOINIT = $4000 + 2 * 0
|
||||
.label VK1__RAMTAS = $4000 + 2 * 1
|
||||
.label VK1__setup_vicii = $4000 + 2 * 2
|
||||
.label VK1__load_tape_normal = $4000 + 2 * 3
|
||||
.label VK1__load_tape_turbo = $4000 + 2 * 4
|
||||
.label VK1__load_tape_auto = $4000 + 2 * 5
|
||||
|
||||
#else
|
||||
|
||||
// Vector table (OpenROMs private!)
|
||||
|
||||
.word IOINIT
|
||||
.word RAMTAS
|
||||
.word setup_vicii
|
||||
|
||||
#if CONFIG_TAPE_NORMAL && !CONFIG_TAPE_AUTODETECT
|
||||
.word load_tape_normal
|
||||
|
||||
@@ -9,11 +9,20 @@
|
||||
|
||||
|
||||
.label STOP = KERNAL_0.STOP
|
||||
.label clrchn_reset = KERNAL_0.clrchn_reset
|
||||
.label udtim_keyboard = KERNAL_0.udtim_keyboard
|
||||
|
||||
.label setup_irq_timer = KERNAL_0.setup_irq_timer
|
||||
.label wait_x_bars = KERNAL_0.wait_x_bars
|
||||
|
||||
|
||||
#if CONFIG_IEC
|
||||
|
||||
.label iec_set_idle = KERNAL_0.iec_set_idle
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#if CONFIG_TAPE_NORMAL || CONFIG_TAPE_TURBO
|
||||
|
||||
.label screen_on = KERNAL_0.screen_on
|
||||
|
||||
+42
-54
@@ -6,90 +6,78 @@
|
||||
// Kernal error codes are described in 'Commodore 64 Programmers Reference Guide', page 306
|
||||
|
||||
kernalerror_ROUTINE_TERMINATED: // by a STOP key
|
||||
|
||||
lda #K_ERR_ROUTINE_TERMINATED
|
||||
sec
|
||||
rts
|
||||
skip_2_bytes_trash_nvz
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
kernalerror_TOO_MANY_OPEN_FILES:
|
||||
|
||||
lda #K_ERR_TOO_MANY_OPEN_FILES
|
||||
sec
|
||||
rts
|
||||
skip_2_bytes_trash_nvz
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
kernalerror_FILE_ALREADY_OPEN:
|
||||
|
||||
lda #K_ERR_FILE_ALREADY_OPEN
|
||||
sec
|
||||
rts
|
||||
skip_2_bytes_trash_nvz
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
kernalerror_FILE_NOT_OPEN:
|
||||
|
||||
lda #K_ERR_FILE_NOT_OPEN
|
||||
sec
|
||||
rts
|
||||
skip_2_bytes_trash_nvz
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
kernalerror_FILE_NOT_FOUND:
|
||||
|
||||
lda #K_ERR_FILE_NOT_FOUND
|
||||
sec
|
||||
rts
|
||||
skip_2_bytes_trash_nvz
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
kernalerror_DEVICE_NOT_FOUND:
|
||||
|
||||
lda #K_ERR_DEVICE_NOT_FOUND
|
||||
sec
|
||||
rts
|
||||
skip_2_bytes_trash_nvz
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
kernalerror_FILE_NOT_INPUT:
|
||||
|
||||
lda #K_ERR_FILE_NOT_INPUT
|
||||
sec
|
||||
rts
|
||||
skip_2_bytes_trash_nvz
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
kernalerror_FILE_NOT_OUTPUT:
|
||||
|
||||
lda #K_ERR_FILE_NOT_OUTPUT
|
||||
sec
|
||||
rts
|
||||
skip_2_bytes_trash_nvz
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
kernalerror_FILE_NAME_MISSING:
|
||||
|
||||
lda #K_ERR_FILE_NAME_MISSING
|
||||
sec
|
||||
rts
|
||||
skip_2_bytes_trash_nvz
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
kernalerror_ILLEGAL_DEVICE_NUMBER:
|
||||
|
||||
lda #K_ERR_ILLEGAL_DEVICE_NUMBER
|
||||
sec
|
||||
rts
|
||||
skip_2_bytes_trash_nvz
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
kernalerror_TOP_MEM_RS232:
|
||||
|
||||
lda #K_ERR_TOP_MEM_RS232
|
||||
|
||||
sec
|
||||
rts
|
||||
|
||||
|
||||
// Kernal status codes are described in 'Commodore 64 Programmers Reference Guide', page 292
|
||||
|
||||
kernalstatus_reset:
|
||||
lda #$00
|
||||
sta IOSTATUS
|
||||
rts
|
||||
|
||||
// The following two statuses are currently not implemented - and most likely not really needed
|
||||
|
||||
// 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
|
||||
ora #K_STS_EOI
|
||||
sta IOSTATUS
|
||||
rts
|
||||
|
||||
kernalstatus_DEVICE_NOT_FOUND:
|
||||
lda IOSTATUS
|
||||
ora #K_STS_DEVICE_NOT_FOUND
|
||||
sta IOSTATUS
|
||||
rts
|
||||
@@ -1,5 +1,6 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# M65 KERNAL_0 #TAKE
|
||||
// #LAYOUT# M65 KERNAL_1 #TAKE-FLOAT
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
@@ -11,6 +12,14 @@
|
||||
|
||||
setup_vicii:
|
||||
|
||||
#if (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
|
||||
jsr map_KERNAL_1
|
||||
jsr_ind VK1__setup_vicii
|
||||
jmp map_NORMAL
|
||||
|
||||
#else
|
||||
|
||||
// Clear everything - turn off sprites (observed hanging around after
|
||||
// running programs and resetting), etc.
|
||||
|
||||
@@ -67,3 +76,5 @@ setup_vicii:
|
||||
// Setup default I/O devices
|
||||
|
||||
jmp clrchn_reset
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,5 +1,6 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# M65 KERNAL_0 #TAKE
|
||||
// #LAYOUT# M65 KERNAL_1 #TAKE-FLOAT
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
@@ -14,6 +15,14 @@
|
||||
|
||||
IOINIT:
|
||||
|
||||
#if (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
|
||||
jsr map_KERNAL_1
|
||||
jsr_ind VK1__IOINIT
|
||||
jmp map_NORMAL
|
||||
|
||||
#else
|
||||
|
||||
//
|
||||
// First initialize the CPU port, to make sure we have correct memory map
|
||||
//
|
||||
@@ -146,3 +155,6 @@ IOINIT:
|
||||
rts
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -0,0 +1,42 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// Kernal status codes are described in 'Commodore 64 Programmers Reference Guide', page 292
|
||||
|
||||
kernalstatus_reset:
|
||||
lda #$00
|
||||
beq kernalstatus_end // branch always
|
||||
|
||||
// The following two statuses are currently not implemented - and most likely not really needed
|
||||
|
||||
// kernalstatus_TIMEOUT_WRITE:
|
||||
//
|
||||
// lda IOSTATUS
|
||||
// ora #K_STS_TIMEOUT_WRITE
|
||||
// bne kernalstatus_end // branch always
|
||||
|
||||
// kernalstatus_TIMEOUT_READ:
|
||||
//
|
||||
// lda IOSTATUS
|
||||
// ora #K_STS_TIMEOUT_READ
|
||||
// bne kernalstatus_end // branch always
|
||||
|
||||
kernalstatus_EOI:
|
||||
|
||||
lda IOSTATUS
|
||||
ora #K_STS_EOI
|
||||
bne kernalstatus_end // branch always
|
||||
|
||||
kernalstatus_DEVICE_NOT_FOUND:
|
||||
|
||||
lda IOSTATUS
|
||||
ora #K_STS_DEVICE_NOT_FOUND
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
kernalstatus_end:
|
||||
|
||||
sta IOSTATUS
|
||||
rts
|
||||
Reference in new issue
Block a user