added PAL/NTSC detection
This commit is contained in:
1 parent
7bc76670cd
commit
1feef6abdb
4 files changed
+47
-10
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 |
|
||||
| --------- | :------- | :------: | :------------------------------------------------: |
|
||||
| `$FF81` | `CINT` | PARTIAL | at least PAL/NTSC detection is missing |
|
||||
| `$FF81` | `CINT` | DONE | |
|
||||
| `$FF84` | `IOINIT` | PARTIAL | at least SID volume handling is missing |
|
||||
| `$FF87` | `RAMTAS` | DONE | |
|
||||
| `$FF8A` | `RESTOR` | DONE | |
|
||||
|
||||
@@ -17,6 +17,14 @@ startup_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
|
||||
jsr basic_do_new
|
||||
lda basic_top_of_memory_ptr+0
|
||||
@@ -26,7 +34,7 @@ startup_banner:
|
||||
lda basic_top_of_memory_ptr+1
|
||||
sbc basic_end_of_text_ptr+1
|
||||
|
||||
jsr print_integer
|
||||
jsr print_integer
|
||||
|
||||
lda #$20
|
||||
jsr JCHROUT
|
||||
@@ -37,8 +45,8 @@ startup_banner:
|
||||
|
||||
;; jump into warm start loop
|
||||
jmp basic_warm_start
|
||||
|
||||
|
||||
|
||||
|
||||
startup_message:
|
||||
;; Clear the screen
|
||||
.byte $93
|
||||
|
||||
+26
-2
@@ -14,7 +14,32 @@ cint:
|
||||
cint_brk: ; entry for BRK and STOP+RESTORE - XXX, where should it start?
|
||||
|
||||
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)
|
||||
lda #$00
|
||||
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)
|
||||
jmp clear_screen
|
||||
|
||||
+9
-4
@@ -159,15 +159,20 @@ char *error_list[]={
|
||||
"LOAD", // https://www.discogs.com/Gimmik-Load-Error/release/482462
|
||||
// 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
|
||||
"LOADING", // #30 // https://community.tibco.com/wiki/how-show-loading-prompt-when-reloading-external-data
|
||||
"VERIFYING", // https://discussions.apple.com/thread/8087203
|
||||
"SAVING",
|
||||
"NTSC, ", // #30
|
||||
"PAL, ", // #31
|
||||
"", // 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
|
||||
"BYTES FREE.\r\r", // #34 // https://github.com/stefanhaustein/expressionparser
|
||||
"BYTES FREE\r\r", // #34 // https://github.com/stefanhaustein/expressionparser
|
||||
"MEMORY CORRUPT", // #35
|
||||
"NOT IMPLEMENTED", // #36
|
||||
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
|
||||
#define MAX_WORDS 255
|
||||
char *words[MAX_WORDS];
|
||||
|
||||
Reference in new issue
Block a user