mirror of
https://github.com/nippur72/apple1-videocard-lib.git
synced 2025-01-06 02:30:21 +00:00
39 lines
846 B
C
39 lines
846 B
C
// image converted with: Convert9918 - A simple image converter for the TMS9918A
|
|
// http://harmlesslion.com
|
|
|
|
#include <tms9918.h>
|
|
|
|
#pragma data_seg(Code)
|
|
#include "pic_c.h"
|
|
#include "pic_p.h"
|
|
#pragma data_seg(Data)
|
|
|
|
void main() {
|
|
|
|
#ifdef APPLE1_JUKEBOX
|
|
apple1_eprom_init();
|
|
#endif
|
|
|
|
woz_puts("DISPLAYING PICTURE...\r\r");
|
|
|
|
// in screen 2
|
|
tms_init_regs(SCREEN2_TABLE);
|
|
screen2_init_bitmap(FG_BG(COLOR_WHITE,COLOR_BLACK));
|
|
|
|
// bulk copy color table to VRAM
|
|
tms_set_vram_write_addr(TMS_COLOR_TABLE);
|
|
for(word t=0; t<sizeof(pic_c); t++) {
|
|
TMS_WRITE_DATA_PORT(pic_c[t]);
|
|
}
|
|
|
|
// bulk copy pattern table to VRAM
|
|
tms_set_vram_write_addr(TMS_PATTERN_TABLE);
|
|
for(word t=0; t<sizeof(pic_p); t++) {
|
|
TMS_WRITE_DATA_PORT(pic_p[t]);
|
|
}
|
|
|
|
// bye
|
|
while(apple1_getkey()!=CHR_RETURN);
|
|
woz_puts("BYE!\r");
|
|
}
|