SDIR = src
INC = -Iinc
-CFLAGS = -march=v30 -ffreestanding # use NEC v30 chip
+CFLAGS = -march=v30# use NEC v30 chip
+CFLAGS += -ffreestanding# no stdlib
+CFLAGS += -fno-pic# for use of inline asm
_OBJS = entry.o main.o # todo: make sure entry is forced as entry point for linker
unsigned char lol[5] = { 0xAA, 0x2, 0x3, 0x4, 0x5};
unsigned char lol2[5] = { 0x1, 0x2, 0x3, 0x4, 0x5};
unsigned char lol3[5] = { 0x1, 0x2, 0x3, 0x4, 0x5};
-#define PALETTE (*(volatile unsigned *)0xFE00)
#define PALETTE_T (volatile unsigned *)0xFE00
#define SPRITE_T (volatile unsigned *)0x4000
/* bss */
static unsigned char blaat[100];
+void outport(unsigned char portnr, unsigned char val)
+{
+ __asm__(
+ "mov %1, %%dl\n\t"
+ "out %0, (%%dx)"
+ :
+ :"r"(val), "r"(portnr)
+ :);
+}
+
+void init_video(void)
+{
+
+}
+
int main(void)
{
lol[0] = 0xDD;
blaat[0] = 0xEE;
blaat[1] = 0xEE;
blaat[32] = 0xEE;
+
+ init_video();
+ outport(0x15, 0xEE);
+ while(1);
unsigned char * ptr = PALETTE_T;
for (int i = 0; i < sizeof(bgtile_pal); ++i) {