initial LNMX calculation routine

This commit is contained in:
FeralChild64 committed 2020-01-08 18:36:46 +01:00
1 parent 98e7e633e8
commit b498d4010b
5 files changed
+73 -35

No files matched your search

+29 -28
View File
@@ -48,28 +48,29 @@ The following ROM features are currently missing:
## Keyboard ## Keyboard
| 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 |
## Screen ## Screen
| Driver | Status | Remarks | | Driver | Status | Remarks |
| :-----------: | :------: | :------------------------------------------------: | | :----------------: | :------: | :------------------------------------------------: |
| VIC-II | PARTIAL | 80 chars in logical line support is very buggy | | VIC-II | PARTIAL | rework in progress |
| VDC 80 col. | NOT DONE | | | 80 columns, VDC | NOT DONE | |
| 80 columns, Mega65 | NOT DONE | |
## Tape port (LOAD only!) ## Tape port (LOAD only!)
* Tapuino * Tapuino
* Datasette * Datasette
| Driver | Status | Remarks | | Driver | Status | Remarks |
| :-----------: | :------: | :------------------------------------------------: | | :----------------: | :------: | :------------------------------------------------: |
| normal | PARTIAL | no error correction, no tape speed calibratrion | | normal | PARTIAL | no tape speed calibratrion, no error correction |
| turbo | PARTIAL | up to 250 blocks, no tape speed calibratrion yet | | turbo (250 blocks) | PARTIAL | no tape speed calibratrion |
## IEC bus ## IEC bus
@@ -78,13 +79,13 @@ The following ROM features are currently missing:
* most disk drives and printers * most disk drives and printers
* some hard drives * some hard drives
| Driver | Status | Remarks | | Driver | Status | Remarks |
| :-----------: | :------: | :------------------------------------------------: | | :----------------: | :------: | :------------------------------------------------: |
| standard | DONE | | | standard | DONE | |
| JiffyDOS | DONE | | | JiffyDOS | DONE | |
| DolphinDOS | DONE | | | DolphinDOS | DONE | |
| CIA burst mod | NOT DONE | | | CIA burst mod | NOT DONE | |
| Mega65 burst | NOT DONE | pure software implementation should be feasible | | Mega65 burst | NOT DONE | |
## IEEE-488 bus ## IEEE-488 bus
@@ -92,20 +93,20 @@ The following ROM features are currently missing:
* PET era disk drives and printers * PET era disk drives and printers
* various scientific equipment * various scientific equipment
| Driver | Status | Remarks | | Driver | Status | Remarks |
| :-----------: | :------: | :------------------------------------------------: | | :----------------: | :------: | :------------------------------------------------: |
| CBM cartridge | NOT DONE | | | CBM cartridge | NOT DONE | |
## RS-232 ## RS-232
* modems (telephone, WiFi) * modems (telephone, WiFi)
* parallel port printers * parallel port printers
| 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 | |
# API status # API status
+1 -1
View File
@@ -155,7 +155,7 @@
.label PNT = $D1 // $D1-$D2 pointer to the current screen line .label PNT = $D1 // $D1-$D2 pointer to the current screen line
.label PNTR = $D3 // current screen X position (logical column), 0-79 .label PNTR = $D3 // current screen X position (logical column), 0-79
.label QTSW = $D4 // quote mode flag .label QTSW = $D4 // quote mode flag
.label LNMX = $D5 // logical line length, [!] our usage probably differs in details .label LNMX = $D5 // logical line length, 39 or 79
.label TBLX = $D6 // current screen Y position (row), 0-24 .label TBLX = $D6 // current screen Y position (row), 0-24
.label SCHAR = $D7 // ASCII value of the last printed character .label SCHAR = $D7 // ASCII value of the last printed character
.label INSRT = $D8 // insert mode flag/counter .label INSRT = $D8 // insert mode flag/counter
+3 -2
View File
@@ -120,11 +120,12 @@ chrout_screen_literal:
chrout_screen_calc_lptr_done: chrout_screen_calc_lptr_done:
jsr screen_calculate_PNT_USER jsr screen_calculate_PNT_USER
jsr screen_fix_PNTR jsr screen_calculate_PNTR
jsr screen_calculate_LNMX
// FALLTROUGH // FALLTROUGH
chrout_screen_done: chrout_screen_done: // YYY review all the jumps here
// YYY should we update character under cursor here? or in cursor_show_if_enabled? // YYY should we update character under cursor here? or in cursor_show_if_enabled?
+36
View File
@@ -0,0 +1,36 @@
//
// Sets LNMX to 39 or 79
//
// YYY value is improper shortly after linee growth!
screen_calculate_LNMX: // YYY review all the code, mayybe some optimizations are possible using this value
ldy TBLX
lda LDTBL, y
bpl screen_calculate_lnmx_79 // this line is a continuation
cpy #24
beq screen_calculate_lnmx_39 // this is the last line, which is not a continuation
iny
lda LDTBL, y
bpl screen_calculate_lnmx_79 // line is continued
// FALLTROUGH
screen_calculate_lnmx_39:
lda #39
skip_2_bytes_trash_nvz
// FALLTROUGH
screen_calculate_lnmx_79:
lda #79
sta LNMX
rts
@@ -4,18 +4,18 @@
// //
screen_fix_PNTR: screen_calculate_PNTR:
ldy TBLX ldy TBLX
lda LDTBL, y lda LDTBL, y
php php
jsr screen_get_clipped_PNTR jsr screen_get_clipped_PNTR
plp plp
bmi screen_fix_PNTR_0_39 bmi screen_calculate_PNTR_0_39
// FALLTROUGH // FALLTROUGH
screen_fix_PNTR_40_79: screen_calculate_PNTR_40_79:
tya tya
clc clc
@@ -24,7 +24,7 @@ screen_fix_PNTR_40_79:
// FALLTROUGH // FALLTROUGH
screen_fix_PNTR_0_39: screen_calculate_PNTR_0_39:
sty PNTR sty PNTR
rts rts