<sect1>PCE specific functions<p>
<itemize>
-<item>waitvblank
-<item>get_tv
+<item>waitvblank</item>
+<item>get_tv</item> (since all PCE systems are NTSC, this always returns TV_NTSC)
</itemize>
void waitvblank (void);
/* Wait for the vertical blanking */
-/* FIXME: not implemented */
-unsigned char get_tv (void);
+/* all PCE are NTSC */
+#define get_tv() TV_NTSC
/* Return the video mode the machine is using. */
revers() is a dummy function, actual reverse output is not supported yet
-waitvblank() is missing
-get_tv() is missing
-
some graphical petscii chars should get added to the charset
interruptor support in crt0 (and cfg) is missing
--- /dev/null
+;
+; void waitvblank (void);
+;
+
+ .include "pce.inc"
+
+ .export _waitvblank
+;; .importzp tickcount
+
+.proc _waitvblank
+
+ lda tickcount
+@lp: cmp tickcount
+ beq @lp
+ rts
+
+.endproc
+
);
}
- for(;;)
- {
+ i = get_tv();
+ gotoxy(30,0);
+ cputs("TV Mode: ");
+ switch(i) {
+ case TV_NTSC:
+ cputs("NTSC");
+ break;
+ case TV_PAL:
+ cputs("PAL");
+ break;
+ case TV_OTHER:
+ cputs("OTHER");
+ break;
+ }
+
+ for(;;) {
gotoxy(13,4);
cprintf("%02x", datavar);
gotoxy(13,5);
(j & joy_masks[JOY_FIRE])? " fire " : " ---- ",
(j & joy_masks[JOY_FIRE2])? "fire2 " : " ---- ");
}
+ waitvblank();
}
for(;;);
}