69 #include <sys/types.h>
78 #define DREAMCAST_ROMFONT_BASE 0x80100020
82 #define DREAMCAST_MACHINE_ID_ADDRESS 0x80000068
85 static int booting_from_cdrom = 0;
113 for (i=0; i<288; i++) {
114 for (y=0; y<24; y+=2) {
115 if (y <= 1 || y >= 22)
125 for (i=1; i<=94; i++) {
129 for (y=0; y<24; y+=2) {
130 if (y < 4 || y >= 20)
148 for (i=96; i<=191; i++) {
150 int c = i - 96 + 160;
152 for (y=0; y<24; y+=2) {
153 if (y < 4 || y >= 20)
167 for (i=1; i<7078; i++) {
168 for (y=0; y<24; y++) {
169 if (y <= 1 || y >= 22)
180 for (i=0; i<129; i++) {
181 for (y=0; y<32; y++) {
182 if (y <= 1 || y >= 30)
205 for (i=0; i<0x50; i+=
sizeof(uint32_t)) {
220 dreamcast_romfont_init(
machine);
223 cpu->
cd.
sh.
pr = 0x8c0000e0 + (0x100 - 0xb0);
226 cpu->
cd.
sh.
r[15] = 0x8c000000 + 16 * 1048576;
244 uint32_t vectorAddr = ((
cpu->
pc & 0x00ffffff) - 0x100 + 0xb0) | 0x8c000000;
251 if ((uint32_t)
cpu->
pc == 0x80000000 || (uint32_t)
cpu->
pc == 0xa0000000) {
252 fatal(
"[ dreamcast reboot ]\n");
257 switch (vectorAddr) {
267 default:
fatal(
"[ SYSINFO: Unimplemented r7=%i ]\n", r7);
278 default:
fatal(
"[ ROMFONT: Unimplemented r1=%i ]\n", r1);
294 default:
fatal(
"[ FLASHROM: Unimplemented r7=%i ]\n", r7);
300 switch ((int32_t)r6) {
320 default:
fatal(
"[ GDROM: Unimplemented r7=%i ]\n", r7);
324 default:
fatal(
"[ 0xbc: Unimplemented r6=0x%x ]\n", r6);
344 if (booting_from_cdrom) {
345 debug(
"[ dreamcast: Switching to bootstrap 1 ]\n");
347 booting_from_cdrom = 0;
350 cpu->
pc = 0x8c00b800;
353 fatal(
"[ dreamcast: Returning to main menu. ]\n");
368 debug(
"[ dreamcast boot from CDROM ]\n");
369 booting_from_cdrom = 1;
370 cpu->
pc = 0x8c008300;
384 fatal(
"[ dreamcast_emul(): unimplemented dreamcast PROM call, "
385 "pc=0x%08" PRIx32
" (vectorAddr=0x%08" PRIx32
") ]\n", (uint32_t)
cpu->
pc, vectorAddr);