3 * Author : Robin Krens <robin@robinkrens.nl>
5 * Last Modified Date: 09.06.2022
6 * Last Modified By : Robin Krens <robin@robinkrens.nl>
10 #include <interrupt.h>
13 unsigned char bgtile_gfx[] = {
14 0x31, 0x22, 0x31, 0x32, 0x22, 0x31, 0x23, 0x21, 0x13, 0x13, 0x31, 0x32,
15 0x32, 0x31, 0x23, 0x12, 0x21, 0x32, 0x13, 0x23, 0x23, 0x13, 0x31, 0x31,
16 0x12, 0x32, 0x13, 0x22, 0x23, 0x13, 0x22, 0x13
20 unsigned char bgtile_pal[] = {
21 0x65, 0x06, 0x67, 0x06, 0x79, 0x07, 0x8c, 0x08, 0xff, 0x0f, 0xff, 0x0f,
22 0xff, 0x0f, 0xff, 0x0f, 0xff, 0x0f, 0xff, 0x0f, 0xff, 0x0f, 0xff, 0x0f,
23 0xff, 0x0f, 0xff, 0x0f, 0xff, 0x0f, 0xff, 0x0f
28 unsigned char lol[5] = { 0xAA, 0x2, 0x3, 0x4, 0x5};
29 unsigned char lol2[5] = { 0x1, 0x2, 0x3, 0x4, 0x5};
30 unsigned char lol3[5] = { 0x1, 0x2, 0x3, 0x4, 0x5};
31 #define PALETTE_T (volatile unsigned *)0xFE00
32 #define SPRITE_T (volatile unsigned *)0x4000
35 static unsigned char blaat[100];
37 void outport(unsigned char portnr, unsigned char val)
43 :"r"(val), "r"(portnr)
47 __attribute__ ((naked)) void * dummy_isr(void)
56 outport(IO_INT_BASE, INT_BASE);
58 unsigned short * test_vec = (INT_BASE + INTVEC_VBLANK_START) << 2;
59 *test_vec++ = (&dummy_isr);
62 outport(IO_INT_ENABLE, INT_VBLANK_START);
81 outport(IO_VIDEO_MODE, VMODE_16C_CHK | VMODE_CLEANINIT);
82 outport(IO_FGBG_MAP, 0x40);
85 unsigned char * ptr = PALETTE_T;
86 for (int i = 0; i < sizeof(bgtile_pal); ++i) {
87 *ptr++ = bgtile_pal[i];
91 for (int i = 0; i < sizeof(bgtile_gfx); ++i) {
92 *ptr++ = bgtile_gfx[i];
95 outport(IO_DISPLAY_CTRL, BG_ON);