nuclear@1: #include nuclear@0: #include "vdp.h" nuclear@6: #include "io.h" nuclear@9: #include "pad.h" nuclear@9: #include "intr.h" nuclear@5: #include "tun_data.h" nuclear@0: nuclear@5: #define NAMETAB_A 6 nuclear@5: #define NAMETAB_B 6 nuclear@5: nuclear@5: void load_pattern(int idx, void *data); nuclear@5: void set_tile(int nametab_idx, int x, int y, int tile_idx, int palidx); nuclear@5: nuclear@5: #define CYCLE_BEG 1 nuclear@5: #define CYCLE_END 14 nuclear@5: static uint16_t pal[16] = { nuclear@5: VDP_PACK_RGB(0, 0, 0), /* 0: fixed */ nuclear@5: VDP_PACK_RGB(0, 0, 0), /* 1: cycle start */ nuclear@5: VDP_PACK_RGB(0, 0, 0), VDP_PACK_RGB(0, 0, 0), nuclear@5: VDP_PACK_RGB(0, 0, 0), VDP_PACK_RGB(0, 0, 0), nuclear@5: VDP_PACK_RGB(0, 0, 0), VDP_PACK_RGB(0, 0, 0), nuclear@5: VDP_PACK_RGB(0, 0, 0), VDP_PACK_RGB(0, 0, 0), nuclear@5: VDP_PACK_RGB(0, 0, 0), VDP_PACK_RGB(0, 0, 0), nuclear@5: VDP_PACK_RGB(0, 0, 0), /* 12: \ */ nuclear@5: VDP_PACK_RGB(7, 0, 3), /* 13: > beam */ nuclear@5: VDP_PACK_RGB(0, 0, 0), /* 14: / cycle end */ nuclear@5: VDP_PACK_RGB(7, 0, 3) /* 15: fixed */ nuclear@4: }; nuclear@4: nuclear@4: nuclear@0: int main(void) nuclear@0: { nuclear@4: int i, j; nuclear@4: nuclear@0: vdp_init(); nuclear@0: nuclear@6: if(IO_REG_VER & IO_VER_PAL) { nuclear@6: vdp_setreg(VDP_REG_MODE2, vdp_getreg(VDP_REG_MODE2) | VDP_MODE2_V30CELL); nuclear@6: } nuclear@5: nuclear@5: vdp_begin_palette(0, 0); nuclear@5: for(i=0; i<16; i++) { nuclear@5: VDP_PORT_DATA = pal[i]; nuclear@5: } nuclear@0: nuclear@5: for(i=0; i