+/**
+ * File : main.c
+ * Author : Robin Krens <robin@robinkrens.nl>
+ * Date : 09.06.2022
+ * Last Modified Date: 09.06.2022
+ * Last Modified By : Robin Krens <robin@robinkrens.nl>
+ */
+#include <memory.h>
+#include <video.h>
+#include <interrupt.h>
/* sprite data */
unsigned char bgtile_gfx[] = {
:);
}
-void init_video(void)
+__attribute__ ((naked)) void * dummy_isr(void)
+{
+ int a = 2;
+ a *= 2;
+ while(1);
+}
+
+void setup_ivec(void)
{
+ outport(IO_INT_BASE, INT_BASE);
+
+ unsigned short * test_vec = (INT_BASE + INTVEC_VBLANK_START) << 2;
+ *test_vec++ = (&dummy_isr);
+ *test_vec = (0x2000);
+ outport(IO_INT_ENABLE, INT_VBLANK_START);
+ __asm__("sti");
+}
+
+void init_video(void)
+{
}
int main(void)
blaat[1] = 0xEE;
blaat[32] = 0xEE;
+ setup_ivec();
init_video();
+ outport(IO_VIDEO_MODE, VMODE_16C_CHK | VMODE_CLEANINIT);
+ outport(IO_FGBG_MAP, 0x40);
outport(0x15, 0xEE);
- while(1);
unsigned char * ptr = PALETTE_T;
for (int i = 0; i < sizeof(bgtile_pal); ++i) {
for (int i = 0; i < sizeof(bgtile_gfx); ++i) {
*ptr++ = bgtile_gfx[i];
}
+
+ outport(IO_DISPLAY_CTRL, BG_ON);
while(1) {
}