1
0
mirror of https://github.com/cc65/cc65.git synced 2024-05-31 22:41:32 +00:00

Move screen init into crt0.s

This commit is contained in:
Fabrizio Caruso 2019-10-03 23:32:16 +02:00 committed by Oliver Schmidt
parent 74a904be54
commit cdb8035cf0
3 changed files with 5 additions and 11 deletions

View File

@ -19,7 +19,7 @@ SEGMENTS {
CODE: load = ROM, type = ro, define = yes;
RODATA: load = ROM, type = ro, define = yes;
DATA: load = ROM, run = RAM, type = rw, define = yes;
FFF0: load = ROM, type = ro, offset = $7FF0;
FFF0: load = ROM, type = ro, offset = $7FEA;
VECTOR: load = ROM, type = ro, offset = $7FFA;
BSS: load = RAM, type = bss, define = yes;
}

View File

@ -67,7 +67,10 @@ not_dma:
; Removing this segment gives only a warning.
.segment "FFF0"
.proc reset32kcode
lda #(6<<5)
lda #$A0
sta lcd_width
sta lcd_height
lda #$C9
sta sv_bank
; Now, the 32Kbyte image can reside in the top of 64Kbyte and 128Kbyte ROMs.
jmp reset

View File

@ -34,19 +34,10 @@ unsigned char bit_reverse(unsigned char n)
return (bit_reverse_lookup[n&0b1111] << 4) | bit_reverse_lookup[n>>4];
}
void init_screen(void)
{
SV_LCD.height = 0xA0;
SV_LCD.width = 0xA0;
SV_BANK = 0xC9;
}
int main()
{
unsigned char i;
init_screen();
clear_screen();
for(i=0;i<8;++i)