base:c64gs_detection
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | base:c64gs_detection [2015-04-17 04:30] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ===== C64 Game System (C64GS) detection ===== | ||
+ | If you're developing a cartridge-based game and want to setup the controls differently on C64GS (since it doesn' | ||
+ | |||
+ | < | ||
+ | check_c64gs ; | ||
+ | |||
+ | lda $01 ; save $01 temporarily | ||
+ | pha | ||
+ | |||
+ | lda #$36 ; kernal will now be visible at $e000 | ||
+ | sta $01 | ||
+ | |||
+ | ldx #$00 | ||
+ | |||
+ | lda #$43 ; check bytes from kernal | ||
+ | cmp $fc00 ; equals ' | ||
+ | bne cc_break | ||
+ | cmp $fc0f ; equals ' | ||
+ | bne cc_break | ||
+ | cmp $fc1c ; equals first ' | ||
+ | bne cc_break | ||
+ | |||
+ | inx | ||
+ | |||
+ | cc_break pla ; | ||
+ | sta $01 | ||
+ | |||
+ | rts | ||
+ | </ | ||
+ | |||
+ | How to use: Call the routine with 'jsr check_c64gs' |
base/c64gs_detection.txt · Last modified: 2015-04-17 04:30 by 127.0.0.1