mirror of
https://github.com/cc65/cc65.git
synced 2025-02-23 18:29:05 +00:00
Use get_tv.inc
git-svn-id: svn://svn.cc65.org/cc65/trunk@3259 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
75f7b6cf4e
commit
7b13d79bde
@ -5,8 +5,7 @@
|
|||||||
; /* Return the video mode the machine is using */
|
; /* Return the video mode the machine is using */
|
||||||
;
|
;
|
||||||
|
|
||||||
.export _get_tv
|
.include "get_tv.inc"
|
||||||
|
|
||||||
.include "c128.inc"
|
.include "c128.inc"
|
||||||
|
|
||||||
|
|
||||||
@ -15,7 +14,7 @@
|
|||||||
|
|
||||||
.proc _get_tv
|
.proc _get_tv
|
||||||
|
|
||||||
ldx #$01 ; Assume PAL
|
ldx #TV::PAL ; Assume PAL
|
||||||
lda PALFLAG
|
lda PALFLAG
|
||||||
bne pal
|
bne pal
|
||||||
dex ; NTSC
|
dex ; NTSC
|
||||||
|
@ -5,9 +5,8 @@
|
|||||||
; /* Return the video mode the machine is using */
|
; /* Return the video mode the machine is using */
|
||||||
;
|
;
|
||||||
|
|
||||||
.export _get_tv
|
|
||||||
|
|
||||||
.include "../plus4/plus4.inc"
|
.include "../plus4/plus4.inc"
|
||||||
|
.include "get_tv.inc"
|
||||||
|
|
||||||
|
|
||||||
;--------------------------------------------------------------------------
|
;--------------------------------------------------------------------------
|
||||||
@ -15,7 +14,7 @@
|
|||||||
|
|
||||||
.proc _get_tv
|
.proc _get_tv
|
||||||
|
|
||||||
ldx #$01 ; Assume PAL
|
ldx #TV::PAL ; Assume PAL
|
||||||
bit TED_MULTI1 ; Test bit 6
|
bit TED_MULTI1 ; Test bit 6
|
||||||
bvc pal
|
bvc pal
|
||||||
dex ; NTSC
|
dex ; NTSC
|
||||||
|
@ -5,10 +5,8 @@
|
|||||||
; /* Return the video mode the machine is using */
|
; /* Return the video mode the machine is using */
|
||||||
;
|
;
|
||||||
|
|
||||||
.export _get_tv
|
|
||||||
|
|
||||||
.include "c64.inc"
|
.include "c64.inc"
|
||||||
|
.include "get_tv.inc"
|
||||||
|
|
||||||
;--------------------------------------------------------------------------
|
;--------------------------------------------------------------------------
|
||||||
; _get_tv
|
; _get_tv
|
||||||
|
@ -5,9 +5,8 @@
|
|||||||
; /* Return the video mode the machine is using */
|
; /* Return the video mode the machine is using */
|
||||||
;
|
;
|
||||||
|
|
||||||
.export _get_tv
|
|
||||||
|
|
||||||
.include "plus4.inc"
|
.include "plus4.inc"
|
||||||
|
.include "get_tv.inc"
|
||||||
|
|
||||||
|
|
||||||
;--------------------------------------------------------------------------
|
;--------------------------------------------------------------------------
|
||||||
@ -15,7 +14,7 @@
|
|||||||
|
|
||||||
.proc _get_tv
|
.proc _get_tv
|
||||||
|
|
||||||
ldx #$01 ; Assume PAL
|
ldx #TV::PAL ; Assume PAL
|
||||||
bit TED_MULTI1 ; Test bit 6
|
bit TED_MULTI1 ; Test bit 6
|
||||||
bvc pal
|
bvc pal
|
||||||
dex ; NTSC
|
dex ; NTSC
|
||||||
|
@ -6,10 +6,8 @@
|
|||||||
; /* Return the video mode the machine is using */
|
; /* Return the video mode the machine is using */
|
||||||
;
|
;
|
||||||
|
|
||||||
.export _get_tv
|
|
||||||
|
|
||||||
.include "vic20.inc"
|
.include "vic20.inc"
|
||||||
|
.include "get_tv.inc"
|
||||||
|
|
||||||
;--------------------------------------------------------------------------
|
;--------------------------------------------------------------------------
|
||||||
; _get_tv
|
; _get_tv
|
||||||
@ -18,7 +16,7 @@
|
|||||||
|
|
||||||
NTSC_LINES = 261
|
NTSC_LINES = 261
|
||||||
; detect the system
|
; detect the system
|
||||||
lda #0
|
lda #TV::NTSC
|
||||||
tax
|
tax
|
||||||
@L0: ldy VIC_HLINE
|
@L0: ldy VIC_HLINE
|
||||||
cpy #1
|
cpy #1
|
||||||
@ -27,7 +25,7 @@ NTSC_LINES = 261
|
|||||||
beq @L2 ; line 0 reached -> NTSC
|
beq @L2 ; line 0 reached -> NTSC
|
||||||
cpy #NTSC_LINES/2+2
|
cpy #NTSC_LINES/2+2
|
||||||
bne @L1
|
bne @L1
|
||||||
lda #1
|
lda #TV::PAL
|
||||||
@L2: rts ; system detected: 0 for NTSC, 1 for PAL
|
@L2: rts ; system detected: 0 for NTSC, 1 for PAL
|
||||||
|
|
||||||
.endproc
|
.endproc
|
||||||
|
Loading…
x
Reference in New Issue
Block a user