1
0
mirror of https://github.com/cc65/cc65.git synced 2025-01-14 00:32:08 +00:00

Init is no longer in crt0.s

This commit is contained in:
Fabrizio Caruso 2019-10-09 09:23:57 +02:00 committed by Oliver Schmidt
parent 7706ea2f13
commit fb260ef17f
3 changed files with 10 additions and 6 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;
FFEA: load = ROM, type = ro, offset = $7FEA;
FFF0: load = ROM, type = ro, offset = $7FF0;
VECTOR: load = ROM, type = ro, offset = $7FFA;
BSS: load = RAM, type = bss, define = yes;
}

View File

@ -65,11 +65,8 @@ not_dma:
.endproc
; Removing this segment gives only a warning.
.segment "FFEA"
.segment "FFF0"
.proc reset32kcode
lda #160
sta lcd_width
sta lcd_height
lda #(6<<5) | SV_LCD_ON | SV_NMI_ENABLE_ON
sta sv_bank
; Now, the 32Kbyte image can reside in the top of 64Kbyte and 128Kbyte ROMs.

View File

@ -60,8 +60,15 @@ void display_char(const unsigned char x, const unsigned char y, const unsigned c
}
}
void init_lcd(void)
{
SV_LCD.width = 160;
SV_LCD.height = 160;
}
int main()
{
{
init_lcd();
clear_screen();
display_char(3,2, h_char);