+2004-01-13 Erik Petrich <epetrich@ivorytower.norman.ok.us>
+
+ * src/z80/main.c (_parseOptions): fixed the portmode= command line
+ option so that it actually works. Made it specific to the z80, since
+ the gbz80 doesn't have these kinds of I/O ports.
+
2004-01-13 Erik Petrich <epetrich@ivorytower.norman.ok.us>
* device/include/z180.h,
static OPTION _z80_options[] =
{
{ 0, "--callee-saves-bc", &z80_opts.calleeSavesBC, "Force a called function to always save BC" },
- { 80, "--portmode", &z80_opts.port_mode, "Determine PORT I/O mode (z80/z180)" },
+ { 0, "--portmode=", NULL, "Determine PORT I/O mode (z80/z180)" },
+ { 0, NULL }
+ };
+
+static OPTION _gbz80_options[] =
+ {
+ { 0, "--callee-saves-bc", &z80_opts.calleeSavesBC, "Force a called function to always save BC" },
{ 0, NULL }
};
return TRUE;
}
}
+ else if (!strncmp (argv[*i], "--portmode=", 11))
+ {
+ if (!strcmp (argv[*i], "--portmode=z80"))
+ {
+ z80_opts.port_mode = 80;
+ return TRUE;
+ }
+ else if (!strcmp (argv[*i], "--portmode=z180"))
+ {
+ z80_opts.port_mode = 180;
+ return TRUE;
+ }
+ }
}
return FALSE;
}
"_",
_gbz80_init,
_parseOptions,
- _z80_options,
+ _gbz80_options,
_finaliseOptions,
_setDefaultOptions,
z80_assignRegisters,