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
|
## Keyboard
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
| Driver | Status | Remarks |
|
| Driver | Status | Remarks |
|
||||||
| :----------------: | :------: | :------------------------------------------------: |
|
| :----------------: | :------: | :------------------------------------------------: |
|
||||||
| C64 | DONE | |
|
| C64 | DONE | |
|
||||||
| C128 | DONE | |
|
| C128 | DONE | |
|
||||||
| Mega65 | NOT DONE | code should be complete, but is not tested yet |
|
| Mega65 | NOT DONE | code should be complete, but is not tested yet |
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
## Screen
|
## Screen
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
| Driver | Status | Remarks |
|
| Driver | Status | Remarks |
|
||||||
| :----------------: | :------: | :------------------------------------------------: |
|
| :----------------: | :------: | :------------------------------------------------: |
|
||||||
| VIC-II | DONE | |
|
| VIC-II | DONE | |
|
||||||
| 80 columns, VDC | NOT DONE | |
|
| 80 columns, VDC | NOT DONE | |
|
||||||
| 80 columns, Mega65 | NOT DONE | |
|
| 80 columns, Mega65 | NOT DONE | |
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
## Tape port (LOAD only!)
|
## Tape port (LOAD only!)
|
||||||
|
|
||||||
* Tapuino
|
* Tapuino
|
||||||
* Datasette
|
* Datasette
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
| Driver | Status | Remarks |
|
| Driver | Status | Remarks |
|
||||||
| :----------------: | :------: | :------------------------------------------------: |
|
| :----------------: | :------: | :------------------------------------------------: |
|
||||||
| normal | DONE | |
|
| normal | DONE | up to 202 blocks, like original ROM |
|
||||||
| turbo (250 blocks) | DONE | |
|
| turbo | DONE | up to 250 blocks, like the best implementations |
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
## IEC bus
|
## IEC bus
|
||||||
|
|
||||||
@@ -81,6 +93,8 @@ The following ROM features are currently missing:
|
|||||||
* most disk drives and printers
|
* most disk drives and printers
|
||||||
* some hard drives
|
* some hard drives
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
| Driver | Status | Remarks |
|
| Driver | Status | Remarks |
|
||||||
| :----------------: | :------: | :------------------------------------------------: |
|
| :----------------: | :------: | :------------------------------------------------: |
|
||||||
| standard | DONE | |
|
| standard | DONE | |
|
||||||
@@ -89,27 +103,36 @@ The following ROM features are currently missing:
|
|||||||
| CIA burst mod | NOT DONE | |
|
| CIA burst mod | NOT DONE | |
|
||||||
| Mega65 burst | NOT DONE | |
|
| Mega65 burst | NOT DONE | |
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
## IEEE-488 bus
|
## IEEE-488 bus
|
||||||
|
|
||||||
* petSD+
|
* petSD+
|
||||||
* PET era disk drives and printers
|
* PET era disk drives and printers
|
||||||
* various scientific equipment
|
* various scientific equipment
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
| Driver | Status | Remarks |
|
| Driver | Status | Remarks |
|
||||||
| :----------------: | :------: | :------------------------------------------------: |
|
| :----------------: | :------: | :------------------------------------------------: |
|
||||||
| CBM cartridge | NOT DONE | |
|
| CBM cartridge | NOT DONE | |
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
## RS-232
|
## RS-232
|
||||||
|
|
||||||
* modems (telephone, WiFi)
|
* modems (telephone, WiFi)
|
||||||
* parallel port printers
|
* parallel port printers
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
| Driver | Status | Remarks |
|
| Driver | Status | Remarks |
|
||||||
| :----------------: | :------: | :------------------------------------------------: |
|
| :----------------: | :------: | :------------------------------------------------: |
|
||||||
| UP2400 | NOT DONE | |
|
| UP2400 | NOT DONE | |
|
||||||
| UP9600 | NOT DONE | work started, not functional yet |
|
| UP9600 | NOT DONE | work started, not functional yet |
|
||||||
| ACIA 6551 | NOT DONE | |
|
| ACIA 6551 | NOT DONE | |
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
# API status
|
# API status
|
||||||
|
|
||||||
@@ -202,19 +225,19 @@ Not all of them - only these we want to have implemented.
|
|||||||
| Address | Name | Status | Remarks |
|
| Address | Name | Status | Remarks |
|
||||||
| :-------: | :----------- | :------: | :------------------------------------------------: |
|
| :-------: | :----------- | :------: | :------------------------------------------------: |
|
||||||
| `$A004` | revision str | DONE | |
|
| `$A004` | revision str | DONE | |
|
||||||
| `$A408` | REASON | NOT DONE | |
|
| `$A408` | `REASON` | NOT DONE | |
|
||||||
| `$A453` | (unknown) | NOT DONE | |
|
| `$A453` | (unknown) | NOT DONE | |
|
||||||
| `$A533` | LINKPRG | DONE | |
|
| `$A533` | `LINKPRG` | DONE | |
|
||||||
| `$A644` | new | NOT DONE | |
|
| `$A644` | new | NOT DONE | |
|
||||||
| `$A659` | set txt ptr | NOT DONE | |
|
| `$A659` | set txt ptr | NOT DONE | |
|
||||||
| `$A68E` | RUNC | DONE | |
|
| `$A68E` | `RUNC` | DONE | |
|
||||||
| `$A7AE` | NEWSTT | PARTIAL | redirected to RUN command |
|
| `$A7AE` | `NEWSTT` | PARTIAL | redirected to RUN command |
|
||||||
| `$AB1E` | STROUT | DONE | |
|
| `$AB1E` | `STROUT` | DONE | |
|
||||||
| `$AD9E` | FRMEVL | NOT DONE | |
|
| `$AD9E` | `FRMEVL` | NOT DONE | |
|
||||||
| `$BDCD` | LINPRT | DONE | temporary implementation |
|
| `$BDCD` | `LINPRT` | DONE | temporary implementation |
|
||||||
| `$E3BF` | INIT | NOT DONE | |
|
| `$E3BF` | `INIT` | NOT DONE | |
|
||||||
| `$E422` | INITMSG | DONE | |
|
| `$E422` | `INITMSG` | DONE | |
|
||||||
| `$E453` | RVECT | NOT DONE | |
|
| `$E453` | `RVECT` | NOT DONE | |
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
|
|||||||
@@ -11,16 +11,20 @@
|
|||||||
|
|
||||||
// Label definitions
|
// Label definitions
|
||||||
|
|
||||||
.label VK1__RAMTAS = $4000 + 2 * 0
|
.label VK1__IOINIT = $4000 + 2 * 0
|
||||||
.label VK1__load_tape_normal = $4000 + 2 * 1
|
.label VK1__RAMTAS = $4000 + 2 * 1
|
||||||
.label VK1__load_tape_turbo = $4000 + 2 * 2
|
.label VK1__setup_vicii = $4000 + 2 * 2
|
||||||
.label VK1__load_tape_auto = $4000 + 2 * 3
|
.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
|
#else
|
||||||
|
|
||||||
// Vector table (OpenROMs private!)
|
// Vector table (OpenROMs private!)
|
||||||
|
|
||||||
|
.word IOINIT
|
||||||
.word RAMTAS
|
.word RAMTAS
|
||||||
|
.word setup_vicii
|
||||||
|
|
||||||
#if CONFIG_TAPE_NORMAL && !CONFIG_TAPE_AUTODETECT
|
#if CONFIG_TAPE_NORMAL && !CONFIG_TAPE_AUTODETECT
|
||||||
.word load_tape_normal
|
.word load_tape_normal
|
||||||
|
|||||||
@@ -9,11 +9,20 @@
|
|||||||
|
|
||||||
|
|
||||||
.label STOP = KERNAL_0.STOP
|
.label STOP = KERNAL_0.STOP
|
||||||
|
.label clrchn_reset = KERNAL_0.clrchn_reset
|
||||||
.label udtim_keyboard = KERNAL_0.udtim_keyboard
|
.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
|
.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
|
#if CONFIG_TAPE_NORMAL || CONFIG_TAPE_TURBO
|
||||||
|
|
||||||
.label screen_on = KERNAL_0.screen_on
|
.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
|
// Kernal error codes are described in 'Commodore 64 Programmers Reference Guide', page 306
|
||||||
|
|
||||||
kernalerror_ROUTINE_TERMINATED: // by a STOP key
|
kernalerror_ROUTINE_TERMINATED: // by a STOP key
|
||||||
|
|
||||||
lda #K_ERR_ROUTINE_TERMINATED
|
lda #K_ERR_ROUTINE_TERMINATED
|
||||||
sec
|
skip_2_bytes_trash_nvz
|
||||||
rts
|
|
||||||
|
// FALLTROUGH
|
||||||
|
|
||||||
kernalerror_TOO_MANY_OPEN_FILES:
|
kernalerror_TOO_MANY_OPEN_FILES:
|
||||||
|
|
||||||
lda #K_ERR_TOO_MANY_OPEN_FILES
|
lda #K_ERR_TOO_MANY_OPEN_FILES
|
||||||
sec
|
skip_2_bytes_trash_nvz
|
||||||
rts
|
|
||||||
|
// FALLTROUGH
|
||||||
|
|
||||||
kernalerror_FILE_ALREADY_OPEN:
|
kernalerror_FILE_ALREADY_OPEN:
|
||||||
|
|
||||||
lda #K_ERR_FILE_ALREADY_OPEN
|
lda #K_ERR_FILE_ALREADY_OPEN
|
||||||
sec
|
skip_2_bytes_trash_nvz
|
||||||
rts
|
|
||||||
|
// FALLTROUGH
|
||||||
|
|
||||||
kernalerror_FILE_NOT_OPEN:
|
kernalerror_FILE_NOT_OPEN:
|
||||||
|
|
||||||
lda #K_ERR_FILE_NOT_OPEN
|
lda #K_ERR_FILE_NOT_OPEN
|
||||||
sec
|
skip_2_bytes_trash_nvz
|
||||||
rts
|
|
||||||
|
// FALLTROUGH
|
||||||
|
|
||||||
kernalerror_FILE_NOT_FOUND:
|
kernalerror_FILE_NOT_FOUND:
|
||||||
|
|
||||||
lda #K_ERR_FILE_NOT_FOUND
|
lda #K_ERR_FILE_NOT_FOUND
|
||||||
sec
|
skip_2_bytes_trash_nvz
|
||||||
rts
|
|
||||||
|
// FALLTROUGH
|
||||||
|
|
||||||
kernalerror_DEVICE_NOT_FOUND:
|
kernalerror_DEVICE_NOT_FOUND:
|
||||||
|
|
||||||
lda #K_ERR_DEVICE_NOT_FOUND
|
lda #K_ERR_DEVICE_NOT_FOUND
|
||||||
sec
|
skip_2_bytes_trash_nvz
|
||||||
rts
|
|
||||||
|
// FALLTROUGH
|
||||||
|
|
||||||
kernalerror_FILE_NOT_INPUT:
|
kernalerror_FILE_NOT_INPUT:
|
||||||
|
|
||||||
lda #K_ERR_FILE_NOT_INPUT
|
lda #K_ERR_FILE_NOT_INPUT
|
||||||
sec
|
skip_2_bytes_trash_nvz
|
||||||
rts
|
|
||||||
|
// FALLTROUGH
|
||||||
|
|
||||||
kernalerror_FILE_NOT_OUTPUT:
|
kernalerror_FILE_NOT_OUTPUT:
|
||||||
|
|
||||||
lda #K_ERR_FILE_NOT_OUTPUT
|
lda #K_ERR_FILE_NOT_OUTPUT
|
||||||
sec
|
skip_2_bytes_trash_nvz
|
||||||
rts
|
|
||||||
|
// FALLTROUGH
|
||||||
|
|
||||||
kernalerror_FILE_NAME_MISSING:
|
kernalerror_FILE_NAME_MISSING:
|
||||||
|
|
||||||
lda #K_ERR_FILE_NAME_MISSING
|
lda #K_ERR_FILE_NAME_MISSING
|
||||||
sec
|
skip_2_bytes_trash_nvz
|
||||||
rts
|
|
||||||
|
// FALLTROUGH
|
||||||
|
|
||||||
kernalerror_ILLEGAL_DEVICE_NUMBER:
|
kernalerror_ILLEGAL_DEVICE_NUMBER:
|
||||||
|
|
||||||
lda #K_ERR_ILLEGAL_DEVICE_NUMBER
|
lda #K_ERR_ILLEGAL_DEVICE_NUMBER
|
||||||
sec
|
skip_2_bytes_trash_nvz
|
||||||
rts
|
|
||||||
|
// FALLTROUGH
|
||||||
|
|
||||||
kernalerror_TOP_MEM_RS232:
|
kernalerror_TOP_MEM_RS232:
|
||||||
|
|
||||||
lda #K_ERR_TOP_MEM_RS232
|
lda #K_ERR_TOP_MEM_RS232
|
||||||
|
|
||||||
sec
|
sec
|
||||||
rts
|
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# STD * #TAKE
|
||||||
// #LAYOUT# * KERNAL_0 #TAKE
|
// #LAYOUT# M65 KERNAL_0 #TAKE
|
||||||
|
// #LAYOUT# M65 KERNAL_1 #TAKE-FLOAT
|
||||||
// #LAYOUT# * * #IGNORE
|
// #LAYOUT# * * #IGNORE
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -11,6 +12,14 @@
|
|||||||
|
|
||||||
setup_vicii:
|
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
|
// Clear everything - turn off sprites (observed hanging around after
|
||||||
// running programs and resetting), etc.
|
// running programs and resetting), etc.
|
||||||
|
|
||||||
@@ -67,3 +76,5 @@ setup_vicii:
|
|||||||
// Setup default I/O devices
|
// Setup default I/O devices
|
||||||
|
|
||||||
jmp clrchn_reset
|
jmp clrchn_reset
|
||||||
|
|
||||||
|
#endif // ROM layout
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
// #LAYOUT# STD * #TAKE
|
// #LAYOUT# STD * #TAKE
|
||||||
// #LAYOUT# * KERNAL_0 #TAKE
|
// #LAYOUT# M65 KERNAL_0 #TAKE
|
||||||
|
// #LAYOUT# M65 KERNAL_1 #TAKE-FLOAT
|
||||||
// #LAYOUT# * * #IGNORE
|
// #LAYOUT# * * #IGNORE
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -14,6 +15,14 @@
|
|||||||
|
|
||||||
IOINIT:
|
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
|
// First initialize the CPU port, to make sure we have correct memory map
|
||||||
//
|
//
|
||||||
@@ -146,3 +155,6 @@ IOINIT:
|
|||||||
rts
|
rts
|
||||||
|
|
||||||
#endif
|
#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