mirror of
https://github.com/cc65/cc65.git
synced 2025-01-26 17:36:57 +00:00
Merge pull request #404 from groessler/something_to_pull
Creativison changes.
This commit is contained in:
commit
aa75789f58
@ -10,10 +10,10 @@ CURSOR_X = $3C
|
||||
CURSOR_Y = $3D
|
||||
|
||||
;** VDP
|
||||
VDP_CONTROL_W = $3001
|
||||
VDP_DATA_W = $3000
|
||||
VDP_STATUS_R = $2001
|
||||
VDP_DATA_R = $2000
|
||||
VDP_STATUS_R = $2001
|
||||
VDP_DATA_W = $3000
|
||||
VDP_CONTROL_W = $3001
|
||||
|
||||
;** PIA
|
||||
PIA0_DATA = $1000
|
||||
@ -58,3 +58,4 @@ JOY_NNW = $4A
|
||||
BIOS_IRQ1_ADDR = $FF3F
|
||||
BIOS_IRQ2_ADDR = $FF52
|
||||
BIOS_NMI_RESET_ADDR = $F808
|
||||
BIOS_WRITE_VDP_REG = $FE1F
|
||||
|
@ -4,7 +4,7 @@ SYMBOLS {
|
||||
MEMORY {
|
||||
ZP: file = "", define = yes, start = $0020, size = $00E0;
|
||||
RAM: file = "", define = yes, start = $01FA, size = $0206;
|
||||
ROM: file = %O, define = yes, start = $B000, size = $1000;
|
||||
ROM: file = %O, define = yes, start = $B000, size = $1000, fill = yes, fillval = $FF;
|
||||
}
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
|
@ -18,7 +18,7 @@ _clrscr:
|
||||
lda #$50 ; VRAM offset high ($10 OR $40)
|
||||
sta VDP_CONTROL_W
|
||||
|
||||
lda #$C0 ; Space from ROM setup
|
||||
lda #$40 ; Space char from ROM setup
|
||||
|
||||
ldx #0
|
||||
ldy #3
|
||||
@ -34,8 +34,8 @@ L1: sta VDP_DATA_W
|
||||
lda #0
|
||||
sta CURSOR_X
|
||||
sta CURSOR_Y
|
||||
sta <SCREEN_PTR
|
||||
sta SCREEN_PTR
|
||||
lda #$10
|
||||
sta >SCREEN_PTR
|
||||
sta SCREEN_PTR+1
|
||||
|
||||
rts
|
||||
|
@ -96,8 +96,8 @@ BAD_CHAR:
|
||||
jmp plot
|
||||
|
||||
;-----------------------------------------------------------------------------
|
||||
; Initialize the conio subsystem. Code goes into the INIT segment, which may
|
||||
; be reused after startup.
|
||||
; Initialize the conio subsystem. "INIT" segment is nothing special on the
|
||||
; Creativision, it is part of the "ROM" memory.
|
||||
|
||||
.segment "INIT"
|
||||
|
||||
@ -122,4 +122,4 @@ LL: lda boxchars,x
|
||||
bne LL
|
||||
|
||||
cli
|
||||
jmp plot
|
||||
jmp plot
|
||||
|
@ -31,9 +31,6 @@ entry:
|
||||
ldx #<__RAM_START__ - 1
|
||||
txs
|
||||
|
||||
; Start interrupts
|
||||
cli
|
||||
|
||||
; Clear the BSS data
|
||||
jsr zerobss
|
||||
|
||||
@ -49,13 +46,21 @@ entry:
|
||||
; Call module constructors
|
||||
jsr initlib
|
||||
|
||||
; enable vertical blank interrupts in the display controller
|
||||
lda #$E0 ; 16K RAM, Active Display, Mode 1, VBI enabled
|
||||
ldx #$01 ; Register 1
|
||||
jsr BIOS_WRITE_VDP_REG
|
||||
|
||||
; Start interrupts
|
||||
cli
|
||||
|
||||
; Call main()
|
||||
jsr callmain
|
||||
|
||||
; Call module destructors. This is also the _exit entry.
|
||||
_exit: jsr donelib
|
||||
|
||||
; TODO: Replace with some sort of reset
|
||||
; A Creativision program isn't supposed to exit.
|
||||
loop: jmp loop
|
||||
|
||||
; ------------------------------------------------------------------------
|
||||
@ -81,7 +86,7 @@ irq2: jmp BIOS_IRQ2_ADDR
|
||||
; VDP Setup
|
||||
; This sets to Graphics Mode 1
|
||||
.byte $00 ; Register 0
|
||||
.byte $E0 ; Register 1 16K RAM, Active Display, Mode 1, VBI enabled
|
||||
.byte $C0 ; Register 1 16K RAM, Active Display, Mode 1, VBI disabled
|
||||
.byte $04 ; Register 2 Name Table at $1000 - $12FF
|
||||
.byte $60 ; Register 3 Colour Table at $1800 - $181F
|
||||
.byte $00 ; Register 4 Pattern Table at $0000 - $07FF
|
||||
|
@ -1,22 +0,0 @@
|
||||
;
|
||||
; Ullrich von Bassewitz, 2003-03-07
|
||||
;
|
||||
; Setup arguments for main
|
||||
;
|
||||
|
||||
|
||||
.constructor initmainargs, 24
|
||||
.import __argc, __argv
|
||||
|
||||
|
||||
;---------------------------------------------------------------------------
|
||||
; Get possible command-line arguments. Goes into the special INIT segment,
|
||||
; which may be reused after the startup code is run
|
||||
|
||||
.segment "INIT"
|
||||
|
||||
.proc initmainargs
|
||||
|
||||
rts
|
||||
|
||||
.endproc
|
Loading…
x
Reference in New Issue
Block a user