added PAL/NTSC detection
This commit is contained in:
1 parent
7bc76670cd
commit
1feef6abdb
4 files changed
+43
-6
No files matched your search
@@ -70,7 +70,7 @@ NOTE: Even the 'DONE' routines won't support features described as missing in on
|
|||||||
|
|
||||||
| Address | Name | Status | Remarks |
|
| Address | Name | Status | Remarks |
|
||||||
| --------- | :------- | :------: | :------------------------------------------------: |
|
| --------- | :------- | :------: | :------------------------------------------------: |
|
||||||
| `$FF81` | `CINT` | PARTIAL | at least PAL/NTSC detection is missing |
|
| `$FF81` | `CINT` | DONE | |
|
||||||
| `$FF84` | `IOINIT` | PARTIAL | at least SID volume handling is missing |
|
| `$FF84` | `IOINIT` | PARTIAL | at least SID volume handling is missing |
|
||||||
| `$FF87` | `RAMTAS` | DONE | |
|
| `$FF87` | `RAMTAS` | DONE | |
|
||||||
| `$FF8A` | `RESTOR` | DONE | |
|
| `$FF8A` | `RESTOR` | DONE | |
|
||||||
|
|||||||
@@ -17,6 +17,14 @@ startup_banner:
|
|||||||
|
|
||||||
`TARGET_HOOK_BANNER
|
`TARGET_HOOK_BANNER
|
||||||
|
|
||||||
|
;; Print PAL/NTSC
|
||||||
|
ldx #30 ; NTSC
|
||||||
|
lda PALNTSC
|
||||||
|
beq +
|
||||||
|
ldx #31 ; PAL
|
||||||
|
*
|
||||||
|
jsr print_packed_message
|
||||||
|
|
||||||
;; Work out free bytes, and display
|
;; Work out free bytes, and display
|
||||||
jsr basic_do_new
|
jsr basic_do_new
|
||||||
lda basic_top_of_memory_ptr+0
|
lda basic_top_of_memory_ptr+0
|
||||||
|
|||||||
+25
-1
@@ -15,6 +15,31 @@ cint_brk: ; entry for BRK and STOP+RESTORE - XXX, where should it start?
|
|||||||
|
|
||||||
jsr setup_vicii
|
jsr setup_vicii
|
||||||
|
|
||||||
|
;; Detect video system (PAL/NTSC), use Graham's method, as it's short and reliable
|
||||||
|
;; see here: https://codebase64.org/doku.php?id=base:detect_pal_ntsc
|
||||||
|
|
||||||
|
cint_w0:
|
||||||
|
lda VIC_RASTER
|
||||||
|
cint_w1:
|
||||||
|
cmp VIC_RASTER
|
||||||
|
beq cint_w1
|
||||||
|
bmi cint_w0
|
||||||
|
|
||||||
|
;; Result in A, if no interrupt happened during the test:
|
||||||
|
;; #$37 -> 312 rasterlines, PAL, VIC 6569
|
||||||
|
;; #$06 -> 263 rasterlines, NTSC, VIC 6567R8
|
||||||
|
;; #$05 -> 262 rasterlines, NTSC, VIC 6567R56A
|
||||||
|
|
||||||
|
cmp #$07
|
||||||
|
bcs cint_pal
|
||||||
|
cint_ntsc:
|
||||||
|
lda #$00
|
||||||
|
beq +
|
||||||
|
cint_pal:
|
||||||
|
lda #$01
|
||||||
|
*
|
||||||
|
sta PALNTSC
|
||||||
|
|
||||||
;; Initialise cursor blink flags (Compute's Mapping the 64 p215)
|
;; Initialise cursor blink flags (Compute's Mapping the 64 p215)
|
||||||
lda #$00
|
lda #$00
|
||||||
sta cursor_blink_disable
|
sta cursor_blink_disable
|
||||||
@@ -51,4 +76,3 @@ cint_brk: ; entry for BRK and STOP+RESTORE - XXX, where should it start?
|
|||||||
|
|
||||||
;; Fallthrough/jump to screen clear routine (Compute's Mapping the 64 p215)
|
;; Fallthrough/jump to screen clear routine (Compute's Mapping the 64 p215)
|
||||||
jmp clear_screen
|
jmp clear_screen
|
||||||
|
|
||||||
+9
-4
@@ -159,15 +159,20 @@ char *error_list[]={
|
|||||||
"LOAD", // https://www.discogs.com/Gimmik-Load-Error/release/482462
|
"LOAD", // https://www.discogs.com/Gimmik-Load-Error/release/482462
|
||||||
// Non-error messages
|
// Non-error messages
|
||||||
"READY.\r", // #29 // https://www.ibm.com/support/knowledgecenter/zosbasics/com.ibm.zos.zconcepts/zconc_whatistsonative.htm https://github.com/stefanhaustein/expressionparser
|
"READY.\r", // #29 // https://www.ibm.com/support/knowledgecenter/zosbasics/com.ibm.zos.zconcepts/zconc_whatistsonative.htm https://github.com/stefanhaustein/expressionparser
|
||||||
"LOADING", // #30 // https://community.tibco.com/wiki/how-show-loading-prompt-when-reloading-external-data
|
"NTSC, ", // #30
|
||||||
"VERIFYING", // https://discussions.apple.com/thread/8087203
|
"PAL, ", // #31
|
||||||
"SAVING",
|
"", // unused for now
|
||||||
"ERROR", // #33 // Simply the word error that is attached to the other parts of messages https://fjkraan.home.xs4all.nl/comp/apple2faq/app2asoftfaq.html
|
"ERROR", // #33 // Simply the word error that is attached to the other parts of messages https://fjkraan.home.xs4all.nl/comp/apple2faq/app2asoftfaq.html
|
||||||
"BYTES FREE.\r\r", // #34 // https://github.com/stefanhaustein/expressionparser
|
"BYTES FREE\r\r", // #34 // https://github.com/stefanhaustein/expressionparser
|
||||||
"MEMORY CORRUPT", // #35
|
"MEMORY CORRUPT", // #35
|
||||||
"NOT IMPLEMENTED", // #36
|
"NOT IMPLEMENTED", // #36
|
||||||
NULL};
|
NULL};
|
||||||
|
|
||||||
|
// XXX: create separate list for Kernal
|
||||||
|
// "LOADING", // #30 // https://community.tibco.com/wiki/how-show-loading-prompt-when-reloading-external-data
|
||||||
|
// "VERIFYING", // https://discussions.apple.com/thread/8087203
|
||||||
|
// "SAVING",
|
||||||
|
|
||||||
// Token $FF is end of message, so we can have only 255 unique words
|
// Token $FF is end of message, so we can have only 255 unique words
|
||||||
#define MAX_WORDS 255
|
#define MAX_WORDS 255
|
||||||
char *words[MAX_WORDS];
|
char *words[MAX_WORDS];
|
||||||
|
|||||||
Reference in new issue
Block a user