1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-27 00:29:31 +00:00
cc65/libsrc/vic20/get_tv.s
Stefan a50d214ffb
Simpler get_tv
You don't have to count the beam, just check the KERNAL.
2018-04-10 18:37:10 +00:00

26 lines
549 B
ArmAsm

;
; Stefan Haubenthal, 2018-04-10
; Based on code by Mike
;
; unsigned char get_tv (void);
; /* Return the video mode the machine is using */
;
.include "get_tv.inc"
;--------------------------------------------------------------------------
; _get_tv
.proc _get_tv
; detect the system
lda #TV::NTSC
tax
ldy $EDE4 ; VIC init table
cpy #5
beq @L0
lda #TV::PAL
@L0: rts ; system detected: 0 for NTSC, 1 for PAL
.endproc