more work towards string concatenation, updated binaries and documentation
This commit is contained in:
1 parent
778057e9f2
commit
59af3b7e57
12 files changed
+103
-18
No files matched your search
@@ -6,11 +6,13 @@ A project to create unencumbered open-source ROMs for use on selected retro comp
|
|||||||
|
|
||||||
* [implementation status](./STATUS.md) of various APIs and functionalities
|
* [implementation status](./STATUS.md) of various APIs and functionalities
|
||||||
* [configuration options](./CONFIG.md) for those willing to compile their own, customized ROM set
|
* [configuration options](./CONFIG.md) for those willing to compile their own, customized ROM set
|
||||||
* [BASIC extensions](doc/Extended-BASIC.md)
|
* [BASIC extensions](./doc/Extended-BASIC.md)
|
||||||
* [development guide](./doc/Development.md) for those interested in technical aspects
|
* [development guide](./doc/Development.md) for those interested in technical aspects
|
||||||
* [license](./LICENSE) information and list of major contributors
|
* [license](./LICENSE) information and list of major contributors
|
||||||
* [credits](./CREDITS.md) to people whose work was of great help to us
|
* [credits](./CREDITS.md) to people whose work was of great help to us
|
||||||
|
|
||||||
|
To download pre-built ROM images, go [here](./bin).
|
||||||
|
|
||||||
# Problem Statement and Motivation
|
# Problem Statement and Motivation
|
||||||
|
|
||||||
The copyrights of various old computer system ROMs are still alive, and together with trademarks, can present significant
|
The copyrights of various old computer system ROMs are still alive, and together with trademarks, can present significant
|
||||||
|
|||||||
@@ -11,6 +11,12 @@ Here are the features of the Open ROMs not found in the original ROMs from the 8
|
|||||||
* JiffyDOS and DolphinDOS protocols support
|
* JiffyDOS and DolphinDOS protocols support
|
||||||
* DOS wedge (direct mode only) - `@<drive_number>`, `@<command>`, `@$`, `@$<params>`, `@`
|
* DOS wedge (direct mode only) - `@<drive_number>`, `@<command>`, `@$`, `@$<params>`, `@`
|
||||||
* BASIC extensions, see the [documentation](doc/Extended-BASIC.md)
|
* BASIC extensions, see the [documentation](doc/Extended-BASIC.md)
|
||||||
|
* extended / tweaked `LOAD` / `VERIFY` commands
|
||||||
|
* 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
|
||||||
|
* command without parameters tries to load first file from drive chosen as above
|
||||||
|
* `LIST` command should never damage the screen if trying to list memory content which is not a BASIC program
|
||||||
|
* high performance garbage collector
|
||||||
|
|
||||||
* turbo tape load support (as device 7, or using `←L` / `←M`, optionally with a file name), quite sophisticated: up to 250 blocks (can store bytes under I/O), automatically adjusts for tape speed differences
|
* turbo tape load support (as device 7, or using `←L` / `←M`, optionally with a file name), quite sophisticated: up to 250 blocks (can store bytes under I/O), automatically adjusts for tape speed differences
|
||||||
* normal tape load error log is limited by free stack space only (no artificial limitation like in original ROMs)
|
* normal tape load error log is limited by free stack space only (no artificial limitation like in original ROMs)
|
||||||
@@ -18,12 +24,6 @@ Here are the features of the Open ROMs not found in the original ROMs from the 8
|
|||||||
* improved support for tape adapters (for using regular casette players and other audio devices instead of Datasette) and emulators
|
* improved support for tape adapters (for using regular casette players and other audio devices instead of Datasette) and emulators
|
||||||
* built-in tape head align tool (only feasible to use on machines with extended memory, like Mega65)
|
* built-in tape head align tool (only feasible to use on machines with extended memory, like Mega65)
|
||||||
|
|
||||||
* extended / tweaked `LOAD` / `VERIFY` commands
|
|
||||||
* 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
|
|
||||||
* command without parameters tries to load first file from drive chosen as above
|
|
||||||
* `LIST` command should never damage the screen if trying to list memory content which is not a BASIC program
|
|
||||||
|
|
||||||
* uses RAM under ROM and I/O: 51199 bytes free (up to `$CFFF`) by default, but 61438 is also possible
|
* uses RAM under ROM and I/O: 51199 bytes free (up to `$CFFF`) by default, but 61438 is also possible
|
||||||
* cold/warm start silences multiple SID chips
|
* cold/warm start silences multiple SID chips
|
||||||
* warm start due to BRK prints out the instruction address
|
* warm start due to BRK prints out the instruction address
|
||||||
@@ -42,7 +42,7 @@ The following ROM features are currently missing and are not planned due to spac
|
|||||||
The following ROM features are currently missing:
|
The following ROM features are currently missing:
|
||||||
|
|
||||||
* most BASIC commands
|
* most BASIC commands
|
||||||
* BASIC variables
|
* BASIC variables (work in progress, strings partially work now)
|
||||||
* BASIC expression handling
|
* BASIC expression handling
|
||||||
* most floating point routines
|
* most floating point routines
|
||||||
* RS-232 support
|
* RS-232 support
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -39,9 +39,9 @@
|
|||||||
|
|
||||||
// Memory model
|
// Memory model
|
||||||
|
|
||||||
// #define CONFIG_MEMORY_MODEL_38K
|
#define CONFIG_MEMORY_MODEL_38K
|
||||||
// #define CONFIG_MEMORY_MODEL_46K
|
// #define CONFIG_MEMORY_MODEL_46K
|
||||||
#define CONFIG_MEMORY_MODEL_50K
|
// #define CONFIG_MEMORY_MODEL_50K
|
||||||
// #define CONFIG_MEMORY_MODEL_60K
|
// #define CONFIG_MEMORY_MODEL_60K
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -52,21 +52,81 @@ oper_add_strings:
|
|||||||
|
|
||||||
jmp FRMEVL_continue
|
jmp FRMEVL_continue
|
||||||
!:
|
!:
|
||||||
// Allocate memory for concatenated string
|
// Allocate memory for the concatenated string
|
||||||
|
|
||||||
clc
|
clc
|
||||||
adc __FAC2+0
|
adc __FAC2+0
|
||||||
bcs_16 do_STRING_TOO_LONG_error
|
bcs_16 do_STRING_TOO_LONG_error
|
||||||
|
|
||||||
.break
|
|
||||||
|
|
||||||
jsr tmpstr_alloc
|
jsr tmpstr_alloc
|
||||||
|
|
||||||
|
// Copy the temporary string pointer to INDEX
|
||||||
|
|
||||||
|
ldy #$01
|
||||||
|
lda (VARPNT), y
|
||||||
|
sta INDEX+0
|
||||||
|
iny
|
||||||
|
lda (VARPNT), y
|
||||||
|
sta INDEX+1
|
||||||
|
|
||||||
|
// Perform the concatenation
|
||||||
|
|
||||||
// XXX finish the implementation
|
#if CONFIG_MEMORY_MODEL_60K
|
||||||
|
|
||||||
|
// XXX
|
||||||
|
// XXX
|
||||||
|
// XXX
|
||||||
|
|
||||||
|
#elif CONFIG_MEMORY_MODEL_46K || CONFIG_MEMORY_MODEL_50K
|
||||||
|
// XXX consider optimized version without multiple JSRs
|
||||||
|
|
||||||
|
// XXX
|
||||||
|
// XXX
|
||||||
|
// XXX
|
||||||
|
|
||||||
|
#else // CONFIG_MEMORY_MODEL_38K
|
||||||
|
|
||||||
|
// Copy data from the first string
|
||||||
|
|
||||||
|
ldy #$00
|
||||||
|
!:
|
||||||
|
lda (__FAC2+1),y
|
||||||
|
sta (INDEX),y
|
||||||
|
iny
|
||||||
|
cpy __FAC2+0
|
||||||
|
bne !-
|
||||||
|
|
||||||
|
// Increase INDEX pointer by the size of the 1st string
|
||||||
|
|
||||||
|
tya
|
||||||
|
jsr varstr_INDEX_up_A
|
||||||
|
|
||||||
|
// Copy data from the second string
|
||||||
|
|
||||||
|
ldy #$00
|
||||||
|
!:
|
||||||
|
lda (__FAC1+1),y
|
||||||
|
sta (INDEX),y
|
||||||
|
iny
|
||||||
|
cpy __FAC1+0
|
||||||
|
bne !-
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Free old strings - if they are temporary
|
||||||
|
|
||||||
|
// XXX
|
||||||
|
// XXX
|
||||||
|
// XXX
|
||||||
|
|
||||||
|
// Copy the descriptor to __FAC1
|
||||||
|
|
||||||
|
ldy #$02
|
||||||
|
!:
|
||||||
|
lda (VARPNT), y
|
||||||
|
sta __FAC1, y
|
||||||
|
dey
|
||||||
|
bpl !-
|
||||||
|
|
||||||
oper_add_strings_end:
|
oper_add_strings_end:
|
||||||
|
|
||||||
|
|||||||
@@ -8,14 +8,38 @@
|
|||||||
// Input:
|
// Input:
|
||||||
// -.A desired string length, has to be > 0
|
// -.A desired string length, has to be > 0
|
||||||
//
|
//
|
||||||
|
// Output:
|
||||||
|
// - VARPNT points to the newly alocated descriptor
|
||||||
//
|
//
|
||||||
|
|
||||||
tmpstr_alloc:
|
tmpstr_alloc:
|
||||||
|
|
||||||
|
tax
|
||||||
|
|
||||||
// First we need to find a free temporary string descriptor
|
// First we need to find a free temporary string descriptor
|
||||||
|
|
||||||
// XXX TEMPPT-> LASTPT
|
lda TEMPPT
|
||||||
|
cmp #$22
|
||||||
|
bcs_16 do_FORMULA_TOO_COMPLEX_error
|
||||||
|
|
||||||
// XXX implement this
|
tay
|
||||||
|
sta LASTPT
|
||||||
|
clc
|
||||||
|
adc #$03
|
||||||
|
sta TEMPPT
|
||||||
|
|
||||||
rts
|
// Store desired string length
|
||||||
|
|
||||||
|
stx $00, y
|
||||||
|
|
||||||
|
// Store descriptor address
|
||||||
|
|
||||||
|
lda LASTPT
|
||||||
|
sta VARPNT+0
|
||||||
|
lda #$00
|
||||||
|
sta VARPNT+1
|
||||||
|
|
||||||
|
// Jump to alocation routine
|
||||||
|
// XXX consider falltrough
|
||||||
|
|
||||||
|
jmp varstr_alloc
|
||||||
@@ -20,7 +20,6 @@
|
|||||||
// - fills-in pointer in the string descriptor
|
// - fills-in pointer in the string descriptor
|
||||||
//
|
//
|
||||||
|
|
||||||
// XXX test this routine
|
|
||||||
|
|
||||||
varstr_alloc:
|
varstr_alloc:
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user