| Previous | 199869 Revisions | Next |
| r37138 Sunday 12th April, 2015 at 14:54:10 UTC by Miodrag Milanović |
|---|
| string -> str rename due to future conflicts (nw) |
| [src/emu] | cheat.c cheat.h clifront.c distate.c distate.h input.c input.h ioport.c ioport.h sound.c sound.h validity.c validity.h video.c video.h |
| [src/emu/cpu] | uml.h |
| [src/emu/cpu/8x300] | 8x300.c 8x300.h |
| [src/emu/cpu/adsp2100] | adsp2100.c adsp2100.h |
| [src/emu/cpu/alph8201] | alph8201.c alph8201.h |
| [src/emu/cpu/alto2] | alto2cpu.c alto2cpu.h |
| [src/emu/cpu/am29000] | am29000.c am29000.h |
| [src/emu/cpu/amis2000] | amis2000.c amis2000.h |
| [src/emu/cpu/apexc] | apexc.c apexc.h |
| [src/emu/cpu/arm] | arm.c arm.h |
| [src/emu/cpu/arm7] | arm7.c arm7.h |
| [src/emu/cpu/asap] | asap.c asap.h |
| [src/emu/cpu/avr8] | avr8.c avr8.h |
| [src/emu/cpu/ccpu] | ccpu.c ccpu.h |
| [src/emu/cpu/cop400] | cop400.c cop400.h |
| [src/emu/cpu/cosmac] | cosmac.c cosmac.h |
| [src/emu/cpu/cp1610] | cp1610.c cp1610.h |
| [src/emu/cpu/cubeqcpu] | cubeqcpu.c cubeqcpu.h |
| [src/emu/cpu/dsp16] | dsp16.c dsp16.h |
| [src/emu/cpu/dsp32] | dsp32.c dsp32.h |
| [src/emu/cpu/dsp56k] | dsp56k.c dsp56k.h |
| [src/emu/cpu/e132xs] | e132xs.c e132xs.h |
| [src/emu/cpu/esrip] | esrip.c esrip.h |
| [src/emu/cpu/f8] | f8.c f8.h |
| [src/emu/cpu/g65816] | g65816.c g65816.h |
| [src/emu/cpu/h6280] | h6280.c h6280.h |
| [src/emu/cpu/h8] | h8.c h8.h |
| [src/emu/cpu/hcd62121] | hcd62121.c hcd62121.h |
| [src/emu/cpu/hd61700] | hd61700.c hd61700.h |
| [src/emu/cpu/hmcs40] | hmcs40.c hmcs40.h |
| [src/emu/cpu/i386] | i386.c i386.h |
| [src/emu/cpu/i4004] | i4004.c i4004.h |
| [src/emu/cpu/i8008] | i8008.c i8008.h |
| [src/emu/cpu/i8085] | i8085.c i8085.h |
| [src/emu/cpu/i8089] | i8089.c i8089.h |
| [src/emu/cpu/i86] | i286.c i286.h i86.c i86.h |
| [src/emu/cpu/i960] | i960.c i960.h |
| [src/emu/cpu/ie15] | ie15.c ie15.h |
| [src/emu/cpu/jaguar] | jaguar.c jaguar.h |
| [src/emu/cpu/lc8670] | lc8670.c lc8670.h |
| [src/emu/cpu/lh5801] | lh5801.c lh5801.h |
| [src/emu/cpu/lr35902] | lr35902.c lr35902.h |
| [src/emu/cpu/m37710] | m37710.c m37710.h |
| [src/emu/cpu/m6502] | m6502.c m6502.h m65ce02.c m65ce02.h m740.c m740.h |
| [src/emu/cpu/m6800] | m6800.c m6800.h |
| [src/emu/cpu/m68000] | m68000.h m68kcpu.c |
| [src/emu/cpu/m6805] | m6805.c m6805.h |
| [src/emu/cpu/m6809] | m6809.c m6809.h |
| [src/emu/cpu/mb86233] | mb86233.c mb86233.h |
| [src/emu/cpu/mb86235] | mb86235.c mb86235.h |
| [src/emu/cpu/mb88xx] | mb88xx.c mb88xx.h |
| [src/emu/cpu/mc68hc11] | mc68hc11.c mc68hc11.h |
| [src/emu/cpu/mcs48] | mcs48.c mcs48.h |
| [src/emu/cpu/mcs51] | mcs51.c mcs51.h |
| [src/emu/cpu/mcs96] | mcs96.c mcs96.h |
| [src/emu/cpu/minx] | minx.c minx.h |
| [src/emu/cpu/mips] | mips3.c mips3.h r3000.c r3000.h |
| [src/emu/cpu/mn10200] | mn10200.c mn10200.h |
| [src/emu/cpu/nec] | nec.c nec.h v25.c v25.h |
| [src/emu/cpu/pdp1] | pdp1.c pdp1.h |
| [src/emu/cpu/pic16c5x] | pic16c5x.c pic16c5x.h |
| [src/emu/cpu/pic16c62x] | pic16c62x.c pic16c62x.h |
| [src/emu/cpu/powerpc] | ppc.h ppccom.c |
| [src/emu/cpu/pps4] | pps4.c pps4.h |
| [src/emu/cpu/psx] | psx.c psx.h |
| [src/emu/cpu/rsp] | rsp.c rsp.h rspcp2.c rspcp2.h rspcp2d.c rspcp2d.h rspcp2s.c rspcp2s.h |
| [src/emu/cpu/s2650] | s2650.c s2650.h |
| [src/emu/cpu/saturn] | saturn.c saturn.h |
| [src/emu/cpu/sc61860] | sc61860.c sc61860.h |
| [src/emu/cpu/scmp] | scmp.c scmp.h |
| [src/emu/cpu/score] | score.c score.h |
| [src/emu/cpu/scudsp] | scudsp.c scudsp.h |
| [src/emu/cpu/se3208] | se3208.c se3208.h |
| [src/emu/cpu/sh2] | sh2.c sh2.h |
| [src/emu/cpu/sh4] | sh4.c sh4.h |
| [src/emu/cpu/sm8500] | sm8500.c sm8500.h |
| [src/emu/cpu/spc700] | spc700.c spc700.h |
| [src/emu/cpu/ssem] | ssem.c ssem.h |
| [src/emu/cpu/ssp1601] | ssp1601.c ssp1601.h |
| [src/emu/cpu/t11] | t11.c t11.h |
| [src/emu/cpu/tlcs90] | tlcs90.c tlcs90.h |
| [src/emu/cpu/tlcs900] | tlcs900.c tlcs900.h |
| [src/emu/cpu/tms0980] | tms0980.c tms0980.h |
| [src/emu/cpu/tms32010] | tms32010.c tms32010.h |
| [src/emu/cpu/tms32025] | tms32025.c tms32025.h |
| [src/emu/cpu/tms32031] | tms32031.c tms32031.h |
| [src/emu/cpu/tms32082] | tms32082.c tms32082.h |
| [src/emu/cpu/tms34010] | tms34010.c tms34010.h |
| [src/emu/cpu/tms7000] | tms7000.c tms7000.h |
| [src/emu/cpu/tms9900] | tms9900.c tms9900.h tms9995.c tms9995.h |
| [src/emu/cpu/ucom4] | ucom4.c ucom4.h |
| [src/emu/cpu/upd7725] | upd7725.c upd7725.h |
| [src/emu/cpu/upd7810] | upd7810.c upd7810.h |
| [src/emu/cpu/v30mz] | v30mz.c v30mz.h |
| [src/emu/cpu/v810] | v810.c v810.h |
| [src/emu/cpu/z180] | z180.c z180.h |
| [src/emu/cpu/z8] | z8.c z8.h |
| [src/emu/cpu/z80] | z80.c z80.h |
| [src/emu/cpu/z8000] | z8000.c z8000.h |
| [src/emu/machine] | netlist.h |
| [src/emu/ui] | devopt.c info.c ui.c ui.h |
| [src/mame/etc] | template_cpu.c template_cpu.h |
| [src/tools] | chdman.c |
| r245649 | r245650 | |
|---|---|---|
| 101 | 101 | // the format |
| 102 | 102 | //------------------------------------------------- |
| 103 | 103 | |
| 104 | inline const char *number_and_format::format(astring &str | |
| 104 | inline const char *number_and_format::format(astring &str) const | |
| 105 | 105 | { |
| 106 | 106 | switch (m_format) |
| 107 | 107 | { |
| 108 | 108 | default: |
| 109 | 109 | case XML_INT_FORMAT_DECIMAL: |
| 110 | str | |
| 110 | str.printf("%d", (UINT32)m_value); | |
| 111 | 111 | break; |
| 112 | 112 | |
| 113 | 113 | case XML_INT_FORMAT_DECIMAL_POUND: |
| 114 | str | |
| 114 | str.printf("#%d", (UINT32)m_value); | |
| 115 | 115 | break; |
| 116 | 116 | |
| 117 | 117 | case XML_INT_FORMAT_HEX_DOLLAR: |
| 118 | str | |
| 118 | str.printf("$%X", (UINT32)m_value); | |
| 119 | 119 | break; |
| 120 | 120 | |
| 121 | 121 | case XML_INT_FORMAT_HEX_C: |
| 122 | str | |
| 122 | str.printf("0x%X", (UINT32)m_value); | |
| 123 | 123 | break; |
| 124 | 124 | } |
| 125 | return str | |
| 125 | return str.c_str(); | |
| 126 | 126 | } |
| 127 | 127 | |
| 128 | 128 | |
| r245649 | r245650 | |
| 205 | 205 | cheatfile.printf("\t\t<parameter"); |
| 206 | 206 | |
| 207 | 207 | // if no items, just output min/max/step |
| 208 | astring str | |
| 208 | astring str; | |
| 209 | 209 | if (!has_itemlist()) |
| 210 | 210 | { |
| 211 | 211 | if (m_minval != 0) |
| 212 | cheatfile.printf(" min=\"%s\"", m_minval.format(str | |
| 212 | cheatfile.printf(" min=\"%s\"", m_minval.format(str)); | |
| 213 | 213 | if (m_maxval != 0) |
| 214 | cheatfile.printf(" max=\"%s\"", m_maxval.format(str | |
| 214 | cheatfile.printf(" max=\"%s\"", m_maxval.format(str)); | |
| 215 | 215 | if (m_stepval != 1) |
| 216 | cheatfile.printf(" step=\"%s\"", m_stepval.format(str | |
| 216 | cheatfile.printf(" step=\"%s\"", m_stepval.format(str)); | |
| 217 | 217 | cheatfile.printf("/>\n"); |
| 218 | 218 | } |
| 219 | 219 | |
| r245649 | r245650 | |
| 221 | 221 | else |
| 222 | 222 | { |
| 223 | 223 | for (const item *curitem = m_itemlist.first(); curitem != NULL; curitem = curitem->next()) |
| 224 | cheatfile.printf("\t\t\t<item value=\"%s\">%s</item>\n", curitem->value().format(str | |
| 224 | cheatfile.printf("\t\t\t<item value=\"%s\">%s</item>\n", curitem->value().format(str), curitem->text()); | |
| 225 | 225 | cheatfile.printf("\t\t</parameter>\n"); |
| 226 | 226 | } |
| 227 | 227 | } |
| r245649 | r245650 | |
| 1263 | 1263 | // document |
| 1264 | 1264 | //------------------------------------------------- |
| 1265 | 1265 | |
| 1266 | const char *cheat_manager::quote_expression(astring &str | |
| 1266 | const char *cheat_manager::quote_expression(astring &str, const parsed_expression &expression) | |
| 1267 | 1267 | { |
| 1268 | str | |
| 1268 | str.cpy(expression.original_string()); | |
| 1269 | 1269 | |
| 1270 | string.replace(0, " && ", " and "); | |
| 1271 | string.replace(0, " &&", " and "); | |
| 1272 | string.replace(0, "&& ", " and "); | |
| 1273 | string.replace(0, "&&", " and "); | |
| 1270 | str.replace(0, " && ", " and "); | |
| 1271 | str.replace(0, " &&", " and "); | |
| 1272 | str.replace(0, "&& ", " and "); | |
| 1273 | str.replace(0, "&&", " and "); | |
| 1274 | 1274 | |
| 1275 | string.replace(0, " & ", " band "); | |
| 1276 | string.replace(0, " &", " band "); | |
| 1277 | string.replace(0, "& ", " band "); | |
| 1278 | string.replace(0, "&", " band "); | |
| 1275 | str.replace(0, " & ", " band "); | |
| 1276 | str.replace(0, " &", " band "); | |
| 1277 | str.replace(0, "& ", " band "); | |
| 1278 | str.replace(0, "&", " band "); | |
| 1279 | 1279 | |
| 1280 | string.replace(0, " <= ", " le "); | |
| 1281 | string.replace(0, " <=", " le "); | |
| 1282 | string.replace(0, "<= ", " le "); | |
| 1283 | string.replace(0, "<=", " le "); | |
| 1280 | str.replace(0, " <= ", " le "); | |
| 1281 | str.replace(0, " <=", " le "); | |
| 1282 | str.replace(0, "<= ", " le "); | |
| 1283 | str.replace(0, "<=", " le "); | |
| 1284 | 1284 | |
| 1285 | string.replace(0, " < ", " lt "); | |
| 1286 | string.replace(0, " <", " lt "); | |
| 1287 | string.replace(0, "< ", " lt "); | |
| 1288 | string.replace(0, "<", " lt "); | |
| 1285 | str.replace(0, " < ", " lt "); | |
| 1286 | str.replace(0, " <", " lt "); | |
| 1287 | str.replace(0, "< ", " lt "); | |
| 1288 | str.replace(0, "<", " lt "); | |
| 1289 | 1289 | |
| 1290 | string.replace(0, " << ", " lshift "); | |
| 1291 | string.replace(0, " <<", " lshift "); | |
| 1292 | string.replace(0, "<< ", " lshift "); | |
| 1293 | string.replace(0, "<<", " lshift "); | |
| 1290 | str.replace(0, " << ", " lshift "); | |
| 1291 | str.replace(0, " <<", " lshift "); | |
| 1292 | str.replace(0, "<< ", " lshift "); | |
| 1293 | str.replace(0, "<<", " lshift "); | |
| 1294 | 1294 | |
| 1295 | return str | |
| 1295 | return str.c_str(); | |
| 1296 | 1296 | } |
| 1297 | 1297 | |
| 1298 | 1298 |
| r245649 | r245650 | |
|---|---|---|
| 56 | 56 | operator const UINT64 &() const { return m_value; } |
| 57 | 57 | |
| 58 | 58 | // format the number according to its format |
| 59 | const char *format(astring &str | |
| 59 | const char *format(astring &str) const; | |
| 60 | 60 | |
| 61 | 61 | private: |
| 62 | 62 | // internal state |
| r245649 | r245650 | |
| 308 | 308 | astring &get_output_astring(int row, int justify); |
| 309 | 309 | |
| 310 | 310 | // global helpers |
| 311 | static const char *quote_expression(astring &str | |
| 311 | static const char *quote_expression(astring &str, const parsed_expression &expression); | |
| 312 | 312 | static UINT64 execute_frombcd(symbol_table &table, void *ref, int params, const UINT64 *param); |
| 313 | 313 | static UINT64 execute_tobcd(symbol_table &table, void *ref, int params, const UINT64 *param); |
| 314 | 314 |
| r245649 | r245650 | |
|---|---|---|
| 225 | 225 | // handle exceptions of various types |
| 226 | 226 | catch (emu_fatalerror &fatal) |
| 227 | 227 | { |
| 228 | astring string(fatal.string()); | |
| 229 | osd_printf_error("%s\n", string.trimspace().c_str()); | |
| 228 | astring str(fatal.string()); | |
| 229 | osd_printf_error("%s\n", str.trimspace().c_str()); | |
| 230 | 230 | m_result = (fatal.exitcode() != 0) ? fatal.exitcode() : MAMERR_FATALERROR; |
| 231 | 231 | |
| 232 | 232 | // if a game was specified, wasn't a wildcard, and our error indicates this was the |
| r245649 | r245650 | |
|---|---|---|
| 143 | 143 | m_icountptr = &m_icount; |
| 144 | 144 | } |
| 145 | 145 | |
| 146 | void n8x300_cpu_device::state_string_export(const device_state_entry &entry, astring &str | |
| 146 | void n8x300_cpu_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 147 | 147 | { |
| 148 | 148 | switch (entry.index()) |
| 149 | 149 | { |
| r245649 | r245650 | |
|---|---|---|
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | // device_state_interface overrides |
| 67 | void state_string_export(const device_state_entry &entry, astring &str | |
| 67 | void state_string_export(const device_state_entry &entry, astring &str); | |
| 68 | 68 | |
| 69 | 69 | // device_disasm_interface overrides |
| 70 | 70 | virtual UINT32 disasm_min_opcode_bytes() const { return 2; } |
| r245649 | r245650 | |
|---|---|---|
| 720 | 720 | // for the debugger |
| 721 | 721 | //------------------------------------------------- |
| 722 | 722 | |
| 723 | void adsp21xx_device::state_string_export(const device_state_entry &entry, astring &str | |
| 723 | void adsp21xx_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 724 | 724 | { |
| 725 | 725 | switch (entry.index()) |
| 726 | 726 | { |
| 727 | 727 | case STATE_GENFLAGS: |
| 728 | str | |
| 728 | str.printf("%c%c%c%c%c%c%c%c", | |
| 729 | 729 | m_astat & 0x80 ? 'X':'.', |
| 730 | 730 | m_astat & 0x40 ? 'M':'.', |
| 731 | 731 | m_astat & 0x20 ? 'Q':'.', |
| r245649 | r245650 | |
|---|---|---|
| 237 | 237 | |
| 238 | 238 | // device_state_interface overrides |
| 239 | 239 | virtual void state_import(const device_state_entry &entry); |
| 240 | virtual void state_string_export(const device_state_entry &entry, astring &str | |
| 240 | virtual void state_string_export(const device_state_entry &entry, astring &str); | |
| 241 | 241 | |
| 242 | 242 | // device_disasm_interface overrides |
| 243 | 243 | virtual UINT32 disasm_min_opcode_bytes() const; |
| r245649 | r245650 | |
|---|---|---|
| 513 | 513 | } |
| 514 | 514 | |
| 515 | 515 | |
| 516 | void alpha8201_cpu_device::state_string_export(const device_state_entry &entry, astring &str | |
| 516 | void alpha8201_cpu_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 517 | 517 | { |
| 518 | 518 | switch (entry.index()) |
| 519 | 519 | { |
| 520 | 520 | case STATE_GENFLAGS: |
| 521 | str | |
| 521 | str.printf("%c%c", m_cf ? 'C' : '.', m_zf ? 'Z' : '.'); | |
| 522 | 522 | break; |
| 523 | 523 | } |
| 524 | 524 | } |
| r245649 | r245650 | |
|---|---|---|
| 61 | 61 | // device_state_interface overrides |
| 62 | 62 | virtual void state_import(const device_state_entry &entry); |
| 63 | 63 | virtual void state_export(const device_state_entry &entry); |
| 64 | void state_string_export(const device_state_entry &entry, astring &str | |
| 64 | void state_string_export(const device_state_entry &entry, astring &str); | |
| 65 | 65 | |
| 66 | 66 | // device_disasm_interface overrides |
| 67 | 67 | virtual UINT32 disasm_min_opcode_bytes() const { return 1; } |
| r245649 | r245650 | |
|---|---|---|
| 1004 | 1004 | // for the debugger |
| 1005 | 1005 | //------------------------------------------------- |
| 1006 | 1006 | |
| 1007 | void alto2_cpu_device::state_string_export(const device_state_entry &entry, astring &str | |
| 1007 | void alto2_cpu_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 1008 | 1008 | { |
| 1009 | 1009 | switch (entry.index()) |
| 1010 | 1010 | { |
| 1011 | 1011 | case A2_TASK: |
| 1012 | str | |
| 1012 | str.printf("%s", task_name(m_task)); | |
| 1013 | 1013 | break; |
| 1014 | 1014 | case STATE_GENFLAGS: |
| 1015 | str | |
| 1015 | str.printf("%s%s%s%s", | |
| 1016 | 1016 | m_aluc0 ? "C":"-", |
| 1017 | 1017 | m_laluc0 ? "c":"-", |
| 1018 | 1018 | m_shifter == 0 ? "0":"-", |
| r245649 | r245650 | |
|---|---|---|
| 215 | 215 | //! device (P)ROMs |
| 216 | 216 | virtual const rom_entry *device_rom_region() const; |
| 217 | 217 | //! device_state_interface overrides |
| 218 | void state_string_export(const device_state_entry &entry, astring &str | |
| 218 | void state_string_export(const device_state_entry &entry, astring &str); | |
| 219 | 219 | |
| 220 | 220 | //! device_disasm_interface overrides |
| 221 | 221 | virtual UINT32 disasm_min_opcode_bytes() const { return 4; } |
| r245649 | r245650 | |
|---|---|---|
| 402 | 402 | } |
| 403 | 403 | |
| 404 | 404 | |
| 405 | void am29000_cpu_device::state_string_export(const device_state_entry &entry, astring &str | |
| 405 | void am29000_cpu_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 406 | 406 | { |
| 407 | 407 | switch (entry.index()) |
| 408 | 408 | { |
| 409 | 409 | case STATE_GENFLAGS: |
| 410 | str | |
| 410 | str.printf("%c%c%c%c%c%c%c%c%c|%3d", m_alu & ALU_V ? 'V' : '.', | |
| 411 | 411 | m_alu & ALU_Z ? 'Z' : '.', |
| 412 | 412 | m_alu & ALU_N ? 'N' : '.', |
| 413 | 413 | m_alu & ALU_C ? 'C' : '.', |
| r245649 | r245650 | |
|---|---|---|
| 460 | 460 | } |
| 461 | 461 | |
| 462 | 462 | // device_state_interface overrides |
| 463 | void state_string_export(const device_state_entry &entry, astring &str | |
| 463 | void state_string_export(const device_state_entry &entry, astring &str); | |
| 464 | 464 | |
| 465 | 465 | // device_disasm_interface overrides |
| 466 | 466 | virtual UINT32 disasm_min_opcode_bytes() const { return 4; } |
| r245649 | r245650 | |
|---|---|---|
| 72 | 72 | |
| 73 | 73 | |
| 74 | 74 | // disasm |
| 75 | void amis2000_base_device::state_string_export(const device_state_entry &entry, astring &str | |
| 75 | void amis2000_base_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 76 | 76 | { |
| 77 | 77 | switch (entry.index()) |
| 78 | 78 | { |
| 79 | 79 | case STATE_GENFLAGS: |
| 80 | str | |
| 80 | str.printf("%c%c%c%c%c%c", | |
| 81 | 81 | m_f & 0x20 ? '6':'.', |
| 82 | 82 | m_f & 0x10 ? '5':'.', |
| 83 | 83 | m_f & 0x08 ? '4':'.', |
| r245649 | r245650 | |
|---|---|---|
| 89 | 89 | virtual UINT32 disasm_min_opcode_bytes() const { return 1; } |
| 90 | 90 | virtual UINT32 disasm_max_opcode_bytes() const { return 1; } |
| 91 | 91 | virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options); |
| 92 | void state_string_export(const device_state_entry &entry, astring &str | |
| 92 | void state_string_export(const device_state_entry &entry, astring &str); | |
| 93 | 93 | |
| 94 | 94 | address_space_config m_program_config; |
| 95 | 95 | address_space_config m_data_config; |
| r245649 | r245650 | |
|---|---|---|
| 812 | 812 | } |
| 813 | 813 | |
| 814 | 814 | |
| 815 | void apexc_cpu_device::state_string_export(const device_state_entry &entry, astring &str | |
| 815 | void apexc_cpu_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 816 | 816 | { |
| 817 | 817 | switch (entry.index()) |
| 818 | 818 | { |
| 819 | 819 | case STATE_GENFLAGS: |
| 820 | str | |
| 820 | str.printf("%c", m_running ? 'R' : 'S'); | |
| 821 | 821 | break; |
| 822 | 822 | } |
| 823 | 823 | } |
| r245649 | r245650 | |
|---|---|---|
| 42 | 42 | // device_state_interface overrides |
| 43 | 43 | virtual void state_import(const device_state_entry &entry); |
| 44 | 44 | virtual void state_export(const device_state_entry &entry); |
| 45 | void state_string_export(const device_state_entry &entry, astring &str | |
| 45 | void state_string_export(const device_state_entry &entry, astring &str); | |
| 46 | 46 | |
| 47 | 47 | // device_disasm_interface overrides |
| 48 | 48 | virtual UINT32 disasm_min_opcode_bytes() const { return 4; } |
| r245649 | r245650 | |
|---|---|---|
| 550 | 550 | } |
| 551 | 551 | |
| 552 | 552 | |
| 553 | void arm_cpu_device::state_string_export(const device_state_entry &entry, astring &str | |
| 553 | void arm_cpu_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 554 | 554 | { |
| 555 | 555 | static const char *s[4] = { "USER", "FIRQ", "IRQ ", "SVC " }; |
| 556 | 556 | |
| 557 | 557 | switch (entry.index()) |
| 558 | 558 | { |
| 559 | 559 | case STATE_GENFLAGS: |
| 560 | str | |
| 560 | str.printf("%c%c%c%c%c%c %s", | |
| 561 | 561 | (m_sArmRegister[15] & N_MASK) ? 'N' : '-', |
| 562 | 562 | (m_sArmRegister[15] & Z_MASK) ? 'Z' : '-', |
| 563 | 563 | (m_sArmRegister[15] & C_MASK) ? 'C' : '-', |
| r245649 | r245650 | |
|---|---|---|
| 59 | 59 | virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; } |
| 60 | 60 | |
| 61 | 61 | // device_state_interface overrides |
| 62 | void state_string_export(const device_state_entry &entry, astring &str | |
| 62 | void state_string_export(const device_state_entry &entry, astring &str); | |
| 63 | 63 | |
| 64 | 64 | // device_disasm_interface overrides |
| 65 | 65 | virtual UINT32 disasm_min_opcode_bytes() const { return 4; } |
| r245649 | r245650 | |
|---|---|---|
| 574 | 574 | } |
| 575 | 575 | |
| 576 | 576 | |
| 577 | void arm7_cpu_device::state_string_export(const device_state_entry &entry, astring &str | |
| 577 | void arm7_cpu_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 578 | 578 | { |
| 579 | 579 | switch (entry.index()) |
| 580 | 580 | { |
| 581 | 581 | case STATE_GENFLAGS: |
| 582 | str | |
| 582 | str.printf("%c%c%c%c%c%c%c%c %s", | |
| 583 | 583 | (ARM7REG(eCPSR) & N_MASK) ? 'N' : '-', |
| 584 | 584 | (ARM7REG(eCPSR) & Z_MASK) ? 'Z' : '-', |
| 585 | 585 | (ARM7REG(eCPSR) & C_MASK) ? 'C' : '-', |
| r245649 | r245650 | |
|---|---|---|
| 97 | 97 | |
| 98 | 98 | // device_state_interface overrides |
| 99 | 99 | virtual void state_export(const device_state_entry &entry); |
| 100 | void state_string_export(const device_state_entry &entry, astring &str | |
| 100 | void state_string_export(const device_state_entry &entry, astring &str); | |
| 101 | 101 | |
| 102 | 102 | // device_disasm_interface overrides |
| 103 | 103 | virtual UINT32 disasm_min_opcode_bytes() const { return 2; } |
| r245649 | r245650 | |
|---|---|---|
| 281 | 281 | // for the debugger |
| 282 | 282 | //------------------------------------------------- |
| 283 | 283 | |
| 284 | void asap_device::state_string_export(const device_state_entry &entry, astring &str | |
| 284 | void asap_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 285 | 285 | { |
| 286 | 286 | switch (entry.index()) |
| 287 | 287 | { |
| 288 | 288 | case STATE_GENFLAGS: |
| 289 | str | |
| 289 | str.printf("%c%c%c%c%c%c", | |
| 290 | 290 | m_pflag ? 'P' : '.', |
| 291 | 291 | m_iflag ? 'I' : '.', |
| 292 | 292 | ((INT32)m_znflag < 0) ? 'N' : '.', |
| r245649 | r245650 | |
|---|---|---|
| 48 | 48 | // device_state_interface overrides |
| 49 | 49 | virtual void state_import(const device_state_entry &entry); |
| 50 | 50 | virtual void state_export(const device_state_entry &entry); |
| 51 | virtual void state_string_export(const device_state_entry &entry, astring &str | |
| 51 | virtual void state_string_export(const device_state_entry &entry, astring &str); | |
| 52 | 52 | |
| 53 | 53 | // device_disasm_interface overrides |
| 54 | 54 | virtual UINT32 disasm_min_opcode_bytes() const; |
| r245649 | r245650 | |
|---|---|---|
| 902 | 902 | // for the debugger |
| 903 | 903 | //------------------------------------------------- |
| 904 | 904 | |
| 905 | void avr8_device::state_string_export(const device_state_entry &entry, astring &str | |
| 905 | void avr8_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 906 | 906 | { |
| 907 | 907 | switch (entry.index()) |
| 908 | 908 | { |
| 909 | 909 | case STATE_GENFLAGS: |
| 910 | str | |
| 910 | str.printf("%c%c%c%c%c%c%c%c", | |
| 911 | 911 | (m_r[AVR8_REGIDX_SREG] & 0x80) ? 'I' : '-', |
| 912 | 912 | (m_r[AVR8_REGIDX_SREG] & 0x40) ? 'T' : '-', |
| 913 | 913 | (m_r[AVR8_REGIDX_SREG] & 0x20) ? 'H' : '-', |
| r245649 | r245650 | |
|---|---|---|
| 132 | 132 | virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options); |
| 133 | 133 | |
| 134 | 134 | // device_state_interface overrides |
| 135 | virtual void state_string_export(const device_state_entry &entry, astring &str | |
| 135 | virtual void state_string_export(const device_state_entry &entry, astring &str); | |
| 136 | 136 | |
| 137 | 137 | // address spaces |
| 138 | 138 | const address_space_config m_program_config; |
| r245649 | r245650 | |
|---|---|---|
| 139 | 139 | } |
| 140 | 140 | |
| 141 | 141 | |
| 142 | void ccpu_cpu_device::state_string_export(const device_state_entry &entry, astring &str | |
| 142 | void ccpu_cpu_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 143 | 143 | { |
| 144 | 144 | switch (entry.index()) |
| 145 | 145 | { |
| 146 | 146 | case STATE_GENFLAGS: |
| 147 | str | |
| 147 | str.printf("%c%c%c%c%c%c", | |
| 148 | 148 | TEST_A0 ? '0' : 'o', |
| 149 | 149 | TEST_NC ? 'N' : 'n', |
| 150 | 150 | TEST_LT ? 'L' : 'l', |
| r245649 | r245650 | |
|---|---|---|
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | // device_state_interface overrides |
| 85 | void state_string_export(const device_state_entry &entry, astring &str | |
| 85 | void state_string_export(const device_state_entry &entry, astring &str); | |
| 86 | 86 | |
| 87 | 87 | // device_disasm_interface overrides |
| 88 | 88 | virtual UINT32 disasm_min_opcode_bytes() const { return 1; } |
| r245649 | r245650 | |
|---|---|---|
| 1239 | 1239 | } |
| 1240 | 1240 | } |
| 1241 | 1241 | |
| 1242 | void cop400_cpu_device::state_string_export(const device_state_entry &entry, astring &str | |
| 1242 | void cop400_cpu_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 1243 | 1243 | { |
| 1244 | 1244 | switch (entry.index()) |
| 1245 | 1245 | { |
| 1246 | 1246 | case STATE_GENFLAGS: |
| 1247 | str | |
| 1247 | str.printf("%c%c%c", | |
| 1248 | 1248 | m_c ? 'C' : '.', |
| 1249 | 1249 | m_skl ? 'S' : '.', |
| 1250 | 1250 | m_skt_latch ? 'T' : '.'); |
| r245649 | r245650 | |
|---|---|---|
| 139 | 139 | // device_state_interface overrides |
| 140 | 140 | virtual void state_import(const device_state_entry &entry); |
| 141 | 141 | virtual void state_export(const device_state_entry &entry); |
| 142 | void state_string_export(const device_state_entry &entry, astring &str | |
| 142 | void state_string_export(const device_state_entry &entry, astring &str); | |
| 143 | 143 | |
| 144 | 144 | // device_disasm_interface overrides |
| 145 | 145 | virtual UINT32 disasm_min_opcode_bytes() const { return 1; } |
| r245649 | r245650 | |
|---|---|---|
| 472 | 472 | // for the debugger |
| 473 | 473 | //------------------------------------------------- |
| 474 | 474 | |
| 475 | void cosmac_device::state_string_export(const device_state_entry &entry, astring &str | |
| 475 | void cosmac_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 476 | 476 | { |
| 477 | 477 | switch (entry.index()) |
| 478 | 478 | { |
| 479 | 479 | case STATE_GENFLAGS: |
| 480 | str | |
| 480 | str.printf("%c%c%c", | |
| 481 | 481 | m_df ? 'D' : '.', |
| 482 | 482 | m_ie ? 'I' : '.', |
| 483 | 483 | m_q ? 'Q' : '.'); |
| r245649 | r245650 | |
|---|---|---|
| 235 | 235 | // device_state_interface overrides |
| 236 | 236 | virtual void state_import(const device_state_entry &entry); |
| 237 | 237 | virtual void state_export(const device_state_entry &entry); |
| 238 | virtual void state_string_export(const device_state_entry &entry, astring &str | |
| 238 | virtual void state_string_export(const device_state_entry &entry, astring &str); | |
| 239 | 239 | |
| 240 | 240 | // device_disasm_interface overrides |
| 241 | 241 | virtual UINT32 disasm_min_opcode_bytes() const; |
| r245649 | r245650 | |
|---|---|---|
| 3427 | 3427 | } |
| 3428 | 3428 | |
| 3429 | 3429 | |
| 3430 | void cp1610_cpu_device::state_string_export(const device_state_entry &entry, astring &str | |
| 3430 | void cp1610_cpu_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 3431 | 3431 | { |
| 3432 | 3432 | switch (entry.index()) |
| 3433 | 3433 | { |
| 3434 | 3434 | case STATE_GENFLAGS: |
| 3435 | str | |
| 3435 | str.printf("%c%c%c%c", | |
| 3436 | 3436 | m_flags & 0x80 ? 'S':'.', |
| 3437 | 3437 | m_flags & 0x40 ? 'Z':'.', |
| 3438 | 3438 | m_flags & 0x20 ? 'V':'.', |
| r245649 | r245650 | |
|---|---|---|
| 64 | 64 | virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; } |
| 65 | 65 | |
| 66 | 66 | // device_state_interface overrides |
| 67 | void state_string_export(const device_state_entry &entry, astring &str | |
| 67 | void state_string_export(const device_state_entry &entry, astring &str); | |
| 68 | 68 | |
| 69 | 69 | // device_disasm_interface overrides |
| 70 | 70 | virtual UINT32 disasm_min_opcode_bytes() const { return 2; } |
| r245649 | r245650 | |
|---|---|---|
| 345 | 345 | } |
| 346 | 346 | |
| 347 | 347 | |
| 348 | void cquestrot_cpu_device::state_string_export(const device_state_entry &entry, astring &str | |
| 348 | void cquestrot_cpu_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 349 | 349 | { |
| 350 | 350 | switch (entry.index()) |
| 351 | 351 | { |
| 352 | 352 | case STATE_GENFLAGS: |
| 353 | str | |
| 353 | str.printf("%c%c%c", m_cflag ? 'C' : '.', | |
| 354 | 354 | m_vflag ? 'V' : '.', |
| 355 | 355 | m_f ? '.' : 'Z'); |
| 356 | 356 | break; |
| r245649 | r245650 | |
| 469 | 469 | } |
| 470 | 470 | |
| 471 | 471 | |
| 472 | void cquestlin_cpu_device::state_string_export(const device_state_entry &entry, astring &str | |
| 472 | void cquestlin_cpu_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 473 | 473 | { |
| 474 | 474 | switch (entry.index()) |
| 475 | 475 | { |
| 476 | 476 | case STATE_GENFLAGS: |
| 477 | str | |
| 477 | str.printf("%c%c%c|%cG", m_cflag ? 'C' : '.', | |
| 478 | 478 | m_vflag ? 'V' : '.', |
| 479 | 479 | m_f ? '.' : 'Z', |
| 480 | 480 | ( m_clkcnt & 3 ) ? 'B' : 'F'); |
| r245649 | r245650 | |
|---|---|---|
| 230 | 230 | virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; } |
| 231 | 231 | |
| 232 | 232 | // device_state_interface overrides |
| 233 | void state_string_export(const device_state_entry &entry, astring &str | |
| 233 | void state_string_export(const device_state_entry &entry, astring &str); | |
| 234 | 234 | |
| 235 | 235 | // device_disasm_interface overrides |
| 236 | 236 | virtual UINT32 disasm_min_opcode_bytes() const { return 8; } |
| r245649 | r245650 | |
| 314 | 314 | virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; } |
| 315 | 315 | |
| 316 | 316 | // device_state_interface overrides |
| 317 | void state_string_export(const device_state_entry &entry, astring &str | |
| 317 | void state_string_export(const device_state_entry &entry, astring &str); | |
| 318 | 318 | |
| 319 | 319 | // device_disasm_interface overrides |
| 320 | 320 | virtual UINT32 disasm_min_opcode_bytes() const { return 8; } |
| r245649 | r245650 | |
|---|---|---|
| 212 | 212 | // for the debugger |
| 213 | 213 | //------------------------------------------------- |
| 214 | 214 | |
| 215 | void dsp16_device::state_string_export(const device_state_entry &entry, astring &str | |
| 215 | void dsp16_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 216 | 216 | { |
| 217 | 217 | switch (entry.index()) |
| 218 | 218 | { |
| 219 | 219 | case STATE_GENFLAGS: |
| 220 | str | |
| 220 | str.printf("(below)"); | |
| 221 | 221 | break; |
| 222 | 222 | |
| 223 | 223 | case DSP16_AUC: |
| r245649 | r245650 | |
| 231 | 231 | case 0x02: alignString.printf("x4"); break; |
| 232 | 232 | case 0x03: alignString.printf(",,"); break; |
| 233 | 233 | } |
| 234 | str | |
| 234 | str.printf("%c%c%c%c%c%s", | |
| 235 | 235 | m_auc & 0x40 ? 'Y':'.', |
| 236 | 236 | m_auc & 0x20 ? '1':'.', |
| 237 | 237 | m_auc & 0x10 ? '0':'.', |
| r245649 | r245650 | |
| 242 | 242 | } |
| 243 | 243 | |
| 244 | 244 | case DSP16_PSW: |
| 245 | str | |
| 245 | str.printf("%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c", | |
| 246 | 246 | m_psw & 0x8000 ? 'M':'.', |
| 247 | 247 | m_psw & 0x4000 ? 'E':'.', |
| 248 | 248 | m_psw & 0x2000 ? 'L':'.', |
| r245649 | r245650 | |
| 272 | 272 | case 0x02: strobeString.printf("3T"); break; |
| 273 | 273 | case 0x03: strobeString.printf("4T"); break; |
| 274 | 274 | } |
| 275 | str | |
| 275 | str.printf("%c%s%c%c%c%c%c%c%c%c%c%c%c%c%c", | |
| 276 | 276 | m_pioc & 0x8000 ? 'I':'.', |
| 277 | 277 | strobeString.c_str(), |
| 278 | 278 | m_pioc & 0x1000 ? 'O':'I', |
| r245649 | r245650 | |
| 303 | 303 | case 0x02: clkString.printf("16"); break; |
| 304 | 304 | case 0x03: clkString.printf("20"); break; |
| 305 | 305 | } |
| 306 | str | |
| 306 | str.printf("%c%s%c%c%c%c%c%c%c", | |
| 307 | 307 | m_sioc & 0x0200 ? 'I':'O', |
| 308 | 308 | clkString.c_str(), |
| 309 | 309 | m_sioc & 0x0040 ? 'L':'M', |
| r245649 | r245650 | |
|---|---|---|
| 44 | 44 | virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const; |
| 45 | 45 | |
| 46 | 46 | // device_state_interface overrides |
| 47 | virtual void state_string_export(const device_state_entry &entry, astring &str | |
| 47 | virtual void state_string_export(const device_state_entry &entry, astring &str); | |
| 48 | 48 | |
| 49 | 49 | // device_disasm_interface overrides |
| 50 | 50 | virtual UINT32 disasm_min_opcode_bytes() const; |
| r245649 | r245650 | |
|---|---|---|
| 369 | 369 | // for the debugger |
| 370 | 370 | //------------------------------------------------- |
| 371 | 371 | |
| 372 | void dsp32c_device::state_string_export(const device_state_entry &entry, astring &str | |
| 372 | void dsp32c_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 373 | 373 | { |
| 374 | 374 | switch (entry.index()) |
| 375 | 375 | { |
| 376 | 376 | case STATE_GENFLAGS: |
| 377 | str | |
| 377 | str.printf("%c%c%c%c%c%c%c%c", | |
| 378 | 378 | NFLAG ? 'N':'.', |
| 379 | 379 | ZFLAG ? 'Z':'.', |
| 380 | 380 | UFLAG ? 'U':'.', |
| r245649 | r245650 | |
| 389 | 389 | case DSP32_A1: |
| 390 | 390 | case DSP32_A2: |
| 391 | 391 | case DSP32_A3: |
| 392 | str | |
| 392 | str.printf("%8g", *(double *)entry.dataptr()); | |
| 393 | 393 | break; |
| 394 | 394 | } |
| 395 | 395 | } |
| r245649 | r245650 | |
|---|---|---|
| 123 | 123 | // device_state_interface overrides |
| 124 | 124 | virtual void state_import(const device_state_entry &entry); |
| 125 | 125 | virtual void state_export(const device_state_entry &entry); |
| 126 | virtual void state_string_export(const device_state_entry &entry, astring &str | |
| 126 | virtual void state_string_export(const device_state_entry &entry, astring &str); | |
| 127 | 127 | |
| 128 | 128 | // device_disasm_interface overrides |
| 129 | 129 | virtual UINT32 disasm_min_opcode_bytes() const; |
| r245649 | r245650 | |
|---|---|---|
| 357 | 357 | } |
| 358 | 358 | |
| 359 | 359 | |
| 360 | void dsp56k_device::state_string_export(const device_state_entry &entry, astring &str | |
| 360 | void dsp56k_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 361 | 361 | { |
| 362 | 362 | dsp56k_core *cpustate = &m_dsp56k_core; |
| 363 | 363 | |
| 364 | 364 | switch (entry.index()) |
| 365 | 365 | { |
| 366 | 366 | case STATE_GENFLAGS: |
| 367 | str | |
| 367 | str.printf("%s%s %s%s%s%s%s%s%s%s %s%s", | |
| 368 | 368 | /* Status Register */ |
| 369 | 369 | LF_bit(cpustate) ? "L" : ".", |
| 370 | 370 | FV_bit(cpustate) ? "F" : ".", |
| r245649 | r245650 | |
| 384 | 384 | break; |
| 385 | 385 | |
| 386 | 386 | case DSP56K_X: |
| 387 | str | |
| 387 | str.printf("%04x %04x", X1, X0); | |
| 388 | 388 | break; |
| 389 | 389 | |
| 390 | 390 | case DSP56K_Y: |
| 391 | str | |
| 391 | str.printf("%04x %04x", Y1, Y0); | |
| 392 | 392 | break; |
| 393 | 393 | |
| 394 | 394 | case DSP56K_A: |
| 395 | str | |
| 395 | str.printf("%02x %04x %04x", A2, A1, A0); | |
| 396 | 396 | break; |
| 397 | 397 | |
| 398 | 398 | case DSP56K_B: |
| 399 | str | |
| 399 | str.printf("%02x %04x %04x", B2, B1, B0); | |
| 400 | 400 | break; |
| 401 | 401 | } |
| 402 | 402 | } |
| r245649 | r245650 | |
|---|---|---|
| 232 | 232 | virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ((spacenum == AS_DATA) ? &m_data_config : NULL ); } |
| 233 | 233 | |
| 234 | 234 | // device_state_interface overrides |
| 235 | void state_string_export(const device_state_entry &entry, astring &str | |
| 235 | void state_string_export(const device_state_entry &entry, astring &str); | |
| 236 | 236 | |
| 237 | 237 | // device_disasm_interface overrides |
| 238 | 238 | virtual UINT32 disasm_min_opcode_bytes() const { return 2; } |
| r245649 | r245650 | |
|---|---|---|
| 1847 | 1847 | // for the debugger |
| 1848 | 1848 | //------------------------------------------------- |
| 1849 | 1849 | |
| 1850 | void hyperstone_device::state_string_export(const device_state_entry &entry, astring &str | |
| 1850 | void hyperstone_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 1851 | 1851 | { |
| 1852 | 1852 | switch (entry.index()) |
| 1853 | 1853 | { |
| 1854 | 1854 | case STATE_GENFLAGS: |
| 1855 | str | |
| 1855 | str.printf("%c%c%c%c%c%c%c%c%c%c%c%c FTE:%X FRM:%X ILC:%d FL:%d FP:%d", | |
| 1856 | 1856 | GET_S ? 'S':'.', |
| 1857 | 1857 | GET_P ? 'P':'.', |
| 1858 | 1858 | GET_T ? 'T':'.', |
| r245649 | r245650 | |
|---|---|---|
| 241 | 241 | virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options); |
| 242 | 242 | |
| 243 | 243 | // device_state_interface overrides |
| 244 | virtual void state_string_export(const device_state_entry &entry, astring &str | |
| 244 | virtual void state_string_export(const device_state_entry &entry, astring &str); | |
| 245 | 245 | |
| 246 | 246 | // address spaces |
| 247 | 247 | const address_space_config m_program_config; |
| r245649 | r245650 | |
|---|---|---|
| 349 | 349 | // for the debugger |
| 350 | 350 | //------------------------------------------------- |
| 351 | 351 | |
| 352 | void esrip_device::state_string_export(const device_state_entry &entry, astring &str | |
| 352 | void esrip_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 353 | 353 | { |
| 354 | 354 | switch (entry.index()) |
| 355 | 355 | { |
| 356 | 356 | case STATE_GENFLAGS: |
| 357 | str | |
| 357 | str.printf("%c%c%c%c%c%c%c%c%c", | |
| 358 | 358 | (m_status & 0x80) ? '3' : '.', |
| 359 | 359 | (m_status & 0x40) ? '2' : '.', |
| 360 | 360 | (m_status & 0x20) ? '1' : '.', |
| r245649 | r245650 | |
|---|---|---|
| 150 | 150 | virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options); |
| 151 | 151 | |
| 152 | 152 | // device_state_interface overrides |
| 153 | virtual void state_string_export(const device_state_entry &entry, astring &str | |
| 153 | virtual void state_string_export(const device_state_entry &entry, astring &str); | |
| 154 | 154 | |
| 155 | 155 | // address spaces |
| 156 | 156 | const address_space_config m_program_config; |
| r245649 | r245650 | |
|---|---|---|
| 2057 | 2057 | } |
| 2058 | 2058 | |
| 2059 | 2059 | |
| 2060 | void f8_cpu_device::state_string_export(const device_state_entry &entry, astring &str | |
| 2060 | void f8_cpu_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 2061 | 2061 | { |
| 2062 | 2062 | switch (entry.index()) |
| 2063 | 2063 | { |
| 2064 | 2064 | case STATE_GENFLAGS: |
| 2065 | str | |
| 2065 | str.printf("%c%c%c%c%c", | |
| 2066 | 2066 | m_w & 0x10 ? 'I':'.', |
| 2067 | 2067 | m_w & 0x08 ? 'O':'.', |
| 2068 | 2068 | m_w & 0x04 ? 'Z':'.', |
| r245649 | r245650 | |
|---|---|---|
| 63 | 63 | virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : NULL ); } |
| 64 | 64 | |
| 65 | 65 | // device_state_interface overrides |
| 66 | void state_string_export(const device_state_entry &entry, astring &str | |
| 66 | void state_string_export(const device_state_entry &entry, astring &str); | |
| 67 | 67 | |
| 68 | 68 | // device_disasm_interface overrides |
| 69 | 69 | virtual UINT32 disasm_min_opcode_bytes() const { return 1; } |
| r245649 | r245650 | |
|---|---|---|
| 955 | 955 | } |
| 956 | 956 | } |
| 957 | 957 | |
| 958 | void g65816_device::state_string_export(const device_state_entry &entry, astring &str | |
| 958 | void g65816_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 959 | 959 | { |
| 960 | 960 | switch (entry.index()) |
| 961 | 961 | { |
| 962 | 962 | case STATE_GENFLAGS: |
| 963 | str | |
| 963 | str.printf("%c%c%c%c%c%c%c%c", | |
| 964 | 964 | m_flag_n & NFLAG_SET ? 'N':'.', |
| 965 | 965 | m_flag_v & VFLAG_SET ? 'V':'.', |
| 966 | 966 | m_flag_m & MFLAG_SET ? 'M':'.', |
| r245649 | r245650 | |
|---|---|---|
| 85 | 85 | // device_state_interface overrides |
| 86 | 86 | virtual void state_import(const device_state_entry &entry); |
| 87 | 87 | virtual void state_export(const device_state_entry &entry); |
| 88 | virtual void state_string_export(const device_state_entry &entry, astring &str | |
| 88 | virtual void state_string_export(const device_state_entry &entry, astring &str); | |
| 89 | 89 | |
| 90 | 90 | // device_disasm_interface overrides |
| 91 | 91 | virtual UINT32 disasm_min_opcode_bytes() const { return 1; } |
| r245649 | r245650 | |
|---|---|---|
| 2189 | 2189 | // for the debugger |
| 2190 | 2190 | //------------------------------------------------- |
| 2191 | 2191 | |
| 2192 | void h6280_device::state_string_export(const device_state_entry &entry, astring &str | |
| 2192 | void h6280_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 2193 | 2193 | { |
| 2194 | 2194 | switch (entry.index()) |
| 2195 | 2195 | { |
| 2196 | 2196 | case STATE_GENFLAGS: |
| 2197 | str | |
| 2197 | str.printf("%c%c%c%c%c%c%c%c", | |
| 2198 | 2198 | (m_p & 0x80) ? 'N':'.', |
| 2199 | 2199 | (m_p & 0x40) ? 'V':'.', |
| 2200 | 2200 | (m_p & 0x20) ? 'R':'.', |
| r245649 | r245650 | |
|---|---|---|
| 96 | 96 | virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options); |
| 97 | 97 | |
| 98 | 98 | // device_state_interface overrides |
| 99 | virtual void state_string_export(const device_state_entry &entry, astring &str | |
| 99 | virtual void state_string_export(const device_state_entry &entry, astring &str); | |
| 100 | 100 | |
| 101 | 101 | // opcode accessors |
| 102 | 102 | UINT8 program_read8(offs_t addr); |
| r245649 | r245650 | |
|---|---|---|
| 243 | 243 | { |
| 244 | 244 | } |
| 245 | 245 | |
| 246 | void h8_device::state_string_export(const device_state_entry &entry, astring &str | |
| 246 | void h8_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 247 | 247 | { |
| 248 | 248 | switch(entry.index()) { |
| 249 | 249 | case STATE_GENFLAGS: |
| 250 | 250 | if(has_exr) |
| 251 | str | |
| 251 | str.printf("%c%c %c%c%c%c%c%c%c%c", | |
| 252 | 252 | (EXR & EXR_T) ? 'T' : '-', |
| 253 | 253 | '0' + (EXR & EXR_I), |
| 254 | 254 | (CCR & F_I) ? 'I' : '-', |
| r245649 | r245650 | |
| 260 | 260 | (CCR & F_V) ? 'V' : '-', |
| 261 | 261 | (CCR & F_C) ? 'C' : '-'); |
| 262 | 262 | else |
| 263 | str | |
| 263 | str.printf("%c%c%c%c%c%c%c%c", | |
| 264 | 264 | (CCR & F_I) ? 'I' : '-', |
| 265 | 265 | (CCR & F_UI) ? 'u' : '-', |
| 266 | 266 | (CCR & F_H) ? 'H' : '-', |
| r245649 | r245650 | |
| 279 | 279 | case H8_R6: |
| 280 | 280 | case H8_R7: { |
| 281 | 281 | int r = entry.index() - H8_R0; |
| 282 | str | |
| 282 | str.printf("%04x %04x", R[r + 8], R[r]); | |
| 283 | 283 | break; |
| 284 | 284 | } |
| 285 | 285 | } |
| r245649 | r245650 | |
|---|---|---|
| 185 | 185 | // device_state_interface overrides |
| 186 | 186 | virtual void state_import(const device_state_entry &entry); |
| 187 | 187 | virtual void state_export(const device_state_entry &entry); |
| 188 | virtual void state_string_export(const device_state_entry &entry, astring &str | |
| 188 | virtual void state_string_export(const device_state_entry &entry, astring &str); | |
| 189 | 189 | |
| 190 | 190 | // device_disasm_interface overrides |
| 191 | 191 | virtual UINT32 disasm_min_opcode_bytes() const; |
| r245649 | r245650 | |
|---|---|---|
| 361 | 361 | } |
| 362 | 362 | |
| 363 | 363 | |
| 364 | void hcd62121_cpu_device::state_string_export(const device_state_entry &entry, astring &str | |
| 364 | void hcd62121_cpu_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 365 | 365 | { |
| 366 | 366 | switch (entry.index()) |
| 367 | 367 | { |
| 368 | 368 | case STATE_GENPC: |
| 369 | str | |
| 369 | str.printf("%06X", (m_cseg << 16) | m_ip); | |
| 370 | 370 | break; |
| 371 | 371 | |
| 372 | 372 | case STATE_GENFLAGS: |
| 373 | str | |
| 373 | str.printf("%s-%s-%s-%c-%c", | |
| 374 | 374 | m_f & _FLAG_ZH ? "ZH":"__", |
| 375 | 375 | m_f & _FLAG_CL ? "CL":"__", |
| 376 | 376 | m_f & _FLAG_ZL ? "ZL":"__", |
| r245649 | r245650 | |
| 381 | 381 | break; |
| 382 | 382 | |
| 383 | 383 | case HCD62121_R00: |
| 384 | str | |
| 384 | str.printf("%02X%02X%02X%02X", m_reg[0x00], m_reg[0x01], m_reg[0x02], m_reg[0x03]); | |
| 385 | 385 | break; |
| 386 | 386 | case HCD62121_R04: |
| 387 | str | |
| 387 | str.printf("%02X%02X%02X%02X", m_reg[0x04], m_reg[0x05], m_reg[0x06], m_reg[0x07]); | |
| 388 | 388 | break; |
| 389 | 389 | case HCD62121_R08: |
| 390 | str | |
| 390 | str.printf("%02X%02X%02X%02X", m_reg[0x08], m_reg[0x09], m_reg[0x0A], m_reg[0x0B]); | |
| 391 | 391 | break; |
| 392 | 392 | case HCD62121_R0C: |
| 393 | str | |
| 393 | str.printf("%02X%02X%02X%02X", m_reg[0x0C], m_reg[0x0D], m_reg[0x0E], m_reg[0x0F]); | |
| 394 | 394 | break; |
| 395 | 395 | case HCD62121_R10: |
| 396 | str | |
| 396 | str.printf("%02X%02X%02X%02X", m_reg[0x10], m_reg[0x11], m_reg[0x12], m_reg[0x13]); | |
| 397 | 397 | break; |
| 398 | 398 | case HCD62121_R14: |
| 399 | str | |
| 399 | str.printf("%02X%02X%02X%02X", m_reg[0x14], m_reg[0x15], m_reg[0x16], m_reg[0x17]); | |
| 400 | 400 | break; |
| 401 | 401 | case HCD62121_R18: |
| 402 | str | |
| 402 | str.printf("%02X%02X%02X%02X", m_reg[0x18], m_reg[0x19], m_reg[0x1A], m_reg[0x1B]); | |
| 403 | 403 | break; |
| 404 | 404 | case HCD62121_R1C: |
| 405 | str | |
| 405 | str.printf("%02X%02X%02X%02X", m_reg[0x1C], m_reg[0x1D], m_reg[0x1E], m_reg[0x1F]); | |
| 406 | 406 | break; |
| 407 | 407 | case HCD62121_R20: |
| 408 | str | |
| 408 | str.printf("%02X%02X%02X%02X", m_reg[0x20], m_reg[0x21], m_reg[0x22], m_reg[0x23]); | |
| 409 | 409 | break; |
| 410 | 410 | case HCD62121_R24: |
| 411 | str | |
| 411 | str.printf("%02X%02X%02X%02X", m_reg[0x24], m_reg[0x25], m_reg[0x26], m_reg[0x27]); | |
| 412 | 412 | break; |
| 413 | 413 | case HCD62121_R28: |
| 414 | str | |
| 414 | str.printf("%02X%02X%02X%02X", m_reg[0x28], m_reg[0x29], m_reg[0x2A], m_reg[0x2B]); | |
| 415 | 415 | break; |
| 416 | 416 | case HCD62121_R2C: |
| 417 | str | |
| 417 | str.printf("%02X%02X%02X%02X", m_reg[0x2C], m_reg[0x2D], m_reg[0x2E], m_reg[0x2F]); | |
| 418 | 418 | break; |
| 419 | 419 | case HCD62121_R30: |
| 420 | str | |
| 420 | str.printf("%02X%02X%02X%02X", m_reg[0x30], m_reg[0x31], m_reg[0x32], m_reg[0x33]); | |
| 421 | 421 | break; |
| 422 | 422 | case HCD62121_R34: |
| 423 | str | |
| 423 | str.printf("%02X%02X%02X%02X", m_reg[0x34], m_reg[0x35], m_reg[0x36], m_reg[0x37]); | |
| 424 | 424 | break; |
| 425 | 425 | case HCD62121_R38: |
| 426 | str | |
| 426 | str.printf("%02X%02X%02X%02X", m_reg[0x38], m_reg[0x39], m_reg[0x3A], m_reg[0x3B]); | |
| 427 | 427 | break; |
| 428 | 428 | case HCD62121_R3C: |
| 429 | str | |
| 429 | str.printf("%02X%02X%02X%02X", m_reg[0x3C], m_reg[0x3D], m_reg[0x3E], m_reg[0x3F]); | |
| 430 | 430 | break; |
| 431 | 431 | case HCD62121_R40: |
| 432 | str | |
| 432 | str.printf("%02X%02X%02X%02X", m_reg[0x40], m_reg[0x41], m_reg[0x42], m_reg[0x43]); | |
| 433 | 433 | break; |
| 434 | 434 | case HCD62121_R44: |
| 435 | str | |
| 435 | str.printf("%02X%02X%02X%02X", m_reg[0x44], m_reg[0x45], m_reg[0x46], m_reg[0x47]); | |
| 436 | 436 | break; |
| 437 | 437 | case HCD62121_R48: |
| 438 | str | |
| 438 | str.printf("%02X%02X%02X%02X", m_reg[0x48], m_reg[0x49], m_reg[0x4A], m_reg[0x4B]); | |
| 439 | 439 | break; |
| 440 | 440 | case HCD62121_R4C: |
| 441 | str | |
| 441 | str.printf("%02X%02X%02X%02X", m_reg[0x4C], m_reg[0x4D], m_reg[0x4E], m_reg[0x4F]); | |
| 442 | 442 | break; |
| 443 | 443 | case HCD62121_R50: |
| 444 | str | |
| 444 | str.printf("%02X%02X%02X%02X", m_reg[0x50], m_reg[0x51], m_reg[0x52], m_reg[0x53]); | |
| 445 | 445 | break; |
| 446 | 446 | case HCD62121_R54: |
| 447 | str | |
| 447 | str.printf("%02X%02X%02X%02X", m_reg[0x54], m_reg[0x55], m_reg[0x56], m_reg[0x57]); | |
| 448 | 448 | break; |
| 449 | 449 | case HCD62121_R58: |
| 450 | str | |
| 450 | str.printf("%02X%02X%02X%02X", m_reg[0x58], m_reg[0x59], m_reg[0x5A], m_reg[0x5B]); | |
| 451 | 451 | break; |
| 452 | 452 | case HCD62121_R5C: |
| 453 | str | |
| 453 | str.printf("%02X%02X%02X%02X", m_reg[0x5C], m_reg[0x5D], m_reg[0x5E], m_reg[0x5F]); | |
| 454 | 454 | break; |
| 455 | 455 | case HCD62121_R60: |
| 456 | str | |
| 456 | str.printf("%02X%02X%02X%02X", m_reg[0x60], m_reg[0x61], m_reg[0x62], m_reg[0x63]); | |
| 457 | 457 | break; |
| 458 | 458 | case HCD62121_R64: |
| 459 | str | |
| 459 | str.printf("%02X%02X%02X%02X", m_reg[0x64], m_reg[0x65], m_reg[0x66], m_reg[0x67]); | |
| 460 | 460 | break; |
| 461 | 461 | case HCD62121_R68: |
| 462 | str | |
| 462 | str.printf("%02X%02X%02X%02X", m_reg[0x68], m_reg[0x69], m_reg[0x6A], m_reg[0x6B]); | |
| 463 | 463 | break; |
| 464 | 464 | case HCD62121_R6C: |
| 465 | str | |
| 465 | str.printf("%02X%02X%02X%02X", m_reg[0x6C], m_reg[0x6D], m_reg[0x6E], m_reg[0x6F]); | |
| 466 | 466 | break; |
| 467 | 467 | case HCD62121_R70: |
| 468 | str | |
| 468 | str.printf("%02X%02X%02X%02X", m_reg[0x70], m_reg[0x71], m_reg[0x72], m_reg[0x73]); | |
| 469 | 469 | break; |
| 470 | 470 | case HCD62121_R74: |
| 471 | str | |
| 471 | str.printf("%02X%02X%02X%02X", m_reg[0x74], m_reg[0x75], m_reg[0x76], m_reg[0x77]); | |
| 472 | 472 | break; |
| 473 | 473 | case HCD62121_R78: |
| 474 | str | |
| 474 | str.printf("%02X%02X%02X%02X", m_reg[0x78], m_reg[0x79], m_reg[0x7A], m_reg[0x7B]); | |
| 475 | 475 | break; |
| 476 | 476 | case HCD62121_R7C: |
| 477 | str | |
| 477 | str.printf("%02X%02X%02X%02X", m_reg[0x7C], m_reg[0x7D], m_reg[0x7E], m_reg[0x7F]); | |
| 478 | 478 | break; |
| 479 | 479 | } |
| 480 | 480 | } |
| r245649 | r245650 | |
|---|---|---|
| 52 | 52 | virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : NULL ); } |
| 53 | 53 | |
| 54 | 54 | // device_state_interface overrides |
| 55 | void state_string_export(const device_state_entry &entry, astring &str | |
| 55 | void state_string_export(const device_state_entry &entry, astring &str); | |
| 56 | 56 | |
| 57 | 57 | // device_disasm_interface overrides |
| 58 | 58 | virtual UINT32 disasm_min_opcode_bytes() const { return 1; } |
| r245649 | r245650 | |
|---|---|---|
| 271 | 271 | // for the debugger |
| 272 | 272 | //------------------------------------------------- |
| 273 | 273 | |
| 274 | void hd61700_cpu_device::state_string_export(const device_state_entry &entry, astring &str | |
| 274 | void hd61700_cpu_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 275 | 275 | { |
| 276 | 276 | switch (entry.index()) |
| 277 | 277 | { |
| 278 | 278 | case STATE_GENFLAGS: |
| 279 | str | |
| 279 | str.printf("%c%c%c%c%c%c", | |
| 280 | 280 | m_flags & FLAG_Z ? '.' : 'Z', |
| 281 | 281 | m_flags & FLAG_C ? 'C' : '.', |
| 282 | 282 | m_flags & FLAG_LZ ? '.' : 'L', |
| r245649 | r245650 | |
|---|---|---|
| 92 | 92 | |
| 93 | 93 | // device_state_interface overrides |
| 94 | 94 | virtual void state_import(const device_state_entry &entry); |
| 95 | void state_string_export(const device_state_entry &entry, astring &str | |
| 95 | void state_string_export(const device_state_entry &entry, astring &str); | |
| 96 | 96 | |
| 97 | 97 | // device_memory_interface overrides |
| 98 | 98 | virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; } |
| r245649 | r245650 | |
|---|---|---|
| 144 | 144 | |
| 145 | 145 | |
| 146 | 146 | // disasm |
| 147 | void hmcs40_cpu_device::state_string_export(const device_state_entry &entry, astring &str | |
| 147 | void hmcs40_cpu_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 148 | 148 | { |
| 149 | 149 | switch (entry.index()) |
| 150 | 150 | { |
| 151 | 151 | case STATE_GENFLAGS: |
| 152 | str | |
| 152 | str.printf("%c%c", | |
| 153 | 153 | m_c ? 'C':'c', |
| 154 | 154 | m_s ? 'S':'s' |
| 155 | 155 | ); |
| r245649 | r245650 | |
|---|---|---|
| 159 | 159 | virtual UINT32 disasm_min_opcode_bytes() const { return 2; } |
| 160 | 160 | virtual UINT32 disasm_max_opcode_bytes() const { return 2; } |
| 161 | 161 | virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options); |
| 162 | void state_string_export(const device_state_entry &entry, astring &str | |
| 162 | void state_string_export(const device_state_entry &entry, astring &str); | |
| 163 | 163 | |
| 164 | 164 | address_space_config m_program_config; |
| 165 | 165 | address_space_config m_data_config; |
| r245649 | r245650 | |
|---|---|---|
| 3468 | 3468 | } |
| 3469 | 3469 | } |
| 3470 | 3470 | |
| 3471 | void i386_device::state_string_export(const device_state_entry &entry, astring &str | |
| 3471 | void i386_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 3472 | 3472 | { |
| 3473 | 3473 | switch (entry.index()) |
| 3474 | 3474 | { |
| 3475 | 3475 | case STATE_GENFLAGS: |
| 3476 | str | |
| 3476 | str.printf("%08X", get_flags()); | |
| 3477 | 3477 | break; |
| 3478 | 3478 | case X87_ST0: |
| 3479 | str | |
| 3479 | str.printf("%f", fx80_to_double(ST(0))); | |
| 3480 | 3480 | break; |
| 3481 | 3481 | case X87_ST1: |
| 3482 | str | |
| 3482 | str.printf("%f", fx80_to_double(ST(1))); | |
| 3483 | 3483 | break; |
| 3484 | 3484 | case X87_ST2: |
| 3485 | str | |
| 3485 | str.printf("%f", fx80_to_double(ST(2))); | |
| 3486 | 3486 | break; |
| 3487 | 3487 | case X87_ST3: |
| 3488 | str | |
| 3488 | str.printf("%f", fx80_to_double(ST(3))); | |
| 3489 | 3489 | break; |
| 3490 | 3490 | case X87_ST4: |
| 3491 | str | |
| 3491 | str.printf("%f", fx80_to_double(ST(4))); | |
| 3492 | 3492 | break; |
| 3493 | 3493 | case X87_ST5: |
| 3494 | str | |
| 3494 | str.printf("%f", fx80_to_double(ST(5))); | |
| 3495 | 3495 | break; |
| 3496 | 3496 | case X87_ST6: |
| 3497 | str | |
| 3497 | str.printf("%f", fx80_to_double(ST(6))); | |
| 3498 | 3498 | break; |
| 3499 | 3499 | case X87_ST7: |
| 3500 | str | |
| 3500 | str.printf("%f", fx80_to_double(ST(7))); | |
| 3501 | 3501 | break; |
| 3502 | 3502 | case SSE_XMM0: |
| 3503 | str | |
| 3503 | str.printf("%08x%08x%08x%08x", XMM(0).d[3], XMM(0).d[2], XMM(0).d[1], XMM(0).d[0]); | |
| 3504 | 3504 | break; |
| 3505 | 3505 | case SSE_XMM1: |
| 3506 | str | |
| 3506 | str.printf("%08x%08x%08x%08x", XMM(1).d[3], XMM(1).d[2], XMM(1).d[1], XMM(1).d[0]); | |
| 3507 | 3507 | break; |
| 3508 | 3508 | case SSE_XMM2: |
| 3509 | str | |
| 3509 | str.printf("%08x%08x%08x%08x", XMM(2).d[3], XMM(2).d[2], XMM(2).d[1], XMM(2).d[0]); | |
| 3510 | 3510 | break; |
| 3511 | 3511 | case SSE_XMM3: |
| 3512 | str | |
| 3512 | str.printf("%08x%08x%08x%08x", XMM(3).d[3], XMM(3).d[2], XMM(3).d[1], XMM(3).d[0]); | |
| 3513 | 3513 | break; |
| 3514 | 3514 | case SSE_XMM4: |
| 3515 | str | |
| 3515 | str.printf("%08x%08x%08x%08x", XMM(4).d[3], XMM(4).d[2], XMM(4).d[1], XMM(4).d[0]); | |
| 3516 | 3516 | break; |
| 3517 | 3517 | case SSE_XMM5: |
| 3518 | str | |
| 3518 | str.printf("%08x%08x%08x%08x", XMM(5).d[3], XMM(5).d[2], XMM(5).d[1], XMM(5).d[0]); | |
| 3519 | 3519 | break; |
| 3520 | 3520 | case SSE_XMM6: |
| 3521 | str | |
| 3521 | str.printf("%08x%08x%08x%08x", XMM(6).d[3], XMM(6).d[2], XMM(6).d[1], XMM(6).d[0]); | |
| 3522 | 3522 | break; |
| 3523 | 3523 | case SSE_XMM7: |
| 3524 | str | |
| 3524 | str.printf("%08x%08x%08x%08x", XMM(7).d[3], XMM(7).d[2], XMM(7).d[1], XMM(7).d[0]); | |
| 3525 | 3525 | break; |
| 3526 | 3526 | } |
| 3527 | 3527 | } |
| r245649 | r245650 | |
|---|---|---|
| 58 | 58 | // device_state_interface overrides |
| 59 | 59 | virtual void state_import(const device_state_entry &entry); |
| 60 | 60 | virtual void state_export(const device_state_entry &entry); |
| 61 | virtual void state_string_export(const device_state_entry &entry, astring &str | |
| 61 | virtual void state_string_export(const device_state_entry &entry, astring &str); | |
| 62 | 62 | |
| 63 | 63 | // device_disasm_interface overrides |
| 64 | 64 | virtual UINT32 disasm_min_opcode_bytes() const { return 1; } |
| r245649 | r245650 | |
|---|---|---|
| 507 | 507 | } |
| 508 | 508 | } |
| 509 | 509 | |
| 510 | void i4004_cpu_device::state_string_export(const device_state_entry &entry, astring &str | |
| 510 | void i4004_cpu_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 511 | 511 | { |
| 512 | 512 | switch (entry.index()) |
| 513 | 513 | { |
| 514 | 514 | case STATE_GENFLAGS: |
| 515 | str | |
| 515 | str.printf(".%c%c%c", | |
| 516 | 516 | (m_A==0) ? 'Z':'.', |
| 517 | 517 | m_C ? 'C':'.', |
| 518 | 518 | m_TEST ? 'T':'.'); |
| r245649 | r245650 | |
|---|---|---|
| 57 | 57 | // device_state_interface overrides |
| 58 | 58 | virtual void state_import(const device_state_entry &entry); |
| 59 | 59 | virtual void state_export(const device_state_entry &entry); |
| 60 | virtual void state_string_export(const device_state_entry &entry, astring &str | |
| 60 | virtual void state_string_export(const device_state_entry &entry, astring &str); | |
| 61 | 61 | |
| 62 | 62 | // device_disasm_interface overrides |
| 63 | 63 | virtual UINT32 disasm_min_opcode_bytes() const { return 1; } |
| r245649 | r245650 | |
|---|---|---|
| 187 | 187 | // for the debugger |
| 188 | 188 | //------------------------------------------------- |
| 189 | 189 | |
| 190 | void i8008_device::state_string_export(const device_state_entry &entry, astring &str | |
| 190 | void i8008_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 191 | 191 | { |
| 192 | 192 | switch (entry.index()) |
| 193 | 193 | { |
| 194 | 194 | case STATE_GENFLAGS: |
| 195 | str | |
| 195 | str.printf("%c%c%c%c", | |
| 196 | 196 | m_CF ? 'C':'.', |
| 197 | 197 | m_ZF ? 'Z':'.', |
| 198 | 198 | m_SF ? 'S':'.', |
| r245649 | r245650 | |
|---|---|---|
| 48 | 48 | // device_state_interface overrides |
| 49 | 49 | virtual void state_import(const device_state_entry &entry); |
| 50 | 50 | virtual void state_export(const device_state_entry &entry); |
| 51 | virtual void state_string_export(const device_state_entry &entry, astring &str | |
| 51 | virtual void state_string_export(const device_state_entry &entry, astring &str); | |
| 52 | 52 | |
| 53 | 53 | |
| 54 | 54 | // device_disasm_interface overrides |
| r245649 | r245650 | |
|---|---|---|
| 1081 | 1081 | } |
| 1082 | 1082 | } |
| 1083 | 1083 | |
| 1084 | void i8085a_cpu_device::state_string_export(const device_state_entry &entry, astring &str | |
| 1084 | void i8085a_cpu_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 1085 | 1085 | { |
| 1086 | 1086 | switch (entry.index()) |
| 1087 | 1087 | { |
| 1088 | 1088 | case STATE_GENFLAGS: |
| 1089 | str | |
| 1089 | str.printf("%c%c%c%c%c%c%c%c", | |
| 1090 | 1090 | m_AF.b.l & 0x80 ? 'S':'.', |
| 1091 | 1091 | m_AF.b.l & 0x40 ? 'Z':'.', |
| 1092 | 1092 | m_AF.b.l & 0x20 ? 'X':'.', // X5 |
| r245649 | r245650 | |
|---|---|---|
| 82 | 82 | virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : NULL ); } |
| 83 | 83 | |
| 84 | 84 | // device_state_interface overrides |
| 85 | void state_string_export(const device_state_entry &entry, astring &str | |
| 85 | void state_string_export(const device_state_entry &entry, astring &str); | |
| 86 | 86 | void state_export(const device_state_entry &entry); |
| 87 | 87 | void state_import(const device_state_entry &entry); |
| 88 | 88 |
| r245649 | r245650 | |
|---|---|---|
| 159 | 159 | // for the debugger |
| 160 | 160 | //------------------------------------------------- |
| 161 | 161 | |
| 162 | void i8089_device::state_string_export(const device_state_entry &entry, astring &str | |
| 162 | void i8089_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 163 | 163 | { |
| 164 | 164 | i8089_channel *ch = m_ch1; |
| 165 | 165 | |
| r245649 | r245650 | |
| 169 | 169 | switch (entry.index()) |
| 170 | 170 | { |
| 171 | 171 | case SYSBUS: |
| 172 | str | |
| 172 | str.printf("%c", sysbus_width() ? 'W' : '.'); | |
| 173 | 173 | break; |
| 174 | 174 | case SOC: |
| 175 | str | |
| 175 | str.printf("%c%c", remotebus_width() ? 'I' : '.', request_grant() ? 'R' : '.'); | |
| 176 | 176 | break; |
| 177 | 177 | case CH1_GA: |
| 178 | 178 | case CH2_GA: |
| 179 | str | |
| 179 | str.printf("%d %05X", ch->m_r[i8089_channel::GA].t & 1, ch->m_r[i8089_channel::GA].w); | |
| 180 | 180 | break; |
| 181 | 181 | case CH1_GB: |
| 182 | 182 | case CH2_GB: |
| 183 | str | |
| 183 | str.printf("%d %05X", ch->m_r[i8089_channel::GB].t & 1, ch->m_r[i8089_channel::GB].w); | |
| 184 | 184 | break; |
| 185 | 185 | case CH1_GC: |
| 186 | 186 | case CH2_GC: |
| 187 | str | |
| 187 | str.printf("%d %05X", ch->m_r[i8089_channel::GC].t & 1, ch->m_r[i8089_channel::GC].w); | |
| 188 | 188 | break; |
| 189 | 189 | case CH1_TP: |
| 190 | 190 | case CH2_TP: |
| 191 | str | |
| 191 | str.printf("%d %05X", ch->m_r[i8089_channel::TP].t & 1, ch->m_r[i8089_channel::TP].w); | |
| 192 | 192 | break; |
| 193 | 193 | case CH1_PSW: |
| 194 | 194 | case CH2_PSW: |
| 195 | str | |
| 195 | str.printf("%c%s%c%s%s%s%c%c", | |
| 196 | 196 | BIT(ch->m_r[i8089_channel::PSW].w, 7) ? 'P':'.', |
| 197 | 197 | BIT(ch->m_r[i8089_channel::PSW].w, 6) ? "XF":"..", |
| 198 | 198 | BIT(ch->m_r[i8089_channel::PSW].w, 5) ? 'B':'.', |
| r245649 | r245650 | |
|---|---|---|
| 89 | 89 | virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options); |
| 90 | 90 | |
| 91 | 91 | // device_state_interface overrides |
| 92 | virtual void state_string_export(const device_state_entry &entry, astring &str | |
| 92 | virtual void state_string_export(const device_state_entry &entry, astring &str); | |
| 93 | 93 | |
| 94 | 94 | // optional information overrides |
| 95 | 95 | virtual machine_config_constructor device_mconfig_additions() const; |
| r245649 | r245650 | |
|---|---|---|
| 275 | 275 | m_out_shutdown_func.resolve_safe(); |
| 276 | 276 | } |
| 277 | 277 | |
| 278 | void i80286_cpu_device::state_string_export(const device_state_entry &entry, astring &str | |
| 278 | void i80286_cpu_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 279 | 279 | { |
| 280 | 280 | switch (entry.index()) |
| 281 | 281 | { |
| 282 | 282 | case STATE_GENPC: |
| 283 | str | |
| 283 | str.printf("%08X", pc()); | |
| 284 | 284 | break; |
| 285 | 285 | |
| 286 | 286 | case STATE_GENFLAGS: |
| 287 | 287 | { |
| 288 | 288 | UINT16 flags = CompressFlags(); |
| 289 | str | |
| 289 | str.printf("%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c", | |
| 290 | 290 | flags & 0x8000 ? '0':'.', |
| 291 | 291 | flags & 0x4000 ? 'N':'.', |
| 292 | 292 | flags & 0x2000 ? 'I':'.', |
| r245649 | r245650 | |
|---|---|---|
| 75 | 75 | virtual void execute_run(); |
| 76 | 76 | virtual void device_reset(); |
| 77 | 77 | virtual void device_start(); |
| 78 | virtual void state_string_export(const device_state_entry &entry, astring &str | |
| 78 | virtual void state_string_export(const device_state_entry &entry, astring &str); | |
| 79 | 79 | virtual UINT32 execute_input_lines() const { return 1; } |
| 80 | 80 | virtual void execute_set_input(int inputnum, int state); |
| 81 | 81 | bool memory_translate(address_spacenum spacenum, int intention, offs_t &address); |
| r245649 | r245650 | |
|---|---|---|
| 310 | 310 | memset(m_sregs, 0x00, sizeof(m_sregs)); |
| 311 | 311 | } |
| 312 | 312 | |
| 313 | void i8086_common_cpu_device::state_string_export(const device_state_entry &entry, astring &str | |
| 313 | void i8086_common_cpu_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 314 | 314 | { |
| 315 | 315 | switch (entry.index()) |
| 316 | 316 | { |
| 317 | 317 | case STATE_GENPC: |
| 318 | str | |
| 318 | str.printf("%08X", pc()); | |
| 319 | 319 | break; |
| 320 | 320 | |
| 321 | 321 | case STATE_GENFLAGS: |
| 322 | 322 | { |
| 323 | 323 | UINT16 flags = CompressFlags(); |
| 324 | str | |
| 324 | str.printf("%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c", | |
| 325 | 325 | flags & 0x8000 ? '1':'.', |
| 326 | 326 | flags & 0x4000 ? '1':'.', |
| 327 | 327 | flags & 0x2000 ? '1':'.', |
| r245649 | r245650 | |
|---|---|---|
| 118 | 118 | virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options); |
| 119 | 119 | |
| 120 | 120 | // device_state_interface overrides |
| 121 | virtual void state_string_export(const device_state_entry &entry, astring &str | |
| 121 | virtual void state_string_export(const device_state_entry &entry, astring &str); | |
| 122 | 122 | |
| 123 | 123 | virtual void interrupt(int int_num, int trap = 1); |
| 124 | 124 | bool common_op(UINT8 op); |
| r245649 | r245650 | |
|---|---|---|
| 2078 | 2078 | m_icountptr = &m_icount; |
| 2079 | 2079 | } |
| 2080 | 2080 | |
| 2081 | void i960_cpu_device::state_string_export(const device_state_entry &entry, astring &str | |
| 2081 | void i960_cpu_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 2082 | 2082 | { |
| 2083 | 2083 | static const char *const conditions[8] = |
| 2084 | 2084 | { |
| r245649 | r245650 | |
| 2088 | 2088 | switch (entry.index()) |
| 2089 | 2089 | { |
| 2090 | 2090 | case STATE_GENFLAGS: |
| 2091 | str | |
| 2091 | str.printf("%s", conditions[m_AC & 7]); | |
| 2092 | 2092 | break; |
| 2093 | 2093 | } |
| 2094 | 2094 | } |
| r245649 | r245650 | |
|---|---|---|
| 93 | 93 | virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; } |
| 94 | 94 | |
| 95 | 95 | // device_state_interface overrides |
| 96 | void state_string_export(const device_state_entry &entry, astring &str | |
| 96 | void state_string_export(const device_state_entry &entry, astring &str); | |
| 97 | 97 | |
| 98 | 98 | // device_disasm_interface overrides |
| 99 | 99 | virtual UINT32 disasm_min_opcode_bytes() const { return 4; } |
| r245649 | r245650 | |
|---|---|---|
| 131 | 131 | // for the debugger |
| 132 | 132 | //------------------------------------------------- |
| 133 | 133 | |
| 134 | void ie15_device::state_string_export(const device_state_entry &entry, astring &str | |
| 134 | void ie15_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 135 | 135 | { |
| 136 | 136 | switch (entry.index()) |
| 137 | 137 | { |
| 138 | 138 | case STATE_GENFLAGS: |
| 139 | str | |
| 139 | str.printf("%c%c%c", | |
| 140 | 140 | m_CF ? 'C':'.', |
| 141 | 141 | m_ZF ? 'Z':'.', |
| 142 | 142 | m_RF ? 'R':'.'); |
| r245649 | r245650 | |
|---|---|---|
| 46 | 46 | // device_state_interface overrides |
| 47 | 47 | virtual void state_import(const device_state_entry &entry); |
| 48 | 48 | virtual void state_export(const device_state_entry &entry); |
| 49 | virtual void state_string_export(const device_state_entry &entry, astring &str | |
| 49 | virtual void state_string_export(const device_state_entry &entry, astring &str); | |
| 50 | 50 | |
| 51 | 51 | // device_disasm_interface overrides |
| 52 | 52 | virtual UINT32 disasm_min_opcode_bytes() const; |
| r245649 | r245650 | |
|---|---|---|
| 403 | 403 | } |
| 404 | 404 | |
| 405 | 405 | |
| 406 | void jaguar_cpu_device::state_string_export(const device_state_entry &entry, astring &str | |
| 406 | void jaguar_cpu_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 407 | 407 | { |
| 408 | 408 | switch (entry.index()) |
| 409 | 409 | { |
| 410 | 410 | case STATE_GENFLAGS: |
| 411 | str | |
| 411 | str.printf("%c%c%c%c%c%c%c%c%c%c%c", | |
| 412 | 412 | FLAGS & 0x8000 ? 'D':'.', |
| 413 | 413 | FLAGS & 0x4000 ? 'A':'.', |
| 414 | 414 | FLAGS & 0x0100 ? '4':'.', |
| r245649 | r245650 | |
|---|---|---|
| 127 | 127 | virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; } |
| 128 | 128 | |
| 129 | 129 | // device_state_interface overrides |
| 130 | void state_string_export(const device_state_entry &entry, astring &str | |
| 130 | void state_string_export(const device_state_entry &entry, astring &str); | |
| 131 | 131 | |
| 132 | 132 | // device_disasm_interface overrides |
| 133 | 133 | virtual UINT32 disasm_min_opcode_bytes() const { return 2; } |
| r245649 | r245650 | |
|---|---|---|
| 369 | 369 | // for the debugger |
| 370 | 370 | //------------------------------------------------- |
| 371 | 371 | |
| 372 | void lc8670_cpu_device::state_string_export(const device_state_entry &entry, astring &str | |
| 372 | void lc8670_cpu_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 373 | 373 | { |
| 374 | 374 | switch (entry.index()) |
| 375 | 375 | { |
| 376 | 376 | case STATE_GENFLAGS: |
| 377 | str | |
| 377 | str.printf("%s%s%s%s", | |
| 378 | 378 | GET_CY ? "CY" : "..", |
| 379 | 379 | GET_AC ? "AC" : "..", |
| 380 | 380 | GET_OV ? "OV" : "..", |
| r245649 | r245650 | |
|---|---|---|
| 110 | 110 | |
| 111 | 111 | // device_state_interface overrides |
| 112 | 112 | virtual void state_import(const device_state_entry &entry); |
| 113 | void state_string_export(const device_state_entry &entry, astring &str | |
| 113 | void state_string_export(const device_state_entry &entry, astring &str); | |
| 114 | 114 | |
| 115 | 115 | // device_memory_interface overrides |
| 116 | 116 | virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const; |
| r245649 | r245650 | |
|---|---|---|
| 154 | 154 | m_icountptr = &m_icount; |
| 155 | 155 | } |
| 156 | 156 | |
| 157 | void lh5801_cpu_device::state_string_export(const device_state_entry &entry, astring &str | |
| 157 | void lh5801_cpu_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 158 | 158 | { |
| 159 | 159 | switch (entry.index()) |
| 160 | 160 | { |
| 161 | 161 | case STATE_GENFLAGS: |
| 162 | str | |
| 162 | str.printf("%c%c%c%c%c%c%c%c", | |
| 163 | 163 | m_t&0x80?'1':'0', |
| 164 | 164 | m_t&0x40?'1':'0', |
| 165 | 165 | m_t&0x20?'1':'0', |
| r245649 | r245650 | |
|---|---|---|
| 101 | 101 | virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : NULL ); } |
| 102 | 102 | |
| 103 | 103 | // device_state_interface overrides |
| 104 | void state_string_export(const device_state_entry &entry, astring &str | |
| 104 | void state_string_export(const device_state_entry &entry, astring &str); | |
| 105 | 105 | |
| 106 | 106 | // device_disasm_interface overrides |
| 107 | 107 | virtual UINT32 disasm_min_opcode_bytes() const { return 1; } |
| r245649 | r245650 | |
|---|---|---|
| 178 | 178 | } |
| 179 | 179 | |
| 180 | 180 | |
| 181 | void lr35902_cpu_device::state_string_export(const device_state_entry &entry, astring &str | |
| 181 | void lr35902_cpu_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 182 | 182 | { |
| 183 | 183 | switch (entry.index()) |
| 184 | 184 | { |
| 185 | 185 | case LR35902_SPEED: |
| 186 | str | |
| 186 | str.printf("%02X", 0x7E | ((m_gb_speed - 1) << 7) | m_gb_speed_change_pending); | |
| 187 | 187 | break; |
| 188 | 188 | |
| 189 | 189 | case STATE_GENFLAGS: |
| 190 | str | |
| 190 | str.printf("%c%c%c%c", | |
| 191 | 191 | m_F & FLAG_Z ? 'Z' : '.', |
| 192 | 192 | m_F & FLAG_N ? 'N' : '.', |
| 193 | 193 | m_F & FLAG_H ? 'H' : '.', |
| r245649 | r245650 | |
|---|---|---|
| 68 | 68 | virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; } |
| 69 | 69 | |
| 70 | 70 | // device_state_interface overrides |
| 71 | void state_string_export(const device_state_entry &entry, astring &str | |
| 71 | void state_string_export(const device_state_entry &entry, astring &str); | |
| 72 | 72 | |
| 73 | 73 | // device_disasm_interface overrides |
| 74 | 74 | virtual UINT32 disasm_min_opcode_bytes() const { return 1; } |
| r245649 | r245650 | |
|---|---|---|
| 1134 | 1134 | } |
| 1135 | 1135 | |
| 1136 | 1136 | |
| 1137 | void m37710_cpu_device::state_string_export(const device_state_entry &entry, astring &str | |
| 1137 | void m37710_cpu_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 1138 | 1138 | { |
| 1139 | 1139 | switch (entry.index()) |
| 1140 | 1140 | { |
| 1141 | 1141 | case STATE_GENFLAGS: |
| 1142 | str | |
| 1142 | str.printf("%c%c%c%c%c%c%c%c", | |
| 1143 | 1143 | m_flag_n & NFLAG_SET ? 'N':'.', |
| 1144 | 1144 | m_flag_v & VFLAG_SET ? 'V':'.', |
| 1145 | 1145 | m_flag_m & MFLAG_SET ? 'M':'.', |
| r245649 | r245650 | |
|---|---|---|
| 115 | 115 | // device_state_interface overrides |
| 116 | 116 | virtual void state_import(const device_state_entry &entry); |
| 117 | 117 | virtual void state_export(const device_state_entry &entry); |
| 118 | void state_string_export(const device_state_entry &entry, astring &str | |
| 118 | void state_string_export(const device_state_entry &entry, astring &str); | |
| 119 | 119 | |
| 120 | 120 | // device_disasm_interface overrides |
| 121 | 121 | virtual UINT32 disasm_min_opcode_bytes() const { return 1; } |
| r245649 | r245650 | |
|---|---|---|
| 456 | 456 | { |
| 457 | 457 | } |
| 458 | 458 | |
| 459 | void m6502_device::state_string_export(const device_state_entry &entry, astring &str | |
| 459 | void m6502_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 460 | 460 | { |
| 461 | 461 | switch(entry.index()) { |
| 462 | 462 | case STATE_GENFLAGS: |
| 463 | 463 | case M6502_P: |
| 464 | str | |
| 464 | str.printf("%c%c%c%c%c%c", | |
| 465 | 465 | P & F_N ? 'N' : '.', |
| 466 | 466 | P & F_V ? 'V' : '.', |
| 467 | 467 | P & F_D ? 'D' : '.', |
| r245649 | r245650 | |
|---|---|---|
| 173 | 173 | // device_state_interface overrides |
| 174 | 174 | virtual void state_import(const device_state_entry &entry); |
| 175 | 175 | virtual void state_export(const device_state_entry &entry); |
| 176 | virtual void state_string_export(const device_state_entry &entry, astring &str | |
| 176 | virtual void state_string_export(const device_state_entry &entry, astring &str); | |
| 177 | 177 | |
| 178 | 178 | // device_disasm_interface overrides |
| 179 | 179 | virtual UINT32 disasm_min_opcode_bytes() const; |
| r245649 | r245650 | |
|---|---|---|
| 104 | 104 | { |
| 105 | 105 | } |
| 106 | 106 | |
| 107 | void m65ce02_device::state_string_export(const device_state_entry &entry, astring &str | |
| 107 | void m65ce02_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 108 | 108 | { |
| 109 | 109 | switch(entry.index()) { |
| 110 | 110 | case STATE_GENFLAGS: |
| 111 | 111 | case M6502_P: |
| 112 | str | |
| 112 | str.printf("%c%c%c%c%c%c%c", | |
| 113 | 113 | P & F_N ? 'N' : '.', |
| 114 | 114 | P & F_V ? 'V' : '.', |
| 115 | 115 | P & F_E ? 'E' : '.', |
| r245649 | r245650 | |
| 119 | 119 | P & F_C ? 'C' : '.'); |
| 120 | 120 | break; |
| 121 | 121 | case M65CE02_B: |
| 122 | str | |
| 122 | str.printf("%02x", B >> 8); | |
| 123 | 123 | break; |
| 124 | 124 | } |
| 125 | 125 | } |
| r245649 | r245650 | |
|---|---|---|
| 63 | 63 | virtual void device_reset(); |
| 64 | 64 | virtual void state_import(const device_state_entry &entry); |
| 65 | 65 | virtual void state_export(const device_state_entry &entry); |
| 66 | virtual void state_string_export(const device_state_entry &entry, astring &str | |
| 66 | virtual void state_string_export(const device_state_entry &entry, astring &str); | |
| 67 | 67 | |
| 68 | 68 | inline void dec_SP_ce() { if(P & F_E) SP = set_l(SP, SP-1); else SP--; } |
| 69 | 69 | inline void inc_SP_ce() { if(P & F_E) SP = set_l(SP, SP+1); else SP++; } |
| r245649 | r245650 | |
|---|---|---|
| 82 | 82 | SP = 0x00ff; |
| 83 | 83 | } |
| 84 | 84 | |
| 85 | void m740_device::state_string_export(const device_state_entry &entry, astring &str | |
| 85 | void m740_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 86 | 86 | { |
| 87 | 87 | switch(entry.index()) { |
| 88 | 88 | case STATE_GENFLAGS: |
| 89 | 89 | case M6502_P: |
| 90 | str | |
| 90 | str.printf("%c%c%c%c%c%c%c", | |
| 91 | 91 | P & F_N ? 'N' : '.', |
| 92 | 92 | P & F_V ? 'V' : '.', |
| 93 | 93 | P & F_T ? 'T' : '.', |
| r245649 | r245650 | |
|---|---|---|
| 73 | 73 | |
| 74 | 74 | static const disasm_entry disasm_entries[0x200]; |
| 75 | 75 | |
| 76 | virtual void state_string_export(const device_state_entry &entry, astring &str | |
| 76 | virtual void state_string_export(const device_state_entry &entry, astring &str); | |
| 77 | 77 | |
| 78 | 78 | virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options); |
| 79 | 79 | virtual void do_exec_full(); |
| r245649 | r245650 | |
|---|---|---|
| 1123 | 1123 | m_icountptr = &m_icount; |
| 1124 | 1124 | } |
| 1125 | 1125 | |
| 1126 | void m6800_cpu_device::state_string_export(const device_state_entry &entry, astring &str | |
| 1126 | void m6800_cpu_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 1127 | 1127 | { |
| 1128 | 1128 | switch (entry.index()) |
| 1129 | 1129 | { |
| 1130 | 1130 | case STATE_GENFLAGS: |
| 1131 | str | |
| 1131 | str.printf("%c%c%c%c%c%c%c%c", | |
| 1132 | 1132 | m_cc & 0x80 ? '?':'.', |
| 1133 | 1133 | m_cc & 0x40 ? '?':'.', |
| 1134 | 1134 | m_cc & 0x20 ? 'H':'.', |
| r245649 | r245650 | |
|---|---|---|
| 85 | 85 | virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO && m_has_io) ? &m_io_config : NULL ); } |
| 86 | 86 | |
| 87 | 87 | // device_state_interface overrides |
| 88 | void state_string_export(const device_state_entry &entry, astring &str | |
| 88 | void state_string_export(const device_state_entry &entry, astring &str); | |
| 89 | 89 | |
| 90 | 90 | // device_disasm_interface overrides |
| 91 | 91 | virtual UINT32 disasm_min_opcode_bytes() const { return 1; } |
| r245649 | r245650 | |
|---|---|---|
| 398 | 398 | // device_state_interface overrides |
| 399 | 399 | virtual void state_import(const device_state_entry &entry); |
| 400 | 400 | virtual void state_export(const device_state_entry &entry); |
| 401 | virtual void state_string_export(const device_state_entry &entry, astring &str | |
| 401 | virtual void state_string_export(const device_state_entry &entry, astring &str); | |
| 402 | 402 | |
| 403 | 403 | // device_memory_interface overrides |
| 404 | 404 | virtual bool memory_translate(address_spacenum space, int intention, offs_t &address); |
| r245649 | r245650 | |
|---|---|---|
| 1173 | 1173 | } |
| 1174 | 1174 | } |
| 1175 | 1175 | |
| 1176 | void m68000_base_device::state_string_export(const device_state_entry &entry, astring &str | |
| 1176 | void m68000_base_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 1177 | 1177 | { |
| 1178 | 1178 | UINT16 sr; |
| 1179 | 1179 | |
| 1180 | 1180 | switch (entry.index()) |
| 1181 | 1181 | { |
| 1182 | 1182 | case M68K_FP0: |
| 1183 | str | |
| 1183 | str.printf("%f", fx80_to_double(REG_FP(this)[0])); | |
| 1184 | 1184 | break; |
| 1185 | 1185 | |
| 1186 | 1186 | case M68K_FP1: |
| 1187 | str | |
| 1187 | str.printf("%f", fx80_to_double(REG_FP(this)[1])); | |
| 1188 | 1188 | break; |
| 1189 | 1189 | |
| 1190 | 1190 | case M68K_FP2: |
| 1191 | str | |
| 1191 | str.printf("%f", fx80_to_double(REG_FP(this)[2])); | |
| 1192 | 1192 | break; |
| 1193 | 1193 | |
| 1194 | 1194 | case M68K_FP3: |
| 1195 | str | |
| 1195 | str.printf("%f", fx80_to_double(REG_FP(this)[3])); | |
| 1196 | 1196 | break; |
| 1197 | 1197 | |
| 1198 | 1198 | case M68K_FP4: |
| 1199 | str | |
| 1199 | str.printf("%f", fx80_to_double(REG_FP(this)[4])); | |
| 1200 | 1200 | break; |
| 1201 | 1201 | |
| 1202 | 1202 | case M68K_FP5: |
| 1203 | str | |
| 1203 | str.printf("%f", fx80_to_double(REG_FP(this)[5])); | |
| 1204 | 1204 | break; |
| 1205 | 1205 | |
| 1206 | 1206 | case M68K_FP6: |
| 1207 | str | |
| 1207 | str.printf("%f", fx80_to_double(REG_FP(this)[6])); | |
| 1208 | 1208 | break; |
| 1209 | 1209 | |
| 1210 | 1210 | case M68K_FP7: |
| 1211 | str | |
| 1211 | str.printf("%f", fx80_to_double(REG_FP(this)[7])); | |
| 1212 | 1212 | break; |
| 1213 | 1213 | |
| 1214 | 1214 | case STATE_GENFLAGS: |
| 1215 | 1215 | sr = m68ki_get_sr(this); |
| 1216 | str | |
| 1216 | str.printf("%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c", | |
| 1217 | 1217 | sr & 0x8000 ? 'T':'.', |
| 1218 | 1218 | sr & 0x4000 ? 't':'.', |
| 1219 | 1219 | sr & 0x2000 ? 'S':'.', |
| r245649 | r245650 | |
|---|---|---|
| 492 | 492 | // for the debugger |
| 493 | 493 | //------------------------------------------------- |
| 494 | 494 | |
| 495 | void m6805_base_device::state_string_export(const device_state_entry &entry, astring &str | |
| 495 | void m6805_base_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 496 | 496 | { |
| 497 | 497 | switch (entry.index()) |
| 498 | 498 | { |
| 499 | 499 | case STATE_GENFLAGS: |
| 500 | str | |
| 500 | str.printf("%c%c%c%c%c%c%c%c", | |
| 501 | 501 | (m_cc & 0x80) ? '?' : '.', |
| 502 | 502 | (m_cc & 0x40) ? '?' : '.', |
| 503 | 503 | (m_cc & 0x20) ? '?' : '.', |
| r245649 | r245650 | |
|---|---|---|
| 49 | 49 | virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options); |
| 50 | 50 | |
| 51 | 51 | // device_state_interface overrides |
| 52 | virtual void state_string_export(const device_state_entry &entry, astring &str | |
| 52 | virtual void state_string_export(const device_state_entry &entry, astring &str); | |
| 53 | 53 | |
| 54 | 54 | private: |
| 55 | 55 | // opcode/condition tables |
| r245649 | r245650 | |
|---|---|---|
| 292 | 292 | // for the debugger |
| 293 | 293 | //------------------------------------------------- |
| 294 | 294 | |
| 295 | void m6809_base_device::state_string_export(const device_state_entry &entry, astring &str | |
| 295 | void m6809_base_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 296 | 296 | { |
| 297 | 297 | switch (entry.index()) |
| 298 | 298 | { |
| 299 | 299 | case STATE_GENFLAGS: |
| 300 | str | |
| 300 | str.printf("%c%c%c%c%c%c%c%c", | |
| 301 | 301 | (m_cc & 0x80) ? 'E' : '.', |
| 302 | 302 | (m_cc & 0x40) ? 'F' : '.', |
| 303 | 303 | (m_cc & 0x20) ? 'H' : '.', |
| r245649 | r245650 | |
|---|---|---|
| 61 | 61 | virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options); |
| 62 | 62 | |
| 63 | 63 | // device_state_interface overrides |
| 64 | virtual void state_string_export(const device_state_entry &entry, astring &str | |
| 64 | virtual void state_string_export(const device_state_entry &entry, astring &str); | |
| 65 | 65 | |
| 66 | 66 | // addressing modes |
| 67 | 67 | enum |
| r245649 | r245650 | |
|---|---|---|
| 158 | 158 | } |
| 159 | 159 | |
| 160 | 160 | |
| 161 | void mb86233_cpu_device::state_string_export(const device_state_entry &entry, astring &str | |
| 161 | void mb86233_cpu_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 162 | 162 | { |
| 163 | 163 | switch (entry.index()) |
| 164 | 164 | { |
| 165 | 165 | case STATE_GENFLAGS: |
| 166 | str | |
| 166 | str.printf("%c%c", (m_sr & SIGN_FLAG) ? 'N' : 'n', (m_sr & ZERO_FLAG) ? 'Z' : 'z'); | |
| 167 | 167 | break; |
| 168 | 168 | } |
| 169 | 169 | } |
| r245649 | r245650 | |
|---|---|---|
| 72 | 72 | virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_DATA) ? &m_data_config : NULL ); } |
| 73 | 73 | |
| 74 | 74 | // device_state_interface overrides |
| 75 | void state_string_export(const device_state_entry &entry, astring &str | |
| 75 | void state_string_export(const device_state_entry &entry, astring &str); | |
| 76 | 76 | |
| 77 | 77 | // device_disasm_interface overrides |
| 78 | 78 | virtual UINT32 disasm_min_opcode_bytes() const { return 4; } |
| r245649 | r245650 | |
|---|---|---|
| 108 | 108 | } |
| 109 | 109 | |
| 110 | 110 | |
| 111 | void mb86235_cpu_device::state_string_export(const device_state_entry &entry, astring &str | |
| 111 | void mb86235_cpu_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 112 | 112 | { |
| 113 | 113 | switch (entry.index()) |
| 114 | 114 | { |
| 115 | 115 | case STATE_GENFLAGS: |
| 116 | str | |
| 116 | str.printf("%c%c%c%c", | |
| 117 | 117 | m_flags & 0x80 ? 'S':'.', |
| 118 | 118 | m_flags & 0x40 ? 'Z':'.', |
| 119 | 119 | m_flags & 0x20 ? 'V':'.', |
| r245649 | r245650 | |
|---|---|---|
| 42 | 42 | virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; } |
| 43 | 43 | |
| 44 | 44 | // device_state_interface overrides |
| 45 | void state_string_export(const device_state_entry &entry, astring &str | |
| 45 | void state_string_export(const device_state_entry &entry, astring &str); | |
| 46 | 46 | |
| 47 | 47 | // device_disasm_interface overrides |
| 48 | 48 | virtual UINT32 disasm_min_opcode_bytes() const { return 8; } |
| r245649 | r245650 | |
|---|---|---|
| 267 | 267 | } |
| 268 | 268 | |
| 269 | 269 | |
| 270 | void mb88_cpu_device::state_string_export(const device_state_entry &entry, astring &str | |
| 270 | void mb88_cpu_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 271 | 271 | { |
| 272 | 272 | switch (entry.index()) |
| 273 | 273 | { |
| 274 | 274 | case STATE_GENFLAGS: |
| 275 | str | |
| 275 | str.printf("%c%c%c%c%c%c", | |
| 276 | 276 | TEST_ST() ? 'T' : 't', |
| 277 | 277 | TEST_ZF() ? 'Z' : 'z', |
| 278 | 278 | TEST_CF() ? 'C' : 'c', |
| r245649 | r245650 | |
|---|---|---|
| 88 | 88 | virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_DATA) ? &m_data_config : ( (spacenum == AS_IO) ? &m_io_config : NULL ) ); } |
| 89 | 89 | |
| 90 | 90 | // device_state_interface overrides |
| 91 | void state_string_export(const device_state_entry &entry, astring &str | |
| 91 | void state_string_export(const device_state_entry &entry, astring &str); | |
| 92 | 92 | void state_import(const device_state_entry &entry); |
| 93 | 93 | void state_export(const device_state_entry &entry); |
| 94 | 94 |
| r245649 | r245650 | |
|---|---|---|
| 448 | 448 | } |
| 449 | 449 | |
| 450 | 450 | |
| 451 | void mc68hc11_cpu_device::state_string_export(const device_state_entry &entry, astring &str | |
| 451 | void mc68hc11_cpu_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 452 | 452 | { |
| 453 | 453 | switch (entry.index()) |
| 454 | 454 | { |
| 455 | 455 | case STATE_GENFLAGS: |
| 456 | str | |
| 456 | str.printf("%c%c%c%c%c%c%c%c", | |
| 457 | 457 | (m_ccr & CC_S) ? 'S' : '.', |
| 458 | 458 | (m_ccr & CC_X) ? 'X' : '.', |
| 459 | 459 | (m_ccr & CC_H) ? 'H' : '.', |
| r245649 | r245650 | |
|---|---|---|
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | // device_state_interface overrides |
| 71 | void state_string_export(const device_state_entry &entry, astring &str | |
| 71 | void state_string_export(const device_state_entry &entry, astring &str); | |
| 72 | 72 | |
| 73 | 73 | // device_disasm_interface overrides |
| 74 | 74 | virtual UINT32 disasm_min_opcode_bytes() const { return 1; } |
| r245649 | r245650 | |
|---|---|---|
| 1295 | 1295 | } |
| 1296 | 1296 | } |
| 1297 | 1297 | |
| 1298 | void mcs48_cpu_device::state_string_export(const device_state_entry &entry, astring &str | |
| 1298 | void mcs48_cpu_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 1299 | 1299 | { |
| 1300 | 1300 | switch (entry.index()) |
| 1301 | 1301 | { |
| 1302 | 1302 | case STATE_GENFLAGS: |
| 1303 | str | |
| 1303 | str.printf("%c%c %c%c%c%c%c%c%c%c", | |
| 1304 | 1304 | m_irq_state ? 'I':'.', |
| 1305 | 1305 | m_a11 ? 'M':'.', |
| 1306 | 1306 | m_psw & 0x80 ? 'C':'.', |
| r245649 | r245650 | |
|---|---|---|
| 150 | 150 | // device_state_interface overrides |
| 151 | 151 | virtual void state_import(const device_state_entry &entry); |
| 152 | 152 | virtual void state_export(const device_state_entry &entry); |
| 153 | void state_string_export(const device_state_entry &entry, astring &str | |
| 153 | void state_string_export(const device_state_entry &entry, astring &str); | |
| 154 | 154 | |
| 155 | 155 | // device_disasm_interface overrides |
| 156 | 156 | virtual UINT32 disasm_min_opcode_bytes() const { return 1; } |
| r245649 | r245650 | |
|---|---|---|
| 2223 | 2223 | } |
| 2224 | 2224 | } |
| 2225 | 2225 | |
| 2226 | void mcs51_cpu_device::state_string_export(const device_state_entry &entry, astring &str | |
| 2226 | void mcs51_cpu_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 2227 | 2227 | { |
| 2228 | 2228 | switch (entry.index()) |
| 2229 | 2229 | { |
| 2230 | 2230 | case STATE_GENFLAGS: |
| 2231 | str | |
| 2231 | str.printf("%c%c%c%c%c%c%c%c", | |
| 2232 | 2232 | PSW & 0x80 ? 'C':'.', |
| 2233 | 2233 | PSW & 0x40 ? 'A':'.', |
| 2234 | 2234 | PSW & 0x20 ? 'F':'.', |
| r245649 | r245650 | |
|---|---|---|
| 119 | 119 | // device_state_interface overrides |
| 120 | 120 | virtual void state_import(const device_state_entry &entry); |
| 121 | 121 | virtual void state_export(const device_state_entry &entry); |
| 122 | void state_string_export(const device_state_entry &entry, astring &str | |
| 122 | void state_string_export(const device_state_entry &entry, astring &str); | |
| 123 | 123 | |
| 124 | 124 | // device_disasm_interface overrides |
| 125 | 125 | virtual UINT32 disasm_min_opcode_bytes() const { return 1; } |
| r245649 | r245650 | |
|---|---|---|
| 156 | 156 | { |
| 157 | 157 | } |
| 158 | 158 | |
| 159 | void mcs96_device::state_string_export(const device_state_entry &entry, astring &str | |
| 159 | void mcs96_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 160 | 160 | { |
| 161 | 161 | switch(entry.index()) { |
| 162 | 162 | case STATE_GENFLAGS: |
| 163 | 163 | case MCS96_PSW: |
| 164 | str | |
| 164 | str.printf("%c%c%c%c%c%c%c %c%c%c%c%c%c%c%c", | |
| 165 | 165 | PSW & F_Z ? 'Z' : '.', |
| 166 | 166 | PSW & F_N ? 'N' : '.', |
| 167 | 167 | PSW & F_V ? 'V' : '.', |
| r245649 | r245650 | |
|---|---|---|
| 114 | 114 | // device_state_interface overrides |
| 115 | 115 | virtual void state_import(const device_state_entry &entry); |
| 116 | 116 | virtual void state_export(const device_state_entry &entry); |
| 117 | virtual void state_string_export(const device_state_entry &entry, astring &str | |
| 117 | virtual void state_string_export(const device_state_entry &entry, astring &str); | |
| 118 | 118 | |
| 119 | 119 | // device_disasm_interface overrides |
| 120 | 120 | virtual UINT32 disasm_min_opcode_bytes() const; |
| r245649 | r245650 | |
|---|---|---|
| 119 | 119 | } |
| 120 | 120 | |
| 121 | 121 | |
| 122 | void minx_cpu_device::state_string_export(const device_state_entry &entry, astring &str | |
| 122 | void minx_cpu_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 123 | 123 | { |
| 124 | 124 | switch (entry.index()) |
| 125 | 125 | { |
| 126 | 126 | case STATE_GENFLAGS: |
| 127 | str | |
| 127 | str.printf("%c%c%c%c%c%c%c%c-%c%c%c%c%c", | |
| 128 | 128 | m_F & FLAG_I ? 'I' : '.', |
| 129 | 129 | m_F & FLAG_D ? 'D' : '.', |
| 130 | 130 | m_F & FLAG_L ? 'L' : '.', |
| r245649 | r245650 | |
|---|---|---|
| 34 | 34 | virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; } |
| 35 | 35 | |
| 36 | 36 | // device_state_interface overrides |
| 37 | void state_string_export(const device_state_entry &entry, astring &str | |
| 37 | void state_string_export(const device_state_entry &entry, astring &str); | |
| 38 | 38 | |
| 39 | 39 | // device_disasm_interface overrides |
| 40 | 40 | virtual UINT32 disasm_min_opcode_bytes() const { return 1; } |
| r245649 | r245650 | |
|---|---|---|
| 661 | 661 | } |
| 662 | 662 | |
| 663 | 663 | |
| 664 | void mips3_device::state_string_export(const device_state_entry &entry, astring &str | |
| 664 | void mips3_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 665 | 665 | { |
| 666 | 666 | switch (entry.index()) |
| 667 | 667 | { |
| 668 | 668 | case MIPS3_FPS0: |
| 669 | str | |
| 669 | str.printf("!%16g", *(float *)&m_core->cpr[1][0]); | |
| 670 | 670 | break; |
| 671 | 671 | |
| 672 | 672 | case MIPS3_FPD0: |
| 673 | str | |
| 673 | str.printf("!%16g", *(double *)&m_core->cpr[1][0]); | |
| 674 | 674 | break; |
| 675 | 675 | |
| 676 | 676 | case MIPS3_FPS1: |
| 677 | str | |
| 677 | str.printf("!%16g", *(float *)&m_core->cpr[1][1]); | |
| 678 | 678 | break; |
| 679 | 679 | |
| 680 | 680 | case MIPS3_FPD1: |
| 681 | str | |
| 681 | str.printf("!%16g", *(double *)&m_core->cpr[1][1]); | |
| 682 | 682 | break; |
| 683 | 683 | |
| 684 | 684 | case MIPS3_FPS2: |
| 685 | str | |
| 685 | str.printf("!%16g", *(float *)&m_core->cpr[1][2]); | |
| 686 | 686 | break; |
| 687 | 687 | |
| 688 | 688 | case MIPS3_FPD2: |
| 689 | str | |
| 689 | str.printf("!%16g", *(double *)&m_core->cpr[1][2]); | |
| 690 | 690 | break; |
| 691 | 691 | |
| 692 | 692 | case MIPS3_FPS3: |
| 693 | str | |
| 693 | str.printf("!%16g", *(float *)&m_core->cpr[1][3]); | |
| 694 | 694 | break; |
| 695 | 695 | |
| 696 | 696 | case MIPS3_FPD3: |
| 697 | str | |
| 697 | str.printf("!%16g", *(double *)&m_core->cpr[1][3]); | |
| 698 | 698 | break; |
| 699 | 699 | |
| 700 | 700 | case MIPS3_FPS4: |
| 701 | str | |
| 701 | str.printf("!%16g", *(float *)&m_core->cpr[1][4]); | |
| 702 | 702 | break; |
| 703 | 703 | |
| 704 | 704 | case MIPS3_FPD4: |
| 705 | str | |
| 705 | str.printf("!%16g", *(double *)&m_core->cpr[1][4]); | |
| 706 | 706 | break; |
| 707 | 707 | |
| 708 | 708 | case MIPS3_FPS5: |
| 709 | str | |
| 709 | str.printf("!%16g", *(float *)&m_core->cpr[1][5]); | |
| 710 | 710 | break; |
| 711 | 711 | |
| 712 | 712 | case MIPS3_FPD5: |
| 713 | str | |
| 713 | str.printf("!%16g", *(double *)&m_core->cpr[1][5]); | |
| 714 | 714 | break; |
| 715 | 715 | |
| 716 | 716 | case MIPS3_FPS6: |
| 717 | str | |
| 717 | str.printf("!%16g", *(float *)&m_core->cpr[1][6]); | |
| 718 | 718 | break; |
| 719 | 719 | |
| 720 | 720 | case MIPS3_FPD6: |
| 721 | str | |
| 721 | str.printf("!%16g", *(double *)&m_core->cpr[1][6]); | |
| 722 | 722 | break; |
| 723 | 723 | |
| 724 | 724 | case MIPS3_FPS7: |
| 725 | str | |
| 725 | str.printf("!%16g", *(float *)&m_core->cpr[1][7]); | |
| 726 | 726 | break; |
| 727 | 727 | |
| 728 | 728 | case MIPS3_FPD7: |
| 729 | str | |
| 729 | str.printf("!%16g", *(double *)&m_core->cpr[1][7]); | |
| 730 | 730 | break; |
| 731 | 731 | |
| 732 | 732 | case MIPS3_FPS8: |
| 733 | str | |
| 733 | str.printf("!%16g", *(float *)&m_core->cpr[1][8]); | |
| 734 | 734 | break; |
| 735 | 735 | |
| 736 | 736 | case MIPS3_FPD8: |
| 737 | str | |
| 737 | str.printf("!%16g", *(double *)&m_core->cpr[1][8]); | |
| 738 | 738 | break; |
| 739 | 739 | |
| 740 | 740 | case MIPS3_FPS9: |
| 741 | str | |
| 741 | str.printf("!%16g", *(float *)&m_core->cpr[1][9]); | |
| 742 | 742 | break; |
| 743 | 743 | |
| 744 | 744 | case MIPS3_FPD9: |
| 745 | str | |
| 745 | str.printf("!%16g", *(double *)&m_core->cpr[1][9]); | |
| 746 | 746 | break; |
| 747 | 747 | |
| 748 | 748 | case MIPS3_FPS10: |
| 749 | str | |
| 749 | str.printf("!%16g", *(float *)&m_core->cpr[1][10]); | |
| 750 | 750 | break; |
| 751 | 751 | |
| 752 | 752 | case MIPS3_FPD10: |
| 753 | str | |
| 753 | str.printf("!%16g", *(double *)&m_core->cpr[1][10]); | |
| 754 | 754 | break; |
| 755 | 755 | |
| 756 | 756 | case MIPS3_FPS11: |
| 757 | str | |
| 757 | str.printf("!%16g", *(float *)&m_core->cpr[1][11]); | |
| 758 | 758 | break; |
| 759 | 759 | |
| 760 | 760 | case MIPS3_FPD11: |
| 761 | str | |
| 761 | str.printf("!%16g", *(double *)&m_core->cpr[1][11]); | |
| 762 | 762 | break; |
| 763 | 763 | |
| 764 | 764 | case MIPS3_FPS12: |
| 765 | str | |
| 765 | str.printf("!%16g", *(float *)&m_core->cpr[1][12]); | |
| 766 | 766 | break; |
| 767 | 767 | |
| 768 | 768 | case MIPS3_FPD12: |
| 769 | str | |
| 769 | str.printf("!%16g", *(double *)&m_core->cpr[1][12]); | |
| 770 | 770 | break; |
| 771 | 771 | |
| 772 | 772 | case MIPS3_FPS13: |
| 773 | str | |
| 773 | str.printf("!%16g", *(float *)&m_core->cpr[1][13]); | |
| 774 | 774 | break; |
| 775 | 775 | |
| 776 | 776 | case MIPS3_FPD13: |
| 777 | str | |
| 777 | str.printf("!%16g", *(double *)&m_core->cpr[1][13]); | |
| 778 | 778 | break; |
| 779 | 779 | |
| 780 | 780 | case MIPS3_FPS14: |
| 781 | str | |
| 781 | str.printf("!%16g", *(float *)&m_core->cpr[1][14]); | |
| 782 | 782 | break; |
| 783 | 783 | |
| 784 | 784 | case MIPS3_FPD14: |
| 785 | str | |
| 785 | str.printf("!%16g", *(double *)&m_core->cpr[1][14]); | |
| 786 | 786 | break; |
| 787 | 787 | |
| 788 | 788 | case MIPS3_FPS15: |
| 789 | str | |
| 789 | str.printf("!%16g", *(float *)&m_core->cpr[1][15]); | |
| 790 | 790 | break; |
| 791 | 791 | |
| 792 | 792 | case MIPS3_FPD15: |
| 793 | str | |
| 793 | str.printf("!%16g", *(double *)&m_core->cpr[1][15]); | |
| 794 | 794 | break; |
| 795 | 795 | |
| 796 | 796 | case MIPS3_FPS16: |
| 797 | str | |
| 797 | str.printf("!%16g", *(float *)&m_core->cpr[1][16]); | |
| 798 | 798 | break; |
| 799 | 799 | |
| 800 | 800 | case MIPS3_FPD16: |
| 801 | str | |
| 801 | str.printf("!%16g", *(double *)&m_core->cpr[1][16]); | |
| 802 | 802 | break; |
| 803 | 803 | |
| 804 | 804 | case MIPS3_FPS17: |
| 805 | str | |
| 805 | str.printf("!%16g", *(float *)&m_core->cpr[1][17]); | |
| 806 | 806 | break; |
| 807 | 807 | |
| 808 | 808 | case MIPS3_FPD17: |
| 809 | str | |
| 809 | str.printf("!%16g", *(double *)&m_core->cpr[1][17]); | |
| 810 | 810 | break; |
| 811 | 811 | |
| 812 | 812 | case MIPS3_FPS18: |
| 813 | str | |
| 813 | str.printf("!%16g", *(float *)&m_core->cpr[1][18]); | |
| 814 | 814 | break; |
| 815 | 815 | |
| 816 | 816 | case MIPS3_FPD18: |
| 817 | str | |
| 817 | str.printf("!%16g", *(double *)&m_core->cpr[1][18]); | |
| 818 | 818 | break; |
| 819 | 819 | |
| 820 | 820 | case MIPS3_FPS19: |
| 821 | str | |
| 821 | str.printf("!%16g", *(float *)&m_core->cpr[1][19]); | |
| 822 | 822 | break; |
| 823 | 823 | |
| 824 | 824 | case MIPS3_FPD19: |
| 825 | str | |
| 825 | str.printf("!%16g", *(double *)&m_core->cpr[1][19]); | |
| 826 | 826 | break; |
| 827 | 827 | |
| 828 | 828 | case MIPS3_FPS20: |
| 829 | str | |
| 829 | str.printf("!%16g", *(float *)&m_core->cpr[1][20]); | |
| 830 | 830 | break; |
| 831 | 831 | |
| 832 | 832 | case MIPS3_FPD20: |
| 833 | str | |
| 833 | str.printf("!%16g", *(double *)&m_core->cpr[1][20]); | |
| 834 | 834 | break; |
| 835 | 835 | |
| 836 | 836 | case MIPS3_FPS21: |
| 837 | str | |
| 837 | str.printf("!%16g", *(float *)&m_core->cpr[1][21]); | |
| 838 | 838 | break; |
| 839 | 839 | |
| 840 | 840 | case MIPS3_FPD21: |
| 841 | str | |
| 841 | str.printf("!%16g", *(double *)&m_core->cpr[1][21]); | |
| 842 | 842 | break; |
| 843 | 843 | |
| 844 | 844 | case MIPS3_FPS22: |
| 845 | str | |
| 845 | str.printf("!%16g", *(float *)&m_core->cpr[1][22]); | |
| 846 | 846 | break; |
| 847 | 847 | |
| 848 | 848 | case MIPS3_FPD22: |
| 849 | str | |
| 849 | str.printf("!%16g", *(double *)&m_core->cpr[1][22]); | |
| 850 | 850 | break; |
| 851 | 851 | |
| 852 | 852 | case MIPS3_FPS23: |
| 853 | str | |
| 853 | str.printf("!%16g", *(float *)&m_core->cpr[1][23]); | |
| 854 | 854 | break; |
| 855 | 855 | |
| 856 | 856 | case MIPS3_FPD23: |
| 857 | str | |
| 857 | str.printf("!%16g", *(double *)&m_core->cpr[1][23]); | |
| 858 | 858 | break; |
| 859 | 859 | |
| 860 | 860 | case MIPS3_FPS24: |
| 861 | str | |
| 861 | str.printf("!%16g", *(float *)&m_core->cpr[1][24]); | |
| 862 | 862 | break; |
| 863 | 863 | |
| 864 | 864 | case MIPS3_FPD24: |
| 865 | str | |
| 865 | str.printf("!%16g", *(double *)&m_core->cpr[1][24]); | |
| 866 | 866 | break; |
| 867 | 867 | |
| 868 | 868 | case MIPS3_FPS25: |
| 869 | str | |
| 869 | str.printf("!%16g", *(float *)&m_core->cpr[1][25]); | |
| 870 | 870 | break; |
| 871 | 871 | |
| 872 | 872 | case MIPS3_FPD25: |
| 873 | str | |
| 873 | str.printf("!%16g", *(double *)&m_core->cpr[1][25]); | |
| 874 | 874 | break; |
| 875 | 875 | |
| 876 | 876 | case MIPS3_FPS26: |
| 877 | str | |
| 877 | str.printf("!%16g", *(float *)&m_core->cpr[1][26]); | |
| 878 | 878 | break; |
| 879 | 879 | |
| 880 | 880 | case MIPS3_FPD26: |
| 881 | str | |
| 881 | str.printf("!%16g", *(double *)&m_core->cpr[1][26]); | |
| 882 | 882 | break; |
| 883 | 883 | |
| 884 | 884 | case MIPS3_FPS27: |
| 885 | str | |
| 885 | str.printf("!%16g", *(float *)&m_core->cpr[1][27]); | |
| 886 | 886 | break; |
| 887 | 887 | |
| 888 | 888 | case MIPS3_FPD27: |
| 889 | str | |
| 889 | str.printf("!%16g", *(double *)&m_core->cpr[1][27]); | |
| 890 | 890 | break; |
| 891 | 891 | |
| 892 | 892 | case MIPS3_FPS28: |
| 893 | str | |
| 893 | str.printf("!%16g", *(float *)&m_core->cpr[1][28]); | |
| 894 | 894 | break; |
| 895 | 895 | |
| 896 | 896 | case MIPS3_FPD28: |
| 897 | str | |
| 897 | str.printf("!%16g", *(double *)&m_core->cpr[1][28]); | |
| 898 | 898 | break; |
| 899 | 899 | |
| 900 | 900 | case MIPS3_FPS29: |
| 901 | str | |
| 901 | str.printf("!%16g", *(float *)&m_core->cpr[1][29]); | |
| 902 | 902 | break; |
| 903 | 903 | |
| 904 | 904 | case MIPS3_FPD29: |
| 905 | str | |
| 905 | str.printf("!%16g", *(double *)&m_core->cpr[1][29]); | |
| 906 | 906 | break; |
| 907 | 907 | |
| 908 | 908 | case MIPS3_FPS30: |
| 909 | str | |
| 909 | str.printf("!%16g", *(float *)&m_core->cpr[1][30]); | |
| 910 | 910 | break; |
| 911 | 911 | |
| 912 | 912 | case MIPS3_FPD30: |
| 913 | str | |
| 913 | str.printf("!%16g", *(double *)&m_core->cpr[1][30]); | |
| 914 | 914 | break; |
| 915 | 915 | |
| 916 | 916 | case MIPS3_FPS31: |
| 917 | str | |
| 917 | str.printf("!%16g", *(float *)&m_core->cpr[1][31]); | |
| 918 | 918 | break; |
| 919 | 919 | |
| 920 | 920 | case MIPS3_FPD31: |
| 921 | str | |
| 921 | str.printf("!%16g", *(double *)&m_core->cpr[1][31]); | |
| 922 | 922 | break; |
| 923 | 923 | |
| 924 | 924 | case STATE_GENFLAGS: |
| 925 | str | |
| 925 | str.printf(" "); | |
| 926 | 926 | break; |
| 927 | 927 | } |
| 928 | 928 | } |
| r245649 | r245650 | |
|---|---|---|
| 320 | 320 | |
| 321 | 321 | // device_state_interface overrides |
| 322 | 322 | virtual void state_export(const device_state_entry &entry); |
| 323 | void state_string_export(const device_state_entry &entry, astring &str | |
| 323 | void state_string_export(const device_state_entry &entry, astring &str); | |
| 324 | 324 | |
| 325 | 325 | // device_disasm_interface overrides |
| 326 | 326 | virtual UINT32 disasm_min_opcode_bytes() const { return 4; } |
| r245649 | r245650 | |
|---|---|---|
| 443 | 443 | // for the debugger |
| 444 | 444 | //------------------------------------------------- |
| 445 | 445 | |
| 446 | void r3000_device::state_string_export(const device_state_entry &entry, astring &str | |
| 446 | void r3000_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 447 | 447 | { |
| 448 | 448 | switch (entry.index()) |
| 449 | 449 | { |
| r245649 | r245650 | |
|---|---|---|
| 126 | 126 | // device_state_interface overrides |
| 127 | 127 | virtual void state_import(const device_state_entry &entry); |
| 128 | 128 | virtual void state_export(const device_state_entry &entry); |
| 129 | virtual void state_string_export(const device_state_entry &entry, astring &str | |
| 129 | virtual void state_string_export(const device_state_entry &entry, astring &str); | |
| 130 | 130 | |
| 131 | 131 | // device_disasm_interface overrides |
| 132 | 132 | virtual UINT32 disasm_min_opcode_bytes() const; |
| r245649 | r245650 | |
|---|---|---|
| 174 | 174 | } |
| 175 | 175 | |
| 176 | 176 | |
| 177 | void mn10200_device::state_string_export(const device_state_entry &entry, astring &str | |
| 177 | void mn10200_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 178 | 178 | { |
| 179 | 179 | switch (entry.index()) |
| 180 | 180 | { |
| 181 | 181 | case STATE_GENFLAGS: |
| 182 | str | |
| 182 | str.printf("S=%d irq=%s im=%d %c%c%c%c %c%c%c%c", | |
| 183 | 183 | (m_psw >> 12) & 3, |
| 184 | 184 | m_psw & FLAG_IE ? "on " : "off", |
| 185 | 185 | (m_psw >> 8) & 7, |
| r245649 | r245650 | |
|---|---|---|
| 86 | 86 | } |
| 87 | 87 | |
| 88 | 88 | // device_state_interface overrides |
| 89 | void state_string_export(const device_state_entry &entry, astring &str | |
| 89 | void state_string_export(const device_state_entry &entry, astring &str); | |
| 90 | 90 | |
| 91 | 91 | // device_disasm_interface overrides |
| 92 | 92 | virtual UINT32 disasm_min_opcode_bytes() const { return 1; } |
| r245649 | r245650 | |
|---|---|---|
| 435 | 435 | m_icountptr = &m_icount; |
| 436 | 436 | } |
| 437 | 437 | |
| 438 | void nec_common_device::state_string_export(const device_state_entry &entry, astring &str | |
| 438 | void nec_common_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 439 | 439 | { |
| 440 | 440 | UINT16 flags = CompressFlags(); |
| 441 | 441 | |
| 442 | 442 | switch (entry.index()) |
| 443 | 443 | { |
| 444 | 444 | case STATE_GENFLAGS: |
| 445 | str | |
| 445 | str.printf("%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c", | |
| 446 | 446 | flags & 0x8000 ? 'N':'E', |
| 447 | 447 | flags & 0x4000 ? '?':'.', |
| 448 | 448 | flags & 0x2000 ? '?':'.', |
| r245649 | r245650 | |
|---|---|---|
| 40 | 40 | virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : NULL); } |
| 41 | 41 | |
| 42 | 42 | // device_state_interface overrides |
| 43 | void state_string_export(const device_state_entry &entry, astring &str | |
| 43 | void state_string_export(const device_state_entry &entry, astring &str); | |
| 44 | 44 | virtual void state_import(const device_state_entry &entry); |
| 45 | 45 | virtual void state_export(const device_state_entry &entry); |
| 46 | 46 |
| r245649 | r245650 | |
|---|---|---|
| 523 | 523 | } |
| 524 | 524 | |
| 525 | 525 | |
| 526 | void v25_common_device::state_string_export(const device_state_entry &entry, astring &str | |
| 526 | void v25_common_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 527 | 527 | { |
| 528 | 528 | UINT16 flags = CompressFlags(); |
| 529 | 529 | |
| 530 | 530 | switch (entry.index()) |
| 531 | 531 | { |
| 532 | 532 | case STATE_GENFLAGS: |
| 533 | str | |
| 533 | str.printf("%c %d %c%c%c%c%c%c%c%c%c%c%c%c", | |
| 534 | 534 | flags & 0x8000 ? 'N':'S', |
| 535 | 535 | (flags & 0x7000) >> 12, |
| 536 | 536 | flags & 0x0800 ? 'O':'.', |
| r245649 | r245650 | |
|---|---|---|
| 57 | 57 | virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : NULL); } |
| 58 | 58 | |
| 59 | 59 | // device_state_interface overrides |
| 60 | void state_string_export(const device_state_entry &entry, astring &str | |
| 60 | void state_string_export(const device_state_entry &entry, astring &str); | |
| 61 | 61 | virtual void state_import(const device_state_entry &entry); |
| 62 | 62 | virtual void state_export(const device_state_entry &entry); |
| 63 | 63 |
| r245649 | r245650 | |
|---|---|---|
| 735 | 735 | } |
| 736 | 736 | |
| 737 | 737 | |
| 738 | void pdp1_device::state_string_export(const device_state_entry &entry, astring &str | |
| 738 | void pdp1_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 739 | 739 | { |
| 740 | 740 | switch (entry.index()) |
| 741 | 741 | { |
| 742 | 742 | case STATE_GENFLAGS: |
| 743 | str | |
| 743 | str.printf("%c%c%c%c%c%c-%c%c%c%c%c%c", | |
| 744 | 744 | (FLAGS & 040) ? '1' : '.', |
| 745 | 745 | (FLAGS & 020) ? '2' : '.', |
| 746 | 746 | (FLAGS & 010) ? '3' : '.', |
| r245649 | r245650 | |
|---|---|---|
| 105 | 105 | // device_state_interface overrides |
| 106 | 106 | virtual void state_import(const device_state_entry &entry); |
| 107 | 107 | virtual void state_export(const device_state_entry &entry); |
| 108 | void state_string_export(const device_state_entry &entry, astring &str | |
| 108 | void state_string_export(const device_state_entry &entry, astring &str); | |
| 109 | 109 | |
| 110 | 110 | // device_disasm_interface overrides |
| 111 | 111 | virtual UINT32 disasm_min_opcode_bytes() const { return 4; } |
| r245649 | r245650 | |
|---|---|---|
| 921 | 921 | } |
| 922 | 922 | } |
| 923 | 923 | |
| 924 | void pic16c5x_device::state_string_export(const device_state_entry &entry, astring &str | |
| 924 | void pic16c5x_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 925 | 925 | { |
| 926 | 926 | switch (entry.index()) |
| 927 | 927 | { |
| 928 | 928 | case PIC16C5x_PSCL: |
| 929 | str | |
| 929 | str.printf("%c%02X", ((m_OPTION & 0x08) ? 'W' : 'T'), m_prescaler); | |
| 930 | 930 | break; |
| 931 | 931 | |
| 932 | 932 | case STATE_GENFLAGS: |
| 933 | str | |
| 933 | str.printf("%01x%c%c%c%c%c %c%c%c%03x", | |
| 934 | 934 | (STATUS & 0xe0) >> 5, |
| 935 | 935 | STATUS & 0x10 ? '.':'O', /* WDT Overflow */ |
| 936 | 936 | STATUS & 0x08 ? 'P':'D', /* Power/Down */ |
| r245649 | r245650 | |
|---|---|---|
| 115 | 115 | // device_state_interface overrides |
| 116 | 116 | virtual void state_import(const device_state_entry &entry); |
| 117 | 117 | virtual void state_export(const device_state_entry &entry); |
| 118 | void state_string_export(const device_state_entry &entry, astring &str | |
| 118 | void state_string_export(const device_state_entry &entry, astring &str); | |
| 119 | 119 | |
| 120 | 120 | // device_disasm_interface overrides |
| 121 | 121 | virtual UINT32 disasm_min_opcode_bytes() const { return 2; } |
| r245649 | r245650 | |
|---|---|---|
| 979 | 979 | } |
| 980 | 980 | } |
| 981 | 981 | |
| 982 | void pic16c62x_device::state_string_export(const device_state_entry &entry, astring &str | |
| 982 | void pic16c62x_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 983 | 983 | { |
| 984 | 984 | switch (entry.index()) |
| 985 | 985 | { |
| 986 | 986 | case PIC16C62x_PSCL: |
| 987 | str | |
| 987 | str.printf("%c%02X", ((m_OPTION & 0x08) ? 'W' : 'T'), m_prescaler); | |
| 988 | 988 | break; |
| 989 | 989 | |
| 990 | 990 | case STATE_GENFLAGS: |
| 991 | str | |
| 991 | str.printf("%01x%c%c%c%c%c %c%c%c%03x", | |
| 992 | 992 | (STATUS & 0xe0) >> 5, |
| 993 | 993 | STATUS & 0x10 ? '.':'O', /* WDT Overflow */ |
| 994 | 994 | STATUS & 0x08 ? 'P':'D', /* Power/Down */ |
| r245649 | r245650 | |
|---|---|---|
| 86 | 86 | // device_state_interface overrides |
| 87 | 87 | virtual void state_import(const device_state_entry &entry); |
| 88 | 88 | virtual void state_export(const device_state_entry &entry); |
| 89 | void state_string_export(const device_state_entry &entry, astring &str | |
| 89 | void state_string_export(const device_state_entry &entry, astring &str); | |
| 90 | 90 | |
| 91 | 91 | // device_disasm_interface overrides |
| 92 | 92 | virtual UINT32 disasm_min_opcode_bytes() const { return 2; } |
| r245649 | r245650 | |
|---|---|---|
| 265 | 265 | // device_state_interface overrides |
| 266 | 266 | virtual void state_export(const device_state_entry &entry); |
| 267 | 267 | virtual void state_import(const device_state_entry &entry); |
| 268 | virtual void state_string_export(const device_state_entry &entry, astring &str | |
| 268 | virtual void state_string_export(const device_state_entry &entry, astring &str); | |
| 269 | 269 | |
| 270 | 270 | // device_disasm_interface overrides |
| 271 | 271 | virtual UINT32 disasm_min_opcode_bytes() const { return 4; } |
| r245649 | r245650 | |
|---|---|---|
| 1007 | 1007 | } |
| 1008 | 1008 | |
| 1009 | 1009 | |
| 1010 | void ppc_device::state_string_export(const device_state_entry &entry, astring &str | |
| 1010 | void ppc_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 1011 | 1011 | { |
| 1012 | 1012 | switch (entry.index()) |
| 1013 | 1013 | { |
| 1014 | 1014 | case PPC_F0: |
| 1015 | str | |
| 1015 | str.printf("%12f", m_core->f[0]); | |
| 1016 | 1016 | break; |
| 1017 | 1017 | |
| 1018 | 1018 | case PPC_F1: |
| 1019 | str | |
| 1019 | str.printf("%12f", m_core->f[1]); | |
| 1020 | 1020 | break; |
| 1021 | 1021 | |
| 1022 | 1022 | case PPC_F2: |
| 1023 | str | |
| 1023 | str.printf("%12f", m_core->f[2]); | |
| 1024 | 1024 | break; |
| 1025 | 1025 | |
| 1026 | 1026 | case PPC_F3: |
| 1027 | str | |
| 1027 | str.printf("%12f", m_core->f[3]); | |
| 1028 | 1028 | break; |
| 1029 | 1029 | |
| 1030 | 1030 | case PPC_F4: |
| 1031 | str | |
| 1031 | str.printf("%12f", m_core->f[4]); | |
| 1032 | 1032 | break; |
| 1033 | 1033 | |
| 1034 | 1034 | case PPC_F5: |
| 1035 | str | |
| 1035 | str.printf("%12f", m_core->f[5]); | |
| 1036 | 1036 | break; |
| 1037 | 1037 | |
| 1038 | 1038 | case PPC_F6: |
| 1039 | str | |
| 1039 | str.printf("%12f", m_core->f[6]); | |
| 1040 | 1040 | break; |
| 1041 | 1041 | |
| 1042 | 1042 | case PPC_F7: |
| 1043 | str | |
| 1043 | str.printf("%12f", m_core->f[7]); | |
| 1044 | 1044 | break; |
| 1045 | 1045 | |
| 1046 | 1046 | case PPC_F8: |
| 1047 | str | |
| 1047 | str.printf("%12f", m_core->f[8]); | |
| 1048 | 1048 | break; |
| 1049 | 1049 | |
| 1050 | 1050 | case PPC_F9: |
| 1051 | str | |
| 1051 | str.printf("%12f", m_core->f[9]); | |
| 1052 | 1052 | break; |
| 1053 | 1053 | |
| 1054 | 1054 | case PPC_F10: |
| 1055 | str | |
| 1055 | str.printf("%12f", m_core->f[10]); | |
| 1056 | 1056 | break; |
| 1057 | 1057 | |
| 1058 | 1058 | case PPC_F11: |
| 1059 | str | |
| 1059 | str.printf("%12f", m_core->f[11]); | |
| 1060 | 1060 | break; |
| 1061 | 1061 | |
| 1062 | 1062 | case PPC_F12: |
| 1063 | str | |
| 1063 | str.printf("%12f", m_core->f[12]); | |
| 1064 | 1064 | break; |
| 1065 | 1065 | |
| 1066 | 1066 | case PPC_F13: |
| 1067 | str | |
| 1067 | str.printf("%12f", m_core->f[13]); | |
| 1068 | 1068 | break; |
| 1069 | 1069 | |
| 1070 | 1070 | case PPC_F14: |
| 1071 | str | |
| 1071 | str.printf("%12f", m_core->f[14]); | |
| 1072 | 1072 | break; |
| 1073 | 1073 | |
| 1074 | 1074 | case PPC_F15: |
| 1075 | str | |
| 1075 | str.printf("%12f", m_core->f[15]); | |
| 1076 | 1076 | break; |
| 1077 | 1077 | |
| 1078 | 1078 | case PPC_F16: |
| 1079 | str | |
| 1079 | str.printf("%12f", m_core->f[16]); | |
| 1080 | 1080 | break; |
| 1081 | 1081 | |
| 1082 | 1082 | case PPC_F17: |
| 1083 | str | |
| 1083 | str.printf("%12f", m_core->f[17]); | |
| 1084 | 1084 | break; |
| 1085 | 1085 | |
| 1086 | 1086 | case PPC_F18: |
| 1087 | str | |
| 1087 | str.printf("%12f", m_core->f[18]); | |
| 1088 | 1088 | break; |
| 1089 | 1089 | |
| 1090 | 1090 | case PPC_F19: |
| 1091 | str | |
| 1091 | str.printf("%12f", m_core->f[19]); | |
| 1092 | 1092 | break; |
| 1093 | 1093 | |
| 1094 | 1094 | case PPC_F20: |
| 1095 | str | |
| 1095 | str.printf("%12f", m_core->f[20]); | |
| 1096 | 1096 | break; |
| 1097 | 1097 | |
| 1098 | 1098 | case PPC_F21: |
| 1099 | str | |
| 1099 | str.printf("%12f", m_core->f[21]); | |
| 1100 | 1100 | break; |
| 1101 | 1101 | |
| 1102 | 1102 | case PPC_F22: |
| 1103 | str | |
| 1103 | str.printf("%12f", m_core->f[22]); | |
| 1104 | 1104 | break; |
| 1105 | 1105 | |
| 1106 | 1106 | case PPC_F23: |
| 1107 | str | |
| 1107 | str.printf("%12f", m_core->f[23]); | |
| 1108 | 1108 | break; |
| 1109 | 1109 | |
| 1110 | 1110 | case PPC_F24: |
| 1111 | str | |
| 1111 | str.printf("%12f", m_core->f[24]); | |
| 1112 | 1112 | break; |
| 1113 | 1113 | |
| 1114 | 1114 | case PPC_F25: |
| 1115 | str | |
| 1115 | str.printf("%12f", m_core->f[25]); | |
| 1116 | 1116 | break; |
| 1117 | 1117 | |
| 1118 | 1118 | case PPC_F26: |
| 1119 | str | |
| 1119 | str.printf("%12f", m_core->f[26]); | |
| 1120 | 1120 | break; |
| 1121 | 1121 | |
| 1122 | 1122 | case PPC_F27: |
| 1123 | str | |
| 1123 | str.printf("%12f", m_core->f[27]); | |
| 1124 | 1124 | break; |
| 1125 | 1125 | |
| 1126 | 1126 | case PPC_F28: |
| 1127 | str | |
| 1127 | str.printf("%12f", m_core->f[28]); | |
| 1128 | 1128 | break; |
| 1129 | 1129 | |
| 1130 | 1130 | case PPC_F29: |
| 1131 | str | |
| 1131 | str.printf("%12f", m_core->f[29]); | |
| 1132 | 1132 | break; |
| 1133 | 1133 | |
| 1134 | 1134 | case PPC_F30: |
| 1135 | str | |
| 1135 | str.printf("%12f", m_core->f[30]); | |
| 1136 | 1136 | break; |
| 1137 | 1137 | |
| 1138 | 1138 | case PPC_F31: |
| 1139 | str | |
| 1139 | str.printf("%12f", m_core->f[31]); | |
| 1140 | 1140 | break; |
| 1141 | 1141 | } |
| 1142 | 1142 | } |
| r245649 | r245650 | |
|---|---|---|
| 1552 | 1552 | m_icountptr = &m_icount; |
| 1553 | 1553 | } |
| 1554 | 1554 | |
| 1555 | void pps4_device::state_string_export(const device_state_entry &entry, astring &str | |
| 1555 | void pps4_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 1556 | 1556 | { |
| 1557 | 1557 | switch (entry.index()) |
| 1558 | 1558 | { |
| 1559 | 1559 | case STATE_GENFLAGS: |
| 1560 | str | |
| 1560 | str.printf("%c%c%c", | |
| 1561 | 1561 | m_C ? 'C':'.', |
| 1562 | 1562 | m_FF1 ? '1':'.', |
| 1563 | 1563 | m_FF2 ? '2':'.'); |
| r245649 | r245650 | |
|---|---|---|
| 62 | 62 | } |
| 63 | 63 | |
| 64 | 64 | // device_state_interface overrides |
| 65 | void state_string_export(const device_state_entry &entry, astring &str | |
| 65 | void state_string_export(const device_state_entry &entry, astring &str); | |
| 66 | 66 | |
| 67 | 67 | // device_disasm_interface overrides |
| 68 | 68 | virtual UINT32 disasm_min_opcode_bytes() const { return 1; } |
| r245649 | r245650 | |
|---|---|---|
| 2025 | 2025 | // for the debugger |
| 2026 | 2026 | //------------------------------------------------- |
| 2027 | 2027 | |
| 2028 | void psxcpu_device::state_string_export( const device_state_entry &entry, astring &str | |
| 2028 | void psxcpu_device::state_string_export( const device_state_entry &entry, astring &str ) | |
| 2029 | 2029 | { |
| 2030 | 2030 | switch( entry.index() ) |
| 2031 | 2031 | { |
| 2032 | 2032 | case PSXCPU_DELAYR: |
| 2033 | 2033 | if( m_delayr <= PSXCPU_DELAYR_NOTPC ) |
| 2034 | 2034 | { |
| 2035 | str | |
| 2035 | str.printf("%02x %-3s", m_delayr, delayn[m_delayr]); | |
| 2036 | 2036 | } |
| 2037 | 2037 | else |
| 2038 | 2038 | { |
| 2039 | str | |
| 2039 | str.printf("%02x ---", m_delayr); | |
| 2040 | 2040 | } |
| 2041 | 2041 | break; |
| 2042 | 2042 | } |
| r245649 | r245650 | |
|---|---|---|
| 220 | 220 | |
| 221 | 221 | // device_state_interface overrides |
| 222 | 222 | virtual void state_import(const device_state_entry &entry); |
| 223 | virtual void state_string_export(const device_state_entry &entry, astring &str | |
| 223 | virtual void state_string_export(const device_state_entry &entry, astring &str); | |
| 224 | 224 | |
| 225 | 225 | // device_disasm_interface overrides |
| 226 | 226 | virtual UINT32 disasm_min_opcode_bytes() const { return 4; } |
| r245649 | r245650 | |
|---|---|---|
| 537 | 537 | } |
| 538 | 538 | } |
| 539 | 539 | |
| 540 | void rsp_device::state_string_export(const device_state_entry &entry, astring &str | |
| 540 | void rsp_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 541 | 541 | { |
| 542 | 542 | const int index = entry.index(); |
| 543 | 543 | if (index >= RSP_V0 && index <= RSP_V31) |
| 544 | 544 | { |
| 545 | m_cop2->state_string_export(index, str | |
| 545 | m_cop2->state_string_export(index, str); | |
| 546 | 546 | } |
| 547 | 547 | else if (index == STATE_GENFLAGS) |
| 548 | 548 | { |
| 549 | str | |
| 549 | str.printf("%s", ""); | |
| 550 | 550 | } |
| 551 | 551 | } |
| 552 | 552 |
| r245649 | r245650 | |
|---|---|---|
| 185 | 185 | // device_state_interface overrides |
| 186 | 186 | virtual void state_import(const device_state_entry &entry); |
| 187 | 187 | virtual void state_export(const device_state_entry &entry); |
| 188 | void state_string_export(const device_state_entry &entry, astring &str | |
| 188 | void state_string_export(const device_state_entry &entry, astring &str); | |
| 189 | 189 | |
| 190 | 190 | // device_disasm_interface overrides |
| 191 | 191 | virtual UINT32 disasm_min_opcode_bytes() const { return 4; } |
| r245649 | r245650 | |
|---|---|---|
| 171 | 171 | } |
| 172 | 172 | } |
| 173 | 173 | |
| 174 | void rsp_cop2::state_string_export(const int index, astring &str | |
| 174 | void rsp_cop2::state_string_export(const int index, astring &str) | |
| 175 | 175 | { |
| 176 | 176 | switch (index) |
| 177 | 177 | { |
| 178 | 178 | case RSP_V0: |
| 179 | str | |
| 179 | str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S( 0, 0), (UINT16)VREG_S( 0, 1), (UINT16)VREG_S( 0, 2), (UINT16)VREG_S( 0, 3), (UINT16)VREG_S( 0, 4), (UINT16)VREG_S( 0, 5), (UINT16)VREG_S( 0, 6), (UINT16)VREG_S( 0, 7)); | |
| 180 | 180 | break; |
| 181 | 181 | case RSP_V1: |
| 182 | str | |
| 182 | str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S( 1, 0), (UINT16)VREG_S( 1, 1), (UINT16)VREG_S( 1, 2), (UINT16)VREG_S( 1, 3), (UINT16)VREG_S( 1, 4), (UINT16)VREG_S( 1, 5), (UINT16)VREG_S( 1, 6), (UINT16)VREG_S( 1, 7)); | |
| 183 | 183 | break; |
| 184 | 184 | case RSP_V2: |
| 185 | str | |
| 185 | str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S( 2, 0), (UINT16)VREG_S( 2, 1), (UINT16)VREG_S( 2, 2), (UINT16)VREG_S( 2, 3), (UINT16)VREG_S( 2, 4), (UINT16)VREG_S( 2, 5), (UINT16)VREG_S( 2, 6), (UINT16)VREG_S( 2, 7)); | |
| 186 | 186 | break; |
| 187 | 187 | case RSP_V3: |
| 188 | str | |
| 188 | str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S( 3, 0), (UINT16)VREG_S( 3, 1), (UINT16)VREG_S( 3, 2), (UINT16)VREG_S( 3, 3), (UINT16)VREG_S( 3, 4), (UINT16)VREG_S( 3, 5), (UINT16)VREG_S( 3, 6), (UINT16)VREG_S( 3, 7)); | |
| 189 | 189 | break; |
| 190 | 190 | case RSP_V4: |
| 191 | str | |
| 191 | str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S( 4, 0), (UINT16)VREG_S( 4, 1), (UINT16)VREG_S( 4, 2), (UINT16)VREG_S( 4, 3), (UINT16)VREG_S( 4, 4), (UINT16)VREG_S( 4, 5), (UINT16)VREG_S( 4, 6), (UINT16)VREG_S( 4, 7)); | |
| 192 | 192 | break; |
| 193 | 193 | case RSP_V5: |
| 194 | str | |
| 194 | str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S( 5, 0), (UINT16)VREG_S( 5, 1), (UINT16)VREG_S( 5, 2), (UINT16)VREG_S( 5, 3), (UINT16)VREG_S( 5, 4), (UINT16)VREG_S( 5, 5), (UINT16)VREG_S( 5, 6), (UINT16)VREG_S( 5, 7)); | |
| 195 | 195 | break; |
| 196 | 196 | case RSP_V6: |
| 197 | str | |
| 197 | str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S( 6, 0), (UINT16)VREG_S( 6, 1), (UINT16)VREG_S( 6, 2), (UINT16)VREG_S( 6, 3), (UINT16)VREG_S( 6, 4), (UINT16)VREG_S( 6, 5), (UINT16)VREG_S( 6, 6), (UINT16)VREG_S( 6, 7)); | |
| 198 | 198 | break; |
| 199 | 199 | case RSP_V7: |
| 200 | str | |
| 200 | str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S( 7, 0), (UINT16)VREG_S( 7, 1), (UINT16)VREG_S( 7, 2), (UINT16)VREG_S( 7, 3), (UINT16)VREG_S( 7, 4), (UINT16)VREG_S( 7, 5), (UINT16)VREG_S( 7, 6), (UINT16)VREG_S( 7, 7)); | |
| 201 | 201 | break; |
| 202 | 202 | case RSP_V8: |
| 203 | str | |
| 203 | str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S( 8, 0), (UINT16)VREG_S( 8, 1), (UINT16)VREG_S( 8, 2), (UINT16)VREG_S( 8, 3), (UINT16)VREG_S( 8, 4), (UINT16)VREG_S( 8, 5), (UINT16)VREG_S( 8, 6), (UINT16)VREG_S( 8, 7)); | |
| 204 | 204 | break; |
| 205 | 205 | case RSP_V9: |
| 206 | str | |
| 206 | str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S( 9, 0), (UINT16)VREG_S( 9, 1), (UINT16)VREG_S( 9, 2), (UINT16)VREG_S( 9, 3), (UINT16)VREG_S( 9, 4), (UINT16)VREG_S( 9, 5), (UINT16)VREG_S( 9, 6), (UINT16)VREG_S( 9, 7)); | |
| 207 | 207 | break; |
| 208 | 208 | case RSP_V10: |
| 209 | str | |
| 209 | str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(10, 0), (UINT16)VREG_S(10, 1), (UINT16)VREG_S(10, 2), (UINT16)VREG_S(10, 3), (UINT16)VREG_S(10, 4), (UINT16)VREG_S(10, 5), (UINT16)VREG_S(10, 6), (UINT16)VREG_S(10, 7)); | |
| 210 | 210 | break; |
| 211 | 211 | case RSP_V11: |
| 212 | str | |
| 212 | str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(11, 0), (UINT16)VREG_S(11, 1), (UINT16)VREG_S(11, 2), (UINT16)VREG_S(11, 3), (UINT16)VREG_S(11, 4), (UINT16)VREG_S(11, 5), (UINT16)VREG_S(11, 6), (UINT16)VREG_S(11, 7)); | |
| 213 | 213 | break; |
| 214 | 214 | case RSP_V12: |
| 215 | str | |
| 215 | str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(12, 0), (UINT16)VREG_S(12, 1), (UINT16)VREG_S(12, 2), (UINT16)VREG_S(12, 3), (UINT16)VREG_S(12, 4), (UINT16)VREG_S(12, 5), (UINT16)VREG_S(12, 6), (UINT16)VREG_S(12, 7)); | |
| 216 | 216 | break; |
| 217 | 217 | case RSP_V13: |
| 218 | str | |
| 218 | str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(13, 0), (UINT16)VREG_S(13, 1), (UINT16)VREG_S(13, 2), (UINT16)VREG_S(13, 3), (UINT16)VREG_S(13, 4), (UINT16)VREG_S(13, 5), (UINT16)VREG_S(13, 6), (UINT16)VREG_S(13, 7)); | |
| 219 | 219 | break; |
| 220 | 220 | case RSP_V14: |
| 221 | str | |
| 221 | str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(14, 0), (UINT16)VREG_S(14, 1), (UINT16)VREG_S(14, 2), (UINT16)VREG_S(14, 3), (UINT16)VREG_S(14, 4), (UINT16)VREG_S(14, 5), (UINT16)VREG_S(14, 6), (UINT16)VREG_S(14, 7)); | |
| 222 | 222 | break; |
| 223 | 223 | case RSP_V15: |
| 224 | str | |
| 224 | str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(15, 0), (UINT16)VREG_S(15, 1), (UINT16)VREG_S(15, 2), (UINT16)VREG_S(15, 3), (UINT16)VREG_S(15, 4), (UINT16)VREG_S(15, 5), (UINT16)VREG_S(15, 6), (UINT16)VREG_S(15, 7)); | |
| 225 | 225 | break; |
| 226 | 226 | case RSP_V16: |
| 227 | str | |
| 227 | str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(16, 0), (UINT16)VREG_S(16, 1), (UINT16)VREG_S(16, 2), (UINT16)VREG_S(16, 3), (UINT16)VREG_S(16, 4), (UINT16)VREG_S(16, 5), (UINT16)VREG_S(16, 6), (UINT16)VREG_S(16, 7)); | |
| 228 | 228 | break; |
| 229 | 229 | case RSP_V17: |
| 230 | str | |
| 230 | str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(17, 0), (UINT16)VREG_S(17, 1), (UINT16)VREG_S(17, 2), (UINT16)VREG_S(17, 3), (UINT16)VREG_S(17, 4), (UINT16)VREG_S(17, 5), (UINT16)VREG_S(17, 6), (UINT16)VREG_S(17, 7)); | |
| 231 | 231 | break; |
| 232 | 232 | case RSP_V18: |
| 233 | str | |
| 233 | str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(18, 0), (UINT16)VREG_S(18, 1), (UINT16)VREG_S(18, 2), (UINT16)VREG_S(18, 3), (UINT16)VREG_S(18, 4), (UINT16)VREG_S(18, 5), (UINT16)VREG_S(18, 6), (UINT16)VREG_S(18, 7)); | |
| 234 | 234 | break; |
| 235 | 235 | case RSP_V19: |
| 236 | str | |
| 236 | str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(19, 0), (UINT16)VREG_S(19, 1), (UINT16)VREG_S(19, 2), (UINT16)VREG_S(19, 3), (UINT16)VREG_S(19, 4), (UINT16)VREG_S(19, 5), (UINT16)VREG_S(19, 6), (UINT16)VREG_S(19, 7)); | |
| 237 | 237 | break; |
| 238 | 238 | case RSP_V20: |
| 239 | str | |
| 239 | str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(20, 0), (UINT16)VREG_S(20, 1), (UINT16)VREG_S(20, 2), (UINT16)VREG_S(20, 3), (UINT16)VREG_S(20, 4), (UINT16)VREG_S(20, 5), (UINT16)VREG_S(20, 6), (UINT16)VREG_S(20, 7)); | |
| 240 | 240 | break; |
| 241 | 241 | case RSP_V21: |
| 242 | str | |
| 242 | str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(21, 0), (UINT16)VREG_S(21, 1), (UINT16)VREG_S(21, 2), (UINT16)VREG_S(21, 3), (UINT16)VREG_S(21, 4), (UINT16)VREG_S(21, 5), (UINT16)VREG_S(21, 6), (UINT16)VREG_S(21, 7)); | |
| 243 | 243 | break; |
| 244 | 244 | case RSP_V22: |
| 245 | str | |
| 245 | str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(22, 0), (UINT16)VREG_S(22, 1), (UINT16)VREG_S(22, 2), (UINT16)VREG_S(22, 3), (UINT16)VREG_S(22, 4), (UINT16)VREG_S(22, 5), (UINT16)VREG_S(22, 6), (UINT16)VREG_S(22, 7)); | |
| 246 | 246 | break; |
| 247 | 247 | case RSP_V23: |
| 248 | str | |
| 248 | str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(23, 0), (UINT16)VREG_S(23, 1), (UINT16)VREG_S(23, 2), (UINT16)VREG_S(23, 3), (UINT16)VREG_S(23, 4), (UINT16)VREG_S(23, 5), (UINT16)VREG_S(23, 6), (UINT16)VREG_S(23, 7)); | |
| 249 | 249 | break; |
| 250 | 250 | case RSP_V24: |
| 251 | str | |
| 251 | str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(24, 0), (UINT16)VREG_S(24, 1), (UINT16)VREG_S(24, 2), (UINT16)VREG_S(24, 3), (UINT16)VREG_S(24, 4), (UINT16)VREG_S(24, 5), (UINT16)VREG_S(24, 6), (UINT16)VREG_S(24, 7)); | |
| 252 | 252 | break; |
| 253 | 253 | case RSP_V25: |
| 254 | str | |
| 254 | str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(25, 0), (UINT16)VREG_S(25, 1), (UINT16)VREG_S(25, 2), (UINT16)VREG_S(25, 3), (UINT16)VREG_S(25, 4), (UINT16)VREG_S(25, 5), (UINT16)VREG_S(25, 6), (UINT16)VREG_S(25, 7)); | |
| 255 | 255 | break; |
| 256 | 256 | case RSP_V26: |
| 257 | str | |
| 257 | str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(26, 0), (UINT16)VREG_S(26, 1), (UINT16)VREG_S(26, 2), (UINT16)VREG_S(26, 3), (UINT16)VREG_S(26, 4), (UINT16)VREG_S(26, 5), (UINT16)VREG_S(26, 6), (UINT16)VREG_S(26, 7)); | |
| 258 | 258 | break; |
| 259 | 259 | case RSP_V27: |
| 260 | str | |
| 260 | str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(27, 0), (UINT16)VREG_S(27, 1), (UINT16)VREG_S(27, 2), (UINT16)VREG_S(27, 3), (UINT16)VREG_S(27, 4), (UINT16)VREG_S(27, 5), (UINT16)VREG_S(27, 6), (UINT16)VREG_S(27, 7)); | |
| 261 | 261 | break; |
| 262 | 262 | case RSP_V28: |
| 263 | str | |
| 263 | str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(28, 0), (UINT16)VREG_S(28, 1), (UINT16)VREG_S(28, 2), (UINT16)VREG_S(28, 3), (UINT16)VREG_S(28, 4), (UINT16)VREG_S(28, 5), (UINT16)VREG_S(28, 6), (UINT16)VREG_S(28, 7)); | |
| 264 | 264 | break; |
| 265 | 265 | case RSP_V29: |
| 266 | str | |
| 266 | str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(29, 0), (UINT16)VREG_S(29, 1), (UINT16)VREG_S(29, 2), (UINT16)VREG_S(29, 3), (UINT16)VREG_S(29, 4), (UINT16)VREG_S(29, 5), (UINT16)VREG_S(29, 6), (UINT16)VREG_S(29, 7)); | |
| 267 | 267 | break; |
| 268 | 268 | case RSP_V30: |
| 269 | str | |
| 269 | str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(30, 0), (UINT16)VREG_S(30, 1), (UINT16)VREG_S(30, 2), (UINT16)VREG_S(30, 3), (UINT16)VREG_S(30, 4), (UINT16)VREG_S(30, 5), (UINT16)VREG_S(30, 6), (UINT16)VREG_S(30, 7)); | |
| 270 | 270 | break; |
| 271 | 271 | case RSP_V31: |
| 272 | str | |
| 272 | str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(31, 0), (UINT16)VREG_S(31, 1), (UINT16)VREG_S(31, 2), (UINT16)VREG_S(31, 3), (UINT16)VREG_S(31, 4), (UINT16)VREG_S(31, 5), (UINT16)VREG_S(31, 6), (UINT16)VREG_S(31, 7)); | |
| 273 | 273 | break; |
| 274 | 274 | } |
| 275 | 275 | } |
| r245649 | r245650 | |
|---|---|---|
| 52 | 52 | virtual int generate_lwc2(drcuml_block *block, rsp_device::compiler_state *compiler, const opcode_desc *desc) { return TRUE; } |
| 53 | 53 | virtual int generate_swc2(drcuml_block *block, rsp_device::compiler_state *compiler, const opcode_desc *desc) { return TRUE; } |
| 54 | 54 | |
| 55 | virtual void state_string_export(const int index, astring &str | |
| 55 | virtual void state_string_export(const int index, astring &str); | |
| 56 | 56 | |
| 57 | 57 | public: |
| 58 | 58 | virtual ~rsp_cop2(); |
| r245649 | r245650 | |
|---|---|---|
| 150 | 150 | ((rsp_cop2 *)param)->cfunc_unimplemented_opcode(); |
| 151 | 151 | } |
| 152 | 152 | |
| 153 | void rsp_cop2_drc::state_string_export(const int index, astring &str | |
| 153 | void rsp_cop2_drc::state_string_export(const int index, astring &str) | |
| 154 | 154 | { |
| 155 | 155 | switch (index) |
| 156 | 156 | { |
| 157 | 157 | case RSP_V0: |
| 158 | str | |
| 158 | str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S( 0, 0), (UINT16)VREG_S( 0, 1), (UINT16)VREG_S( 0, 2), (UINT16)VREG_S( 0, 3), (UINT16)VREG_S( 0, 4), (UINT16)VREG_S( 0, 5), (UINT16)VREG_S( 0, 6), (UINT16)VREG_S( 0, 7)); | |
| 159 | 159 | break; |
| 160 | 160 | case RSP_V1: |
| 161 | str | |
| 161 | str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S( 1, 0), (UINT16)VREG_S( 1, 1), (UINT16)VREG_S( 1, 2), (UINT16)VREG_S( 1, 3), (UINT16)VREG_S( 1, 4), (UINT16)VREG_S( 1, 5), (UINT16)VREG_S( 1, 6), (UINT16)VREG_S( 1, 7)); | |
| 162 | 162 | break; |
| 163 | 163 | case RSP_V2: |
| 164 | str | |
| 164 | str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S( 2, 0), (UINT16)VREG_S( 2, 1), (UINT16)VREG_S( 2, 2), (UINT16)VREG_S( 2, 3), (UINT16)VREG_S( 2, 4), (UINT16)VREG_S( 2, 5), (UINT16)VREG_S( 2, 6), (UINT16)VREG_S( 2, 7)); | |
| 165 | 165 | break; |
| 166 | 166 | case RSP_V3: |
| 167 | str | |
| 167 | str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S( 3, 0), (UINT16)VREG_S( 3, 1), (UINT16)VREG_S( 3, 2), (UINT16)VREG_S( 3, 3), (UINT16)VREG_S( 3, 4), (UINT16)VREG_S( 3, 5), (UINT16)VREG_S( 3, 6), (UINT16)VREG_S( 3, 7)); | |
| 168 | 168 | break; |
| 169 | 169 | case RSP_V4: |
| 170 | str | |
| 170 | str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S( 4, 0), (UINT16)VREG_S( 4, 1), (UINT16)VREG_S( 4, 2), (UINT16)VREG_S( 4, 3), (UINT16)VREG_S( 4, 4), (UINT16)VREG_S( 4, 5), (UINT16)VREG_S( 4, 6), (UINT16)VREG_S( 4, 7)); | |
| 171 | 171 | break; |
| 172 | 172 | case RSP_V5: |
| 173 | str | |
| 173 | str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S( 5, 0), (UINT16)VREG_S( 5, 1), (UINT16)VREG_S( 5, 2), (UINT16)VREG_S( 5, 3), (UINT16)VREG_S( 5, 4), (UINT16)VREG_S( 5, 5), (UINT16)VREG_S( 5, 6), (UINT16)VREG_S( 5, 7)); | |
| 174 | 174 | break; |
| 175 | 175 | case RSP_V6: |
| 176 | str | |
| 176 | str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S( 6, 0), (UINT16)VREG_S( 6, 1), (UINT16)VREG_S( 6, 2), (UINT16)VREG_S( 6, 3), (UINT16)VREG_S( 6, 4), (UINT16)VREG_S( 6, 5), (UINT16)VREG_S( 6, 6), (UINT16)VREG_S( 6, 7)); | |
| 177 | 177 | break; |
| 178 | 178 | case RSP_V7: |
| 179 | str | |
| 179 | str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S( 7, 0), (UINT16)VREG_S( 7, 1), (UINT16)VREG_S( 7, 2), (UINT16)VREG_S( 7, 3), (UINT16)VREG_S( 7, 4), (UINT16)VREG_S( 7, 5), (UINT16)VREG_S( 7, 6), (UINT16)VREG_S( 7, 7)); | |
| 180 | 180 | break; |
| 181 | 181 | case RSP_V8: |
| 182 | str | |
| 182 | str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S( 8, 0), (UINT16)VREG_S( 8, 1), (UINT16)VREG_S( 8, 2), (UINT16)VREG_S( 8, 3), (UINT16)VREG_S( 8, 4), (UINT16)VREG_S( 8, 5), (UINT16)VREG_S( 8, 6), (UINT16)VREG_S( 8, 7)); | |
| 183 | 183 | break; |
| 184 | 184 | case RSP_V9: |
| 185 | str | |
| 185 | str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S( 9, 0), (UINT16)VREG_S( 9, 1), (UINT16)VREG_S( 9, 2), (UINT16)VREG_S( 9, 3), (UINT16)VREG_S( 9, 4), (UINT16)VREG_S( 9, 5), (UINT16)VREG_S( 9, 6), (UINT16)VREG_S( 9, 7)); | |
| 186 | 186 | break; |
| 187 | 187 | case RSP_V10: |
| 188 | str | |
| 188 | str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(10, 0), (UINT16)VREG_S(10, 1), (UINT16)VREG_S(10, 2), (UINT16)VREG_S(10, 3), (UINT16)VREG_S(10, 4), (UINT16)VREG_S(10, 5), (UINT16)VREG_S(10, 6), (UINT16)VREG_S(10, 7)); | |
| 189 | 189 | break; |
| 190 | 190 | case RSP_V11: |
| 191 | str | |
| 191 | str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(11, 0), (UINT16)VREG_S(11, 1), (UINT16)VREG_S(11, 2), (UINT16)VREG_S(11, 3), (UINT16)VREG_S(11, 4), (UINT16)VREG_S(11, 5), (UINT16)VREG_S(11, 6), (UINT16)VREG_S(11, 7)); | |
| 192 | 192 | break; |
| 193 | 193 | case RSP_V12: |
| 194 | str | |
| 194 | str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(12, 0), (UINT16)VREG_S(12, 1), (UINT16)VREG_S(12, 2), (UINT16)VREG_S(12, 3), (UINT16)VREG_S(12, 4), (UINT16)VREG_S(12, 5), (UINT16)VREG_S(12, 6), (UINT16)VREG_S(12, 7)); | |
| 195 | 195 | break; |
| 196 | 196 | case RSP_V13: |
| 197 | str | |
| 197 | str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(13, 0), (UINT16)VREG_S(13, 1), (UINT16)VREG_S(13, 2), (UINT16)VREG_S(13, 3), (UINT16)VREG_S(13, 4), (UINT16)VREG_S(13, 5), (UINT16)VREG_S(13, 6), (UINT16)VREG_S(13, 7)); | |
| 198 | 198 | break; |
| 199 | 199 | case RSP_V14: |
| 200 | str | |
| 200 | str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(14, 0), (UINT16)VREG_S(14, 1), (UINT16)VREG_S(14, 2), (UINT16)VREG_S(14, 3), (UINT16)VREG_S(14, 4), (UINT16)VREG_S(14, 5), (UINT16)VREG_S(14, 6), (UINT16)VREG_S(14, 7)); | |
| 201 | 201 | break; |
| 202 | 202 | case RSP_V15: |
| 203 | str | |
| 203 | str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(15, 0), (UINT16)VREG_S(15, 1), (UINT16)VREG_S(15, 2), (UINT16)VREG_S(15, 3), (UINT16)VREG_S(15, 4), (UINT16)VREG_S(15, 5), (UINT16)VREG_S(15, 6), (UINT16)VREG_S(15, 7)); | |
| 204 | 204 | break; |
| 205 | 205 | case RSP_V16: |
| 206 | str | |
| 206 | str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(16, 0), (UINT16)VREG_S(16, 1), (UINT16)VREG_S(16, 2), (UINT16)VREG_S(16, 3), (UINT16)VREG_S(16, 4), (UINT16)VREG_S(16, 5), (UINT16)VREG_S(16, 6), (UINT16)VREG_S(16, 7)); | |
| 207 | 207 | break; |
| 208 | 208 | case RSP_V17: |
| 209 | str | |
| 209 | str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(17, 0), (UINT16)VREG_S(17, 1), (UINT16)VREG_S(17, 2), (UINT16)VREG_S(17, 3), (UINT16)VREG_S(17, 4), (UINT16)VREG_S(17, 5), (UINT16)VREG_S(17, 6), (UINT16)VREG_S(17, 7)); | |
| 210 | 210 | break; |
| 211 | 211 | case RSP_V18: |
| 212 | str | |
| 212 | str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(18, 0), (UINT16)VREG_S(18, 1), (UINT16)VREG_S(18, 2), (UINT16)VREG_S(18, 3), (UINT16)VREG_S(18, 4), (UINT16)VREG_S(18, 5), (UINT16)VREG_S(18, 6), (UINT16)VREG_S(18, 7)); | |
| 213 | 213 | break; |
| 214 | 214 | case RSP_V19: |
| 215 | str | |
| 215 | str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(19, 0), (UINT16)VREG_S(19, 1), (UINT16)VREG_S(19, 2), (UINT16)VREG_S(19, 3), (UINT16)VREG_S(19, 4), (UINT16)VREG_S(19, 5), (UINT16)VREG_S(19, 6), (UINT16)VREG_S(19, 7)); | |
| 216 | 216 | break; |
| 217 | 217 | case RSP_V20: |
| 218 | str | |
| 218 | str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(20, 0), (UINT16)VREG_S(20, 1), (UINT16)VREG_S(20, 2), (UINT16)VREG_S(20, 3), (UINT16)VREG_S(20, 4), (UINT16)VREG_S(20, 5), (UINT16)VREG_S(20, 6), (UINT16)VREG_S(20, 7)); | |
| 219 | 219 | break; |
| 220 | 220 | case RSP_V21: |
| 221 | str | |
| 221 | str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(21, 0), (UINT16)VREG_S(21, 1), (UINT16)VREG_S(21, 2), (UINT16)VREG_S(21, 3), (UINT16)VREG_S(21, 4), (UINT16)VREG_S(21, 5), (UINT16)VREG_S(21, 6), (UINT16)VREG_S(21, 7)); | |
| 222 | 222 | break; |
| 223 | 223 | case RSP_V22: |
| 224 | str | |
| 224 | str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(22, 0), (UINT16)VREG_S(22, 1), (UINT16)VREG_S(22, 2), (UINT16)VREG_S(22, 3), (UINT16)VREG_S(22, 4), (UINT16)VREG_S(22, 5), (UINT16)VREG_S(22, 6), (UINT16)VREG_S(22, 7)); | |
| 225 | 225 | break; |
| 226 | 226 | case RSP_V23: |
| 227 | str | |
| 227 | str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(23, 0), (UINT16)VREG_S(23, 1), (UINT16)VREG_S(23, 2), (UINT16)VREG_S(23, 3), (UINT16)VREG_S(23, 4), (UINT16)VREG_S(23, 5), (UINT16)VREG_S(23, 6), (UINT16)VREG_S(23, 7)); | |
| 228 | 228 | break; |
| 229 | 229 | case RSP_V24: |
| 230 | str | |
| 230 | str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(24, 0), (UINT16)VREG_S(24, 1), (UINT16)VREG_S(24, 2), (UINT16)VREG_S(24, 3), (UINT16)VREG_S(24, 4), (UINT16)VREG_S(24, 5), (UINT16)VREG_S(24, 6), (UINT16)VREG_S(24, 7)); | |
| 231 | 231 | break; |
| 232 | 232 | case RSP_V25: |
| 233 | str | |
| 233 | str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(25, 0), (UINT16)VREG_S(25, 1), (UINT16)VREG_S(25, 2), (UINT16)VREG_S(25, 3), (UINT16)VREG_S(25, 4), (UINT16)VREG_S(25, 5), (UINT16)VREG_S(25, 6), (UINT16)VREG_S(25, 7)); | |
| 234 | 234 | break; |
| 235 | 235 | case RSP_V26: |
| 236 | str | |
| 236 | str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(26, 0), (UINT16)VREG_S(26, 1), (UINT16)VREG_S(26, 2), (UINT16)VREG_S(26, 3), (UINT16)VREG_S(26, 4), (UINT16)VREG_S(26, 5), (UINT16)VREG_S(26, 6), (UINT16)VREG_S(26, 7)); | |
| 237 | 237 | break; |
| 238 | 238 | case RSP_V27: |
| 239 | str | |
| 239 | str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(27, 0), (UINT16)VREG_S(27, 1), (UINT16)VREG_S(27, 2), (UINT16)VREG_S(27, 3), (UINT16)VREG_S(27, 4), (UINT16)VREG_S(27, 5), (UINT16)VREG_S(27, 6), (UINT16)VREG_S(27, 7)); | |
| 240 | 240 | break; |
| 241 | 241 | case RSP_V28: |
| 242 | str | |
| 242 | str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(28, 0), (UINT16)VREG_S(28, 1), (UINT16)VREG_S(28, 2), (UINT16)VREG_S(28, 3), (UINT16)VREG_S(28, 4), (UINT16)VREG_S(28, 5), (UINT16)VREG_S(28, 6), (UINT16)VREG_S(28, 7)); | |
| 243 | 243 | break; |
| 244 | 244 | case RSP_V29: |
| 245 | str | |
| 245 | str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(29, 0), (UINT16)VREG_S(29, 1), (UINT16)VREG_S(29, 2), (UINT16)VREG_S(29, 3), (UINT16)VREG_S(29, 4), (UINT16)VREG_S(29, 5), (UINT16)VREG_S(29, 6), (UINT16)VREG_S(29, 7)); | |
| 246 | 246 | break; |
| 247 | 247 | case RSP_V30: |
| 248 | str | |
| 248 | str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(30, 0), (UINT16)VREG_S(30, 1), (UINT16)VREG_S(30, 2), (UINT16)VREG_S(30, 3), (UINT16)VREG_S(30, 4), (UINT16)VREG_S(30, 5), (UINT16)VREG_S(30, 6), (UINT16)VREG_S(30, 7)); | |
| 249 | 249 | break; |
| 250 | 250 | case RSP_V31: |
| 251 | str | |
| 251 | str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(31, 0), (UINT16)VREG_S(31, 1), (UINT16)VREG_S(31, 2), (UINT16)VREG_S(31, 3), (UINT16)VREG_S(31, 4), (UINT16)VREG_S(31, 5), (UINT16)VREG_S(31, 6), (UINT16)VREG_S(31, 7)); | |
| 252 | 252 | break; |
| 253 | 253 | } |
| 254 | 254 | } |
| r245649 | r245650 | |
|---|---|---|
| 30 | 30 | virtual int generate_lwc2(drcuml_block *block, rsp_device::compiler_state *compiler, const opcode_desc *desc); |
| 31 | 31 | virtual int generate_swc2(drcuml_block *block, rsp_device::compiler_state *compiler, const opcode_desc *desc); |
| 32 | 32 | |
| 33 | virtual void state_string_export(const int index, astring &str | |
| 33 | virtual void state_string_export(const int index, astring &str); | |
| 34 | 34 | |
| 35 | 35 | void cfunc_unimplemented_opcode(); |
| 36 | 36 | public: |
| r245649 | r245650 | |
|---|---|---|
| 295 | 295 | vec_flag_reverse = _mm_set_epi16(0x0100, 0x0302, 0x0504, 0x0706, 0x0908, 0x0b0a, 0x0d0c, 0x0f0e); |
| 296 | 296 | } |
| 297 | 297 | |
| 298 | void rsp_cop2_simd::state_string_export(const int index, astring &str | |
| 298 | void rsp_cop2_simd::state_string_export(const int index, astring &str) | |
| 299 | 299 | { |
| 300 | 300 | switch (index) |
| 301 | 301 | { |
| r245649 | r245650 | |
|---|---|---|
| 32 | 32 | virtual int generate_lwc2(drcuml_block *block, rsp_device::compiler_state *compiler, const opcode_desc *desc); |
| 33 | 33 | virtual int generate_swc2(drcuml_block *block, rsp_device::compiler_state *compiler, const opcode_desc *desc); |
| 34 | 34 | |
| 35 | virtual void state_string_export(const int index, astring &str | |
| 35 | virtual void state_string_export(const int index, astring &str); | |
| 36 | 36 | |
| 37 | 37 | public: |
| 38 | 38 | virtual void lbv(); |
| r245649 | r245650 | |
|---|---|---|
| 870 | 870 | } |
| 871 | 871 | } |
| 872 | 872 | |
| 873 | void s2650_device::state_string_export(const device_state_entry &entry, astring &str | |
| 873 | void s2650_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 874 | 874 | { |
| 875 | 875 | switch (entry.index()) |
| 876 | 876 | { |
| 877 | 877 | case STATE_GENFLAGS: |
| 878 | str | |
| 878 | str.printf("%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c", | |
| 879 | 879 | m_psu & 0x80 ? 'S':'.', |
| 880 | 880 | m_psu & 0x40 ? 'O':'.', |
| 881 | 881 | m_psu & 0x20 ? 'I':'.', |
| r245649 | r245650 | |
|---|---|---|
| 60 | 60 | // device_state_interface overrides |
| 61 | 61 | virtual void state_import(const device_state_entry &entry); |
| 62 | 62 | virtual void state_export(const device_state_entry &entry); |
| 63 | void state_string_export(const device_state_entry &entry, astring &str | |
| 63 | void state_string_export(const device_state_entry &entry, astring &str); | |
| 64 | 64 | |
| 65 | 65 | // device_disasm_interface overrides |
| 66 | 66 | virtual UINT32 disasm_min_opcode_bytes() const { return 1; } |
| r245649 | r245650 | |
|---|---|---|
| 181 | 181 | m_icountptr = &m_icount; |
| 182 | 182 | } |
| 183 | 183 | |
| 184 | void saturn_device::state_string_export(const device_state_entry &entry, astring &str | |
| 184 | void saturn_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 185 | 185 | { |
| 186 | 186 | #define Reg64Data(s) s[15],s[14],s[13],s[12],s[11],s[10],s[9],s[8],s[7],s[6],s[5],s[4],s[3],s[2],s[1],s[0] |
| 187 | 187 | #define Reg64Format "%x %x%x%x%x%x%x%x %x%x%x %x%x%x%x%x" |
| r245649 | r245650 | |
| 189 | 189 | switch (entry.index()) |
| 190 | 190 | { |
| 191 | 191 | case SATURN_A: |
| 192 | str | |
| 192 | str.printf( Reg64Format, Reg64Data(m_reg[A]) ); | |
| 193 | 193 | break; |
| 194 | 194 | |
| 195 | 195 | case SATURN_B: |
| 196 | str | |
| 196 | str.printf( Reg64Format, Reg64Data(m_reg[B]) ); | |
| 197 | 197 | break; |
| 198 | 198 | |
| 199 | 199 | case SATURN_C: |
| 200 | str | |
| 200 | str.printf( Reg64Format, Reg64Data(m_reg[C]) ); | |
| 201 | 201 | break; |
| 202 | 202 | |
| 203 | 203 | case SATURN_D: |
| 204 | str | |
| 204 | str.printf( Reg64Format, Reg64Data(m_reg[D]) ); | |
| 205 | 205 | break; |
| 206 | 206 | |
| 207 | 207 | case SATURN_R0: |
| 208 | str | |
| 208 | str.printf( Reg64Format, Reg64Data(m_reg[R0]) ); | |
| 209 | 209 | break; |
| 210 | 210 | |
| 211 | 211 | case SATURN_R1: |
| 212 | str | |
| 212 | str.printf( Reg64Format, Reg64Data(m_reg[R1]) ); | |
| 213 | 213 | break; |
| 214 | 214 | |
| 215 | 215 | case SATURN_R2: |
| 216 | str | |
| 216 | str.printf( Reg64Format, Reg64Data(m_reg[R2]) ); | |
| 217 | 217 | break; |
| 218 | 218 | |
| 219 | 219 | case SATURN_R3: |
| 220 | str | |
| 220 | str.printf( Reg64Format, Reg64Data(m_reg[R3]) ); | |
| 221 | 221 | break; |
| 222 | 222 | |
| 223 | 223 | case SATURN_R4: |
| 224 | str | |
| 224 | str.printf( Reg64Format, Reg64Data(m_reg[R4]) ); | |
| 225 | 225 | break; |
| 226 | 226 | |
| 227 | 227 | case SATURN_IRQ_STATE: |
| 228 | str | |
| 228 | str.printf( "%c%c%c%i", m_in_irq?'S':'.', m_irq_enable?'e':'.', m_pending_irq?'p':'.', m_irq_state ); | |
| 229 | 229 | break; |
| 230 | 230 | |
| 231 | 231 | case STATE_GENFLAGS: |
| 232 | str | |
| 232 | str.printf( "%c%c", m_decimal?'D':'.', m_carry ? 'C':'.' ); | |
| 233 | 233 | break; |
| 234 | 234 | } |
| 235 | 235 | } |
| r245649 | r245650 | |
|---|---|---|
| 117 | 117 | virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; } |
| 118 | 118 | |
| 119 | 119 | // device_state_interface overrides |
| 120 | void state_string_export(const device_state_entry &entry, astring &str | |
| 120 | void state_string_export(const device_state_entry &entry, astring &str); | |
| 121 | 121 | virtual void state_import(const device_state_entry &entry); |
| 122 | 122 | virtual void state_export(const device_state_entry &entry); |
| 123 | 123 |
| r245649 | r245650 | |
|---|---|---|
| 181 | 181 | } |
| 182 | 182 | |
| 183 | 183 | |
| 184 | void sc61860_device::state_string_export(const device_state_entry &entry, astring &str | |
| 184 | void sc61860_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 185 | 185 | { |
| 186 | 186 | switch (entry.index()) |
| 187 | 187 | { |
| 188 | 188 | case STATE_GENFLAGS: |
| 189 | str | |
| 189 | str.printf("%c%c", m_zero ? 'Z' : '.', m_carry ? 'C' : '.'); | |
| 190 | 190 | break; |
| 191 | 191 | } |
| 192 | 192 | } |
| r245649 | r245650 | |
|---|---|---|
| 116 | 116 | // device_state_interface overrides |
| 117 | 117 | virtual void state_import(const device_state_entry &entry); |
| 118 | 118 | virtual void state_export(const device_state_entry &entry); |
| 119 | void state_string_export(const device_state_entry &entry, astring &str | |
| 119 | void state_string_export(const device_state_entry &entry, astring &str); | |
| 120 | 120 | |
| 121 | 121 | // device_disasm_interface overrides |
| 122 | 122 | virtual UINT32 disasm_min_opcode_bytes() const { return 1; } |
| r245649 | r245650 | |
|---|---|---|
| 547 | 547 | COMMON STATE IMPORT/EXPORT |
| 548 | 548 | ***************************************************************************/ |
| 549 | 549 | |
| 550 | void scmp_device::state_string_export(const device_state_entry &entry, astring &str | |
| 550 | void scmp_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 551 | 551 | { |
| 552 | 552 | switch (entry.index()) |
| 553 | 553 | { |
| 554 | 554 | case STATE_GENFLAGS: |
| 555 | str | |
| 555 | str.printf("%c%c%c%c%c%c%c%c", | |
| 556 | 556 | (m_SR & 0x80) ? 'C' : '.', |
| 557 | 557 | (m_SR & 0x40) ? 'V' : '.', |
| 558 | 558 | (m_SR & 0x20) ? 'B' : '.', |
| r245649 | r245650 | |
|---|---|---|
| 56 | 56 | virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; } |
| 57 | 57 | |
| 58 | 58 | // device_state_interface overrides |
| 59 | void state_string_export(const device_state_entry &entry, astring &str | |
| 59 | void state_string_export(const device_state_entry &entry, astring &str); | |
| 60 | 60 | |
| 61 | 61 | // device_disasm_interface overrides |
| 62 | 62 | virtual UINT32 disasm_min_opcode_bytes() const { return 1; } |
| r245649 | r245650 | |
|---|---|---|
| 132 | 132 | // for the debugger |
| 133 | 133 | //------------------------------------------------- |
| 134 | 134 | |
| 135 | void score7_cpu_device::state_string_export(const device_state_entry &entry, astring &str | |
| 135 | void score7_cpu_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 136 | 136 | { |
| 137 | 137 | switch (entry.index()) |
| 138 | 138 | { |
| 139 | 139 | case STATE_GENFLAGS: |
| 140 | str | |
| 140 | str.printf("%s%s%s%s%s", | |
| 141 | 141 | REG_CR & FLAG_V ? "V" : ".", |
| 142 | 142 | REG_CR & FLAG_C ? "C" : ".", |
| 143 | 143 | REG_CR & FLAG_Z ? "Z" : ".", |
| r245649 | r245650 | |
|---|---|---|
| 47 | 47 | virtual void execute_set_input(int inputnum, int state); |
| 48 | 48 | |
| 49 | 49 | // device_state_interface overrides |
| 50 | void state_string_export(const device_state_entry &entry, astring &str | |
| 50 | void state_string_export(const device_state_entry &entry, astring &str); | |
| 51 | 51 | |
| 52 | 52 | // device_memory_interface overrides |
| 53 | 53 | virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const; |
| r245649 | r245650 | |
|---|---|---|
| 1021 | 1021 | } |
| 1022 | 1022 | |
| 1023 | 1023 | |
| 1024 | void scudsp_cpu_device::state_string_export(const device_state_entry &entry, astring &str | |
| 1024 | void scudsp_cpu_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 1025 | 1025 | { |
| 1026 | 1026 | switch (entry.index()) |
| 1027 | 1027 | { |
| 1028 | 1028 | case STATE_GENFLAGS: |
| 1029 | str | |
| 1029 | str.printf("%s%s%s%c%c%c%c%c%s%s%s", | |
| 1030 | 1030 | m_flags & 0x4000000 ? "PR":"..", |
| 1031 | 1031 | m_flags & 0x2000000 ? "EP":"..", |
| 1032 | 1032 | m_flags & 0x800000 ? "T0":"..", |
| r245649 | r245650 | |
|---|---|---|
| 94 | 94 | virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_DATA) ? &m_data_config : NULL ); } |
| 95 | 95 | |
| 96 | 96 | // device_state_interface overrides |
| 97 | void state_string_export(const device_state_entry &entry, astring &str | |
| 97 | void state_string_export(const device_state_entry &entry, astring &str); | |
| 98 | 98 | |
| 99 | 99 | // device_disasm_interface overrides |
| 100 | 100 | virtual UINT32 disasm_min_opcode_bytes() const { return 4; } |
| r245649 | r245650 | |
|---|---|---|
| 1795 | 1795 | } |
| 1796 | 1796 | |
| 1797 | 1797 | |
| 1798 | void se3208_device::state_string_export(const device_state_entry &entry, astring &str | |
| 1798 | void se3208_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 1799 | 1799 | { |
| 1800 | 1800 | switch (entry.index()) |
| 1801 | 1801 | { |
| 1802 | 1802 | case STATE_GENFLAGS: |
| 1803 | str | |
| 1803 | str.printf("%c%c%c%c %c%c%c%c%c", | |
| 1804 | 1804 | m_SR&FLAG_C?'C':'.', |
| 1805 | 1805 | m_SR&FLAG_V?'V':'.', |
| 1806 | 1806 | m_SR&FLAG_S?'S':'.', |
| r245649 | r245650 | |
|---|---|---|
| 30 | 30 | virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; } |
| 31 | 31 | |
| 32 | 32 | // device_state_interface overrides |
| 33 | void state_string_export(const device_state_entry &entry, astring &str | |
| 33 | void state_string_export(const device_state_entry &entry, astring &str); | |
| 34 | 34 | |
| 35 | 35 | // device_disasm_interface overrides |
| 36 | 36 | virtual UINT32 disasm_min_opcode_bytes() const { return 2; } |
| r245649 | r245650 | |
|---|---|---|
| 2610 | 2610 | } |
| 2611 | 2611 | |
| 2612 | 2612 | |
| 2613 | void sh2_device::state_string_export(const device_state_entry &entry, astring &str | |
| 2613 | void sh2_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 2614 | 2614 | { |
| 2615 | 2615 | switch (entry.index()) |
| 2616 | 2616 | { |
| 2617 | 2617 | case STATE_GENFLAGS: |
| 2618 | str | |
| 2618 | str.printf("%c%c%d%c%c", | |
| 2619 | 2619 | m_sh2_state->sr & M ? 'M':'.', |
| 2620 | 2620 | m_sh2_state->sr & Q ? 'Q':'.', |
| 2621 | 2621 | (m_sh2_state->sr & I) >> 4, |
| r245649 | r245650 | |
|---|---|---|
| 156 | 156 | // device_state_interface overrides |
| 157 | 157 | virtual void state_import(const device_state_entry &entry); |
| 158 | 158 | virtual void state_export(const device_state_entry &entry); |
| 159 | void state_string_export(const device_state_entry &entry, astring &str | |
| 159 | void state_string_export(const device_state_entry &entry, astring &str); | |
| 160 | 160 | |
| 161 | 161 | // device_disasm_interface overrides |
| 162 | 162 | virtual UINT32 disasm_min_opcode_bytes() const { return 2; } |
| r245649 | r245650 | |
|---|---|---|
| 4445 | 4445 | } |
| 4446 | 4446 | } |
| 4447 | 4447 | |
| 4448 | void sh34_base_device::state_string_export(const device_state_entry &entry, astring &str | |
| 4448 | void sh34_base_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 4449 | 4449 | { |
| 4450 | 4450 | #ifdef LSB_FIRST |
| 4451 | 4451 | UINT8 fpu_xor = m_fpu_pr; |
| r245649 | r245650 | |
| 4456 | 4456 | switch (entry.index()) |
| 4457 | 4457 | { |
| 4458 | 4458 | case STATE_GENFLAGS: |
| 4459 | str | |
| 4459 | str.printf("%s%s%s%s%c%c%d%c%c", | |
| 4460 | 4460 | m_sr & MD ? "MD ":" ", |
| 4461 | 4461 | m_sr & sRB ? "RB ":" ", |
| 4462 | 4462 | m_sr & BL ? "BL ":" ", |
| r245649 | r245650 | |
| 4469 | 4469 | break; |
| 4470 | 4470 | |
| 4471 | 4471 | case SH4_FR0: |
| 4472 | str | |
| 4472 | str.printf("%08X %f", m_fr[0 ^ fpu_xor], (double)FP_RFS(0 ^ fpu_xor)); | |
| 4473 | 4473 | break; |
| 4474 | 4474 | |
| 4475 | 4475 | case SH4_FR1: |
| 4476 | str | |
| 4476 | str.printf("%08X %f", m_fr[1 ^ fpu_xor], (double)FP_RFS(1 ^ fpu_xor)); | |
| 4477 | 4477 | break; |
| 4478 | 4478 | |
| 4479 | 4479 | case SH4_FR2: |
| 4480 | str | |
| 4480 | str.printf("%08X %f", m_fr[2 ^ fpu_xor], (double)FP_RFS(2 ^ fpu_xor)); | |
| 4481 | 4481 | break; |
| 4482 | 4482 | |
| 4483 | 4483 | case SH4_FR3: |
| 4484 | str | |
| 4484 | str.printf("%08X %f", m_fr[3 ^ fpu_xor], (double)FP_RFS(3 ^ fpu_xor)); | |
| 4485 | 4485 | break; |
| 4486 | 4486 | |
| 4487 | 4487 | case SH4_FR4: |
| 4488 | str | |
| 4488 | str.printf("%08X %f", m_fr[4 ^ fpu_xor], (double)FP_RFS(4 ^ fpu_xor)); | |
| 4489 | 4489 | break; |
| 4490 | 4490 | |
| 4491 | 4491 | case SH4_FR5: |
| 4492 | str | |
| 4492 | str.printf("%08X %f", m_fr[5 ^ fpu_xor], (double)FP_RFS(5 ^ fpu_xor)); | |
| 4493 | 4493 | break; |
| 4494 | 4494 | |
| 4495 | 4495 | case SH4_FR6: |
| 4496 | str | |
| 4496 | str.printf("%08X %f", m_fr[6 ^ fpu_xor], (double)FP_RFS(6 ^ fpu_xor)); | |
| 4497 | 4497 | break; |
| 4498 | 4498 | |
| 4499 | 4499 | case SH4_FR7: |
| 4500 | str | |
| 4500 | str.printf("%08X %f", m_fr[7 ^ fpu_xor], (double)FP_RFS(7 ^ fpu_xor)); | |
| 4501 | 4501 | break; |
| 4502 | 4502 | |
| 4503 | 4503 | case SH4_FR8: |
| 4504 | str | |
| 4504 | str.printf("%08X %f", m_fr[8 ^ fpu_xor], (double)FP_RFS(8 ^ fpu_xor)); | |
| 4505 | 4505 | break; |
| 4506 | 4506 | |
| 4507 | 4507 | case SH4_FR9: |
| 4508 | str | |
| 4508 | str.printf("%08X %f", m_fr[9 ^ fpu_xor], (double)FP_RFS(9 ^ fpu_xor)); | |
| 4509 | 4509 | break; |
| 4510 | 4510 | |
| 4511 | 4511 | case SH4_FR10: |
| 4512 | str | |
| 4512 | str.printf("%08X %f", m_fr[10 ^ fpu_xor], (double)FP_RFS(10 ^ fpu_xor)); | |
| 4513 | 4513 | break; |
| 4514 | 4514 | |
| 4515 | 4515 | case SH4_FR11: |
| 4516 | str | |
| 4516 | str.printf("%08X %f", m_fr[11 ^ fpu_xor], (double)FP_RFS(11 ^ fpu_xor)); | |
| 4517 | 4517 | break; |
| 4518 | 4518 | |
| 4519 | 4519 | case SH4_FR12: |
| 4520 | str | |
| 4520 | str.printf("%08X %f", m_fr[12 ^ fpu_xor], (double)FP_RFS(12 ^ fpu_xor)); | |
| 4521 | 4521 | break; |
| 4522 | 4522 | |
| 4523 | 4523 | case SH4_FR13: |
| 4524 | str | |
| 4524 | str.printf("%08X %f", m_fr[13 ^ fpu_xor], (double)FP_RFS(13 ^ fpu_xor)); | |
| 4525 | 4525 | break; |
| 4526 | 4526 | |
| 4527 | 4527 | case SH4_FR14: |
| 4528 | str | |
| 4528 | str.printf("%08X %f", m_fr[14 ^ fpu_xor], (double)FP_RFS(14 ^ fpu_xor)); | |
| 4529 | 4529 | break; |
| 4530 | 4530 | |
| 4531 | 4531 | case SH4_FR15: |
| 4532 | str | |
| 4532 | str.printf("%08X %f", m_fr[15 ^ fpu_xor], (double)FP_RFS(15 ^ fpu_xor)); | |
| 4533 | 4533 | break; |
| 4534 | 4534 | |
| 4535 | 4535 | case SH4_XF0: |
| 4536 | str | |
| 4536 | str.printf("%08X %f", m_xf[0 ^ fpu_xor], (double)FP_XFS(0 ^ fpu_xor)); | |
| 4537 | 4537 | break; |
| 4538 | 4538 | |
| 4539 | 4539 | case SH4_XF1: |
| 4540 | str | |
| 4540 | str.printf("%08X %f", m_xf[1 ^ fpu_xor], (double)FP_XFS(1 ^ fpu_xor)); | |
| 4541 | 4541 | break; |
| 4542 | 4542 | |
| 4543 | 4543 | case SH4_XF2: |
| 4544 | str | |
| 4544 | str.printf("%08X %f", m_xf[2 ^ fpu_xor], (double)FP_XFS(2 ^ fpu_xor)); | |
| 4545 | 4545 | break; |
| 4546 | 4546 | |
| 4547 | 4547 | case SH4_XF3: |
| 4548 | str | |
| 4548 | str.printf("%08X %f", m_xf[3 ^ fpu_xor], (double)FP_XFS(3 ^ fpu_xor)); | |
| 4549 | 4549 | break; |
| 4550 | 4550 | |
| 4551 | 4551 | case SH4_XF4: |
| 4552 | str | |
| 4552 | str.printf("%08X %f", m_xf[4 ^ fpu_xor], (double)FP_XFS(4 ^ fpu_xor)); | |
| 4553 | 4553 | break; |
| 4554 | 4554 | |
| 4555 | 4555 | case SH4_XF5: |
| 4556 | str | |
| 4556 | str.printf("%08X %f", m_xf[5 ^ fpu_xor], (double)FP_XFS(5 ^ fpu_xor)); | |
| 4557 | 4557 | break; |
| 4558 | 4558 | |
| 4559 | 4559 | case SH4_XF6: |
| 4560 | str | |
| 4560 | str.printf("%08X %f", m_xf[6 ^ fpu_xor], (double)FP_XFS(6 ^ fpu_xor)); | |
| 4561 | 4561 | break; |
| 4562 | 4562 | |
| 4563 | 4563 | case SH4_XF7: |
| 4564 | str | |
| 4564 | str.printf("%08X %f", m_xf[7 ^ fpu_xor], (double)FP_XFS(7 ^ fpu_xor)); | |
| 4565 | 4565 | break; |
| 4566 | 4566 | |
| 4567 | 4567 | case SH4_XF8: |
| 4568 | str | |
| 4568 | str.printf("%08X %f", m_xf[8 ^ fpu_xor], (double)FP_XFS(8 ^ fpu_xor)); | |
| 4569 | 4569 | break; |
| 4570 | 4570 | |
| 4571 | 4571 | case SH4_XF9: |
| 4572 | str | |
| 4572 | str.printf("%08X %f", m_xf[9 ^ fpu_xor], (double)FP_XFS(9 ^ fpu_xor)); | |
| 4573 | 4573 | break; |
| 4574 | 4574 | |
| 4575 | 4575 | case SH4_XF10: |
| 4576 | str | |
| 4576 | str.printf("%08X %f", m_xf[10 ^ fpu_xor], (double)FP_XFS(10 ^ fpu_xor)); | |
| 4577 | 4577 | break; |
| 4578 | 4578 | |
| 4579 | 4579 | case SH4_XF11: |
| 4580 | str | |
| 4580 | str.printf("%08X %f", m_xf[11 ^ fpu_xor], (double)FP_XFS(11 ^ fpu_xor)); | |
| 4581 | 4581 | break; |
| 4582 | 4582 | |
| 4583 | 4583 | case SH4_XF12: |
| 4584 | str | |
| 4584 | str.printf("%08X %f", m_xf[12 ^ fpu_xor], (double)FP_XFS(12 ^ fpu_xor)); | |
| 4585 | 4585 | break; |
| 4586 | 4586 | |
| 4587 | 4587 | case SH4_XF13: |
| 4588 | str | |
| 4588 | str.printf("%08X %f", m_xf[13 ^ fpu_xor], (double)FP_XFS(13 ^ fpu_xor)); | |
| 4589 | 4589 | break; |
| 4590 | 4590 | |
| 4591 | 4591 | case SH4_XF14: |
| 4592 | str | |
| 4592 | str.printf("%08X %f", m_xf[14 ^ fpu_xor], (double)FP_XFS(14 ^ fpu_xor)); | |
| 4593 | 4593 | break; |
| 4594 | 4594 | |
| 4595 | 4595 | case SH4_XF15: |
| 4596 | str | |
| 4596 | str.printf("%08X %f", m_xf[15 ^ fpu_xor], (double)FP_XFS(15 ^ fpu_xor)); | |
| 4597 | 4597 | break; |
| 4598 | 4598 | |
| 4599 | 4599 | } |
| r245649 | r245650 | |
|---|---|---|
| 218 | 218 | // device_state_interface overrides |
| 219 | 219 | virtual void state_import(const device_state_entry &entry); |
| 220 | 220 | virtual void state_export(const device_state_entry &entry); |
| 221 | virtual void state_string_export(const device_state_entry &entry, astring &str | |
| 221 | virtual void state_string_export(const device_state_entry &entry, astring &str); | |
| 222 | 222 | |
| 223 | 223 | // device_disasm_interface overrides |
| 224 | 224 | virtual UINT32 disasm_min_opcode_bytes() const { return 2; } |
| r245649 | r245650 | |
|---|---|---|
| 139 | 139 | } |
| 140 | 140 | |
| 141 | 141 | |
| 142 | void sm8500_cpu_device::state_string_export(const device_state_entry &entry, astring &str | |
| 142 | void sm8500_cpu_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 143 | 143 | { |
| 144 | 144 | switch (entry.index()) |
| 145 | 145 | { |
| 146 | 146 | case SM8500_PS: |
| 147 | str | |
| 147 | str.printf( "%04X", ( m_PS0 << 8 ) | m_PS1 ); | |
| 148 | 148 | break; |
| 149 | 149 | |
| 150 | 150 | case SM8500_RR0: |
| 151 | str | |
| 151 | str.printf( "%04X", mem_readword( 0x00 ) ); | |
| 152 | 152 | break; |
| 153 | 153 | |
| 154 | 154 | case SM8500_RR2: |
| 155 | str | |
| 155 | str.printf( "%04X", mem_readword( 0x02 ) ); | |
| 156 | 156 | break; |
| 157 | 157 | |
| 158 | 158 | case SM8500_RR4: |
| 159 | str | |
| 159 | str.printf( "%04X", mem_readword( 0x04 ) ); | |
| 160 | 160 | break; |
| 161 | 161 | |
| 162 | 162 | case SM8500_RR6: |
| 163 | str | |
| 163 | str.printf( "%04X", mem_readword( 0x06 ) ); | |
| 164 | 164 | break; |
| 165 | 165 | |
| 166 | 166 | case SM8500_RR8: |
| 167 | str | |
| 167 | str.printf( "%04X", mem_readword( 0x08 ) ); | |
| 168 | 168 | break; |
| 169 | 169 | |
| 170 | 170 | case SM8500_RR10: |
| 171 | str | |
| 171 | str.printf( "%04X", mem_readword( 0x0a ) ); | |
| 172 | 172 | break; |
| 173 | 173 | |
| 174 | 174 | case SM8500_RR12: |
| 175 | str | |
| 175 | str.printf( "%04X", mem_readword( 0x0c ) ); | |
| 176 | 176 | break; |
| 177 | 177 | |
| 178 | 178 | case SM8500_RR14: |
| 179 | str | |
| 179 | str.printf( "%04X", mem_readword( 0x0e ) ); | |
| 180 | 180 | break; |
| 181 | 181 | |
| 182 | 182 | case STATE_GENFLAGS: |
| 183 | str | |
| 183 | str.printf( "%c%c%c%c%c%c%c%c", | |
| 184 | 184 | m_PS1 & FLAG_C ? 'C' : '.', |
| 185 | 185 | m_PS1 & FLAG_Z ? 'Z' : '.', |
| 186 | 186 | m_PS1 & FLAG_S ? 'S' : '.', |
| r245649 | r245650 | |
|---|---|---|
| 69 | 69 | virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; } |
| 70 | 70 | |
| 71 | 71 | // device_state_interface overrides |
| 72 | void state_string_export(const device_state_entry &entry, astring &str | |
| 72 | void state_string_export(const device_state_entry &entry, astring &str); | |
| 73 | 73 | |
| 74 | 74 | // device_disasm_interface overrides |
| 75 | 75 | virtual UINT32 disasm_min_opcode_bytes() const { return 1; } |
| r245649 | r245650 | |
|---|---|---|
| 1242 | 1242 | } |
| 1243 | 1243 | |
| 1244 | 1244 | |
| 1245 | void spc700_device::state_string_export(const device_state_entry &entry, astring &str | |
| 1245 | void spc700_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 1246 | 1246 | { |
| 1247 | 1247 | switch (entry.index()) |
| 1248 | 1248 | { |
| 1249 | 1249 | case STATE_GENFLAGS: |
| 1250 | str | |
| 1250 | str.printf("%c%c%c%c%c%c%c%c", | |
| 1251 | 1251 | (m_flag_n & 0x80) ? 'N':'.', |
| 1252 | 1252 | ((m_flag_v & 0x80) >> 1) ? 'V':'.', |
| 1253 | 1253 | (m_flag_p>>3) ? 'P':'.', |
| r245649 | r245650 | |
|---|---|---|
| 28 | 28 | // device_state_interface overrides |
| 29 | 29 | virtual void state_import(const device_state_entry &entry); |
| 30 | 30 | virtual void state_export(const device_state_entry &entry); |
| 31 | void state_string_export(const device_state_entry &entry, astring &str | |
| 31 | void state_string_export(const device_state_entry &entry, astring &str); | |
| 32 | 32 | |
| 33 | 33 | // device_disasm_interface overrides |
| 34 | 34 | virtual UINT32 disasm_min_opcode_bytes() const { return 1; } |
| r245649 | r245650 | |
|---|---|---|
| 148 | 148 | // for the debugger |
| 149 | 149 | //------------------------------------------------- |
| 150 | 150 | |
| 151 | void ssem_device::state_string_export(const device_state_entry &entry, astring &str | |
| 151 | void ssem_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 152 | 152 | { |
| 153 | 153 | switch (entry.index()) |
| 154 | 154 | { |
| 155 | 155 | case STATE_GENFLAGS: |
| 156 | str | |
| 156 | str.printf("%c", m_halt ? 'H' : '.'); | |
| 157 | 157 | break; |
| 158 | 158 | } |
| 159 | 159 | } |
| r245649 | r245650 | |
|---|---|---|
| 43 | 43 | virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options); |
| 44 | 44 | |
| 45 | 45 | // device_state_interface overrides |
| 46 | virtual void state_string_export(const device_state_entry &entry, astring &str | |
| 46 | virtual void state_string_export(const device_state_entry &entry, astring &str); | |
| 47 | 47 | |
| 48 | 48 | // address spaces |
| 49 | 49 | const address_space_config m_program_config; |
| r245649 | r245650 | |
|---|---|---|
| 548 | 548 | } |
| 549 | 549 | |
| 550 | 550 | |
| 551 | void ssp1601_device::state_string_export(const device_state_entry &entry, astring &str | |
| 551 | void ssp1601_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 552 | 552 | { |
| 553 | 553 | switch (entry.index()) |
| 554 | 554 | { |
| 555 | 555 | case STATE_GENFLAGS: |
| 556 | str | |
| 556 | str.printf("%c%c%c%c", (rST&SSP_FLAG_N) ? 'N' : '.', (rST&SSP_FLAG_V) ? 'V' : '.', | |
| 557 | 557 | (rST&SSP_FLAG_Z)?'Z':'.', (rST&SSP_FLAG_L)?'L':'.' |
| 558 | 558 | ); |
| 559 | 559 | break; |
| r245649 | r245650 | |
|---|---|---|
| 38 | 38 | virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ((spacenum == AS_IO) ? &m_io_config : NULL); } |
| 39 | 39 | |
| 40 | 40 | // device_state_interface overrides |
| 41 | void state_string_export(const device_state_entry &entry, astring &str | |
| 41 | void state_string_export(const device_state_entry &entry, astring &str); | |
| 42 | 42 | |
| 43 | 43 | // device_disasm_interface overrides |
| 44 | 44 | virtual UINT32 disasm_min_opcode_bytes() const { return 2; } |
| r245649 | r245650 | |
|---|---|---|
| 275 | 275 | m_icountptr = &m_icount; |
| 276 | 276 | } |
| 277 | 277 | |
| 278 | void t11_device::state_string_export(const device_state_entry &entry, astring &str | |
| 278 | void t11_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 279 | 279 | { |
| 280 | 280 | switch (entry.index()) |
| 281 | 281 | { |
| 282 | 282 | case STATE_GENFLAGS: |
| 283 | str | |
| 283 | str.printf("%c%c%c%c%c%c%c%c", | |
| 284 | 284 | m_psw.b.l & 0x80 ? '?':'.', |
| 285 | 285 | m_psw.b.l & 0x40 ? 'I':'.', |
| 286 | 286 | m_psw.b.l & 0x20 ? 'I':'.', |
| r245649 | r245650 | |
|---|---|---|
| 56 | 56 | virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; } |
| 57 | 57 | |
| 58 | 58 | // device_state_interface overrides |
| 59 | void state_string_export(const device_state_entry &entry, astring &str | |
| 59 | void state_string_export(const device_state_entry &entry, astring &str); | |
| 60 | 60 | |
| 61 | 61 | // device_disasm_interface overrides |
| 62 | 62 | virtual UINT32 disasm_min_opcode_bytes() const { return 2; } |
| r245649 | r245650 | |
|---|---|---|
| 2761 | 2761 | } |
| 2762 | 2762 | |
| 2763 | 2763 | |
| 2764 | void tlcs90_device::state_string_export(const device_state_entry &entry, astring &str | |
| 2764 | void tlcs90_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 2765 | 2765 | { |
| 2766 | 2766 | switch (entry.index()) |
| 2767 | 2767 | { |
| 2768 | 2768 | case STATE_GENFLAGS: |
| 2769 | str | |
| 2769 | str.printf("%c%c%c%c%c%c%c%c", | |
| 2770 | 2770 | F & 0x80 ? 'S':'.', |
| 2771 | 2771 | F & 0x40 ? 'Z':'.', |
| 2772 | 2772 | F & 0x20 ? 'I':'.', |
| r245649 | r245650 | |
|---|---|---|
| 49 | 49 | virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : NULL ); } |
| 50 | 50 | |
| 51 | 51 | // device_state_interface overrides |
| 52 | void state_string_export(const device_state_entry &entry, astring &str | |
| 52 | void state_string_export(const device_state_entry &entry, astring &str); | |
| 53 | 53 | |
| 54 | 54 | // device_disasm_interface overrides |
| 55 | 55 | virtual UINT32 disasm_min_opcode_bytes() const { return 1; } |
| r245649 | r245650 | |
|---|---|---|
| 374 | 374 | } |
| 375 | 375 | |
| 376 | 376 | |
| 377 | void tlcs900h_device::state_string_export(const device_state_entry &entry, astring &str | |
| 377 | void tlcs900h_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 378 | 378 | { |
| 379 | 379 | switch (entry.index()) |
| 380 | 380 | { |
| 381 | 381 | case STATE_GENFLAGS: |
| 382 | str | |
| 382 | str.printf("%c%d%c%d%c%c%c%c%c%c%c%c", | |
| 383 | 383 | m_sr.w.l & 0x8000 ? 'S' : 'U', |
| 384 | 384 | ( m_sr.w.l & 0x7000 ) >> 12, |
| 385 | 385 | m_sr.w.l & 0x0800 ? 'M' : 'N', |
| r245649 | r245650 | |
|---|---|---|
| 70 | 70 | } |
| 71 | 71 | |
| 72 | 72 | // device_state_interface overrides |
| 73 | void state_string_export(const device_state_entry &entry, astring &str | |
| 73 | void state_string_export(const device_state_entry &entry, astring &str); | |
| 74 | 74 | |
| 75 | 75 | // device_disasm_interface overrides |
| 76 | 76 | virtual UINT32 disasm_min_opcode_bytes() const { return 1; } |
| r245649 | r245650 | |
|---|---|---|
| 392 | 392 | return CPU_DISASSEMBLE_NAME(tms0980)(this, buffer, pc, oprom, opram, options); |
| 393 | 393 | } |
| 394 | 394 | |
| 395 | void tms1xxx_cpu_device::state_string_export(const device_state_entry &entry, astring &str | |
| 395 | void tms1xxx_cpu_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 396 | 396 | { |
| 397 | 397 | switch (entry.index()) |
| 398 | 398 | { |
| 399 | 399 | case STATE_GENPC: |
| 400 | str | |
| 400 | str.printf("%03X", m_rom_address << ((m_byte_bits > 8) ? 1 : 0)); | |
| 401 | 401 | break; |
| 402 | 402 | } |
| 403 | 403 | } |
| r245649 | r245650 | |
|---|---|---|
| 96 | 96 | virtual UINT32 disasm_min_opcode_bytes() const { return 1; } |
| 97 | 97 | virtual UINT32 disasm_max_opcode_bytes() const { return 1; } |
| 98 | 98 | |
| 99 | void state_string_export(const device_state_entry &entry, astring &str | |
| 99 | void state_string_export(const device_state_entry &entry, astring &str); | |
| 100 | 100 | |
| 101 | 101 | void next_pc(); |
| 102 | 102 |
| r245649 | r245650 | |
|---|---|---|
| 893 | 893 | } |
| 894 | 894 | |
| 895 | 895 | |
| 896 | void tms32010_device::state_string_export(const device_state_entry &entry, astring &str | |
| 896 | void tms32010_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 897 | 897 | { |
| 898 | 898 | switch (entry.index()) |
| 899 | 899 | { |
| 900 | 900 | case STATE_GENFLAGS: |
| 901 | str | |
| 901 | str.printf("%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c", | |
| 902 | 902 | m_STR & 0x8000 ? 'O':'.', |
| 903 | 903 | m_STR & 0x4000 ? 'M':'.', |
| 904 | 904 | m_STR & 0x2000 ? 'I':'.', |
| r245649 | r245650 | |
|---|---|---|
| 70 | 70 | virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : ( (spacenum == AS_DATA) ? &m_data_config : NULL ) ); } |
| 71 | 71 | |
| 72 | 72 | // device_state_interface overrides |
| 73 | void state_string_export(const device_state_entry &entry, astring &str | |
| 73 | void state_string_export(const device_state_entry &entry, astring &str); | |
| 74 | 74 | |
| 75 | 75 | // device_disasm_interface overrides |
| 76 | 76 | virtual UINT32 disasm_min_opcode_bytes() const { return 2; } |
| r245649 | r245650 | |
|---|---|---|
| 1799 | 1799 | } |
| 1800 | 1800 | |
| 1801 | 1801 | |
| 1802 | void tms32025_device::state_string_export(const device_state_entry &entry, astring &str | |
| 1802 | void tms32025_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 1803 | 1803 | { |
| 1804 | 1804 | switch (entry.index()) |
| 1805 | 1805 | { |
| 1806 | 1806 | case STATE_GENFLAGS: |
| 1807 | str | |
| 1807 | str.printf("arp%d%c%c%c%cdp%03x arb%d%c%c%c%c%c%c%c%c%c%c%cpm%d", | |
| 1808 | 1808 | (m_STR0 & 0xe000) >> 13, |
| 1809 | 1809 | m_STR0 & 0x1000 ? 'O':'.', |
| 1810 | 1810 | m_STR0 & 0x0800 ? 'M':'.', |
| r245649 | r245650 | |
|---|---|---|
| 95 | 95 | // device_state_interface overrides |
| 96 | 96 | virtual void state_import(const device_state_entry &entry); |
| 97 | 97 | virtual void state_export(const device_state_entry &entry); |
| 98 | void state_string_export(const device_state_entry &entry, astring &str | |
| 98 | void state_string_export(const device_state_entry &entry, astring &str); | |
| 99 | 99 | |
| 100 | 100 | // device_disasm_interface overrides |
| 101 | 101 | virtual UINT32 disasm_min_opcode_bytes() const { return 2; } |
| r245649 | r245650 | |
|---|---|---|
| 529 | 529 | // for the debugger |
| 530 | 530 | //------------------------------------------------- |
| 531 | 531 | |
| 532 | void tms3203x_device::state_string_export(const device_state_entry &entry, astring &str | |
| 532 | void tms3203x_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 533 | 533 | { |
| 534 | 534 | switch (entry.index()) |
| 535 | 535 | { |
| r245649 | r245650 | |
| 541 | 541 | case TMS3203X_R5F: |
| 542 | 542 | case TMS3203X_R6F: |
| 543 | 543 | case TMS3203X_R7F: |
| 544 | str | |
| 544 | str.printf("%12g", m_r[TMR_R0 + (entry.index() - TMS3203X_R0F)].as_double()); | |
| 545 | 545 | break; |
| 546 | 546 | |
| 547 | 547 | case STATE_GENFLAGS: |
| 548 | 548 | UINT32 temp = m_r[TMR_ST].i32[0]; |
| 549 | str | |
| 549 | str.printf("%c%c%c%c%c%c%c%c", | |
| 550 | 550 | (temp & 0x80) ? 'O':'.', |
| 551 | 551 | (temp & 0x40) ? 'U':'.', |
| 552 | 552 | (temp & 0x20) ? 'V':'.', |
| r245649 | r245650 | |
|---|---|---|
| 179 | 179 | // device_state_interface overrides |
| 180 | 180 | virtual void state_import(const device_state_entry &entry); |
| 181 | 181 | virtual void state_export(const device_state_entry &entry); |
| 182 | virtual void state_string_export(const device_state_entry &entry, astring &str | |
| 182 | virtual void state_string_export(const device_state_entry &entry, astring &str); | |
| 183 | 183 | |
| 184 | 184 | // device_disasm_interface overrides |
| 185 | 185 | virtual UINT32 disasm_min_opcode_bytes() const; |
| r245649 | r245650 | |
|---|---|---|
| 203 | 203 | m_icountptr = &m_icount; |
| 204 | 204 | } |
| 205 | 205 | |
| 206 | void tms32082_mp_device::state_string_export(const device_state_entry &entry, astring &str | |
| 206 | void tms32082_mp_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 207 | 207 | { |
| 208 | 208 | switch (entry.index()) |
| 209 | 209 | { |
| 210 | 210 | case STATE_GENFLAGS: |
| 211 | str | |
| 211 | str.printf("?"); | |
| 212 | 212 | break; |
| 213 | 213 | } |
| 214 | 214 | } |
| r245649 | r245650 | |
| 502 | 502 | m_icountptr = &m_icount; |
| 503 | 503 | } |
| 504 | 504 | |
| 505 | void tms32082_pp_device::state_string_export(const device_state_entry &entry, astring &str | |
| 505 | void tms32082_pp_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 506 | 506 | { |
| 507 | 507 | switch (entry.index()) |
| 508 | 508 | { |
| 509 | 509 | case STATE_GENFLAGS: |
| 510 | str | |
| 510 | str.printf("?"); | |
| 511 | 511 | break; |
| 512 | 512 | } |
| 513 | 513 | } |
| r245649 | r245650 | |
|---|---|---|
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | // device_state_interface overrides |
| 94 | void state_string_export(const device_state_entry &entry, astring &str | |
| 94 | void state_string_export(const device_state_entry &entry, astring &str); | |
| 95 | 95 | |
| 96 | 96 | // device_disasm_interface overrides |
| 97 | 97 | virtual UINT32 disasm_min_opcode_bytes() const { return 4; } |
| r245649 | r245650 | |
| 181 | 181 | } |
| 182 | 182 | |
| 183 | 183 | // device_state_interface overrides |
| 184 | void state_string_export(const device_state_entry &entry, astring &str | |
| 184 | void state_string_export(const device_state_entry &entry, astring &str); | |
| 185 | 185 | |
| 186 | 186 | // device_disasm_interface overrides |
| 187 | 187 | virtual UINT32 disasm_min_opcode_bytes() const { return 8; } |
| r245649 | r245650 | |
|---|---|---|
| 1596 | 1596 | } |
| 1597 | 1597 | |
| 1598 | 1598 | |
| 1599 | void tms340x0_device::state_string_export(const device_state_entry &entry, astring &str | |
| 1599 | void tms340x0_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 1600 | 1600 | { |
| 1601 | 1601 | switch (entry.index()) |
| 1602 | 1602 | { |
| 1603 | 1603 | case STATE_GENFLAGS: |
| 1604 | str | |
| 1604 | str.printf("%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c", | |
| 1605 | 1605 | m_st & 0x80000000 ? 'N':'.', |
| 1606 | 1606 | m_st & 0x40000000 ? 'C':'.', |
| 1607 | 1607 | m_st & 0x20000000 ? 'Z':'.', |
| r245649 | r245650 | |
|---|---|---|
| 280 | 280 | virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; } |
| 281 | 281 | |
| 282 | 282 | // device_state_interface overrides |
| 283 | virtual void state_string_export(const device_state_entry &entry, astring &str | |
| 283 | virtual void state_string_export(const device_state_entry &entry, astring &str); | |
| 284 | 284 | |
| 285 | 285 | // device_disasm_interface overrides |
| 286 | 286 | virtual UINT32 disasm_min_opcode_bytes() const { return 2; } |
| r245649 | r245650 | |
|---|---|---|
| 271 | 271 | state_add(STATE_GENFLAGS, "GENFLAGS", m_sr).formatstr("%8s").noshow(); |
| 272 | 272 | } |
| 273 | 273 | |
| 274 | void tms7000_device::state_string_export(const device_state_entry &entry, astring &str | |
| 274 | void tms7000_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 275 | 275 | { |
| 276 | 276 | switch (entry.index()) |
| 277 | 277 | { |
| 278 | 278 | case STATE_GENFLAGS: |
| 279 | str | |
| 279 | str.printf("%c%c%c%c%c%c%c%c", | |
| 280 | 280 | m_sr & 0x80 ? 'C':'c', |
| 281 | 281 | m_sr & 0x40 ? 'N':'n', |
| 282 | 282 | m_sr & 0x20 ? 'Z':'z', |
| r245649 | r245650 | |
|---|---|---|
| 91 | 91 | virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : NULL ); } |
| 92 | 92 | |
| 93 | 93 | // device_state_interface overrides |
| 94 | void state_string_export(const device_state_entry &entry, astring &str | |
| 94 | void state_string_export(const device_state_entry &entry, astring &str); | |
| 95 | 95 | |
| 96 | 96 | // device_disasm_interface overrides |
| 97 | 97 | virtual UINT32 disasm_min_opcode_bytes() const { return 1; } |
| r245649 | r245650 | |
|---|---|---|
| 349 | 349 | /* |
| 350 | 350 | state_string_export - export state as a string for the debugger |
| 351 | 351 | */ |
| 352 | void tms99xx_device::state_string_export(const device_state_entry &entry, astring &str | |
| 352 | void tms99xx_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 353 | 353 | { |
| 354 | 354 | static const char *statestr = "LAECOPX-----IIII"; |
| 355 | 355 | char flags[17]; |
| r245649 | r245650 | |
| 363 | 363 | val = (val >> 1) & 0x7fff; |
| 364 | 364 | } |
| 365 | 365 | } |
| 366 | str | |
| 366 | str.cpy(flags); | |
| 367 | 367 | } |
| 368 | 368 | |
| 369 | 369 | /**************************************************************************/ |
| r245649 | r245650 | |
|---|---|---|
| 226 | 226 | static const char* s_statename[]; |
| 227 | 227 | void state_import(const device_state_entry &entry); |
| 228 | 228 | void state_export(const device_state_entry &entry); |
| 229 | void state_string_export(const device_state_entry &entry, astring &str | |
| 229 | void state_string_export(const device_state_entry &entry, astring &str); | |
| 230 | 230 | |
| 231 | 231 | // Interrupt handling |
| 232 | 232 | void service_interrupt(); |
| r245649 | r245650 | |
|---|---|---|
| 372 | 372 | /* |
| 373 | 373 | state_string_export - export state as a string for the debugger |
| 374 | 374 | */ |
| 375 | void tms9995_device::state_string_export(const device_state_entry &entry, astring &str | |
| 375 | void tms9995_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 376 | 376 | { |
| 377 | 377 | static const char *statestr = "LAECOPX-----IIII"; |
| 378 | 378 | char flags[17]; |
| r245649 | r245650 | |
| 386 | 386 | val = (val >> 1) & 0x7fff; |
| 387 | 387 | } |
| 388 | 388 | } |
| 389 | str | |
| 389 | str.cpy(flags); | |
| 390 | 390 | } |
| 391 | 391 | |
| 392 | 392 | /* |
| r245649 | r245650 | |
|---|---|---|
| 106 | 106 | static const char* s_statename[]; |
| 107 | 107 | void state_import(const device_state_entry &entry); |
| 108 | 108 | void state_export(const device_state_entry &entry); |
| 109 | void state_string_export(const device_state_entry &entry, astring &str | |
| 109 | void state_string_export(const device_state_entry &entry, astring &str); | |
| 110 | 110 | UINT16 read_workspace_register_debug(int reg); |
| 111 | 111 | void write_workspace_register_debug(int reg, UINT16 data); |
| 112 | 112 |
| r245649 | r245650 | |
|---|---|---|
| 75 | 75 | |
| 76 | 76 | |
| 77 | 77 | // disasm |
| 78 | void ucom4_cpu_device::state_string_export(const device_state_entry &entry, astring &str | |
| 78 | void ucom4_cpu_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 79 | 79 | { |
| 80 | 80 | switch (entry.index()) |
| 81 | 81 | { |
| 82 | 82 | // obviously not from a single flags register |
| 83 | 83 | case STATE_GENFLAGS: |
| 84 | str | |
| 84 | str.printf("%c%c%c%c%c", | |
| 85 | 85 | m_inte_f ? 'E':'e', |
| 86 | 86 | m_int_f ? 'I':'i', |
| 87 | 87 | m_timer_f ? 'T':'t', |
| r245649 | r245650 | |
|---|---|---|
| 151 | 151 | virtual UINT32 disasm_max_opcode_bytes() const { return 2; } |
| 152 | 152 | virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options); |
| 153 | 153 | |
| 154 | void state_string_export(const device_state_entry &entry, astring &str | |
| 154 | void state_string_export(const device_state_entry &entry, astring &str); | |
| 155 | 155 | |
| 156 | 156 | address_space_config m_program_config; |
| 157 | 157 | address_space_config m_data_config; |
| r245649 | r245650 | |
|---|---|---|
| 409 | 409 | void set_mapvar(int paramnum, UINT32 value) { assert(paramnum < m_numparams); assert(m_param[paramnum].is_mapvar()); m_param[paramnum] = value; } |
| 410 | 410 | |
| 411 | 411 | // misc |
| 412 | const char *disasm(astring &str | |
| 412 | const char *disasm(astring &str, drcuml_state *drcuml = NULL) const; | |
| 413 | 413 | UINT8 input_flags() const; |
| 414 | 414 | UINT8 output_flags() const; |
| 415 | 415 | UINT8 modified_flags() const; |
| r245649 | r245650 | |
|---|---|---|
| 201 | 201 | // for the debugger |
| 202 | 202 | //------------------------------------------------- |
| 203 | 203 | |
| 204 | void necdsp_device::state_string_export(const device_state_entry &entry, astring &str | |
| 204 | void necdsp_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 205 | 205 | { |
| 206 | 206 | switch (entry.index()) |
| 207 | 207 | { |
| 208 | 208 | case UPD7725_FLAGA: |
| 209 | str | |
| 209 | str.printf("%s %s %c%c %s %s %s %s", | |
| 210 | 210 | regs.flaga.s1 ? "S1" : "s1", |
| 211 | 211 | regs.flaga.s0 ? "S0" : "s0", |
| 212 | 212 | regs.flaga.c ? 'C' : 'c', |
| r245649 | r245650 | |
| 218 | 218 | break; |
| 219 | 219 | |
| 220 | 220 | case UPD7725_FLAGB: |
| 221 | str | |
| 221 | str.printf("%s %s %c%c %s %s %s %s", | |
| 222 | 222 | regs.flagb.s1 ? "S1" : "s1", |
| 223 | 223 | regs.flagb.s0 ? "S0" : "s0", |
| 224 | 224 | regs.flagb.c ? 'C' : 'c', |
| r245649 | r245650 | |
|---|---|---|
| 108 | 108 | // device_state_interface overrides |
| 109 | 109 | virtual void state_import(const device_state_entry &entry); |
| 110 | 110 | virtual void state_export(const device_state_entry &entry); |
| 111 | virtual void state_string_export(const device_state_entry &entry, astring &str | |
| 111 | virtual void state_string_export(const device_state_entry &entry, astring &str); | |
| 112 | 112 | |
| 113 | 113 | // device_disasm_interface overrides |
| 114 | 114 | virtual UINT32 disasm_min_opcode_bytes() const; |
| r245649 | r245650 | |
|---|---|---|
| 1732 | 1732 | |
| 1733 | 1733 | } |
| 1734 | 1734 | |
| 1735 | void upd7810_device::state_string_export(const device_state_entry &entry, astring &str | |
| 1735 | void upd7810_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 1736 | 1736 | { |
| 1737 | 1737 | switch (entry.index()) |
| 1738 | 1738 | { |
| 1739 | 1739 | case STATE_GENFLAGS: |
| 1740 | str | |
| 1740 | str.printf("%s:%s:%s:%s:%s:%s", | |
| 1741 | 1741 | m_psw & 0x40 ? "ZF":"--", |
| 1742 | 1742 | m_psw & 0x20 ? "SK":"--", |
| 1743 | 1743 | m_psw & 0x10 ? "HC":"--", |
| r245649 | r245650 | |
|---|---|---|
| 168 | 168 | virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : NULL ); } |
| 169 | 169 | |
| 170 | 170 | // device_state_interface overrides |
| 171 | void state_string_export(const device_state_entry &entry, astring &str | |
| 171 | void state_string_export(const device_state_entry &entry, astring &str); | |
| 172 | 172 | |
| 173 | 173 | // device_disasm_interface overrides |
| 174 | 174 | virtual UINT32 disasm_min_opcode_bytes() const { return 1; } |
| r245649 | r245650 | |
|---|---|---|
| 183 | 183 | } |
| 184 | 184 | |
| 185 | 185 | |
| 186 | void v30mz_cpu_device::state_string_export(const device_state_entry &entry, astring &str | |
| 186 | void v30mz_cpu_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 187 | 187 | { |
| 188 | 188 | switch (entry.index()) |
| 189 | 189 | { |
| 190 | 190 | case STATE_GENPC: |
| 191 | str | |
| 191 | str.printf("%08X", pc()); | |
| 192 | 192 | break; |
| 193 | 193 | |
| 194 | 194 | case STATE_GENFLAGS: |
| 195 | 195 | { |
| 196 | 196 | UINT16 flags = CompressFlags(); |
| 197 | str | |
| 197 | str.printf("%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c", | |
| 198 | 198 | flags & 0x8000 ? 'M':'.', |
| 199 | 199 | flags & 0x4000 ? '?':'.', |
| 200 | 200 | flags & 0x2000 ? '?':'.', |
| r245649 | r245650 | |
|---|---|---|
| 42 | 42 | virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : NULL ); } |
| 43 | 43 | |
| 44 | 44 | // device_state_interface overrides |
| 45 | void state_string_export(const device_state_entry &entry, astring &str | |
| 45 | void state_string_export(const device_state_entry &entry, astring &str); | |
| 46 | 46 | |
| 47 | 47 | // device_disasm_interface overrides |
| 48 | 48 | virtual UINT32 disasm_min_opcode_bytes() const { return 1; } |
| r245649 | r245650 | |
|---|---|---|
| 1317 | 1317 | m_icountptr = &m_icount; |
| 1318 | 1318 | } |
| 1319 | 1319 | |
| 1320 | void v810_device::state_string_export(const device_state_entry &entry, astring &str | |
| 1320 | void v810_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 1321 | 1321 | { |
| 1322 | 1322 | switch (entry.index()) |
| 1323 | 1323 | { |
| 1324 | 1324 | case STATE_GENFLAGS: |
| 1325 | str | |
| 1325 | str.printf("%c%c%c%c%c%c%c%c", | |
| 1326 | 1326 | GET_AE ? 'A':'.', |
| 1327 | 1327 | GET_NP ? 'N':'.', |
| 1328 | 1328 | GET_EP ? 'E':'.', |
| r245649 | r245650 | |
|---|---|---|
| 99 | 99 | virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ((spacenum == AS_IO) ? &m_io_config : NULL); } |
| 100 | 100 | |
| 101 | 101 | // device_state_interface overrides |
| 102 | void state_string_export(const device_state_entry &entry, astring &str | |
| 102 | void state_string_export(const device_state_entry &entry, astring &str); | |
| 103 | 103 | |
| 104 | 104 | // device_disasm_interface overrides |
| 105 | 105 | virtual UINT32 disasm_min_opcode_bytes() const { return 2; } |
| r245649 | r245650 | |
|---|---|---|
| 2581 | 2581 | } |
| 2582 | 2582 | } |
| 2583 | 2583 | |
| 2584 | void z180_device::state_string_export(const device_state_entry &entry, astring &str | |
| 2584 | void z180_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 2585 | 2585 | { |
| 2586 | 2586 | switch (entry.index()) |
| 2587 | 2587 | { |
| 2588 | 2588 | case STATE_GENFLAGS: |
| 2589 | str | |
| 2589 | str.printf("%c%c%c%c%c%c%c%c", | |
| 2590 | 2590 | m_AF.b.l & 0x80 ? 'S':'.', |
| 2591 | 2591 | m_AF.b.l & 0x40 ? 'Z':'.', |
| 2592 | 2592 | m_AF.b.l & 0x20 ? '5':'.', |
| r245649 | r245650 | |
|---|---|---|
| 157 | 157 | // device_state_interface overrides |
| 158 | 158 | virtual void state_import(const device_state_entry &entry); |
| 159 | 159 | virtual void state_export(const device_state_entry &entry); |
| 160 | void state_string_export(const device_state_entry &entry, astring &str | |
| 160 | void state_string_export(const device_state_entry &entry, astring &str); | |
| 161 | 161 | |
| 162 | 162 | // device_disasm_interface overrides |
| 163 | 163 | virtual UINT32 disasm_min_opcode_bytes() const { return 1; } |
| r245649 | r245650 | |
|---|---|---|
| 807 | 807 | } |
| 808 | 808 | } |
| 809 | 809 | |
| 810 | void z8_device::state_string_export(const device_state_entry &entry, astring &str | |
| 810 | void z8_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 811 | 811 | { |
| 812 | 812 | switch (entry.index()) |
| 813 | 813 | { |
| 814 | case STATE_GENFLAGS: str | |
| 814 | case STATE_GENFLAGS: str.printf("%c%c%c%c%c%c", | |
| 815 | 815 | m_r[Z8_REGISTER_FLAGS] & Z8_FLAGS_C ? 'C' : '.', |
| 816 | 816 | m_r[Z8_REGISTER_FLAGS] & Z8_FLAGS_Z ? 'Z' : '.', |
| 817 | 817 | m_r[Z8_REGISTER_FLAGS] & Z8_FLAGS_S ? 'S' : '.', |
| r245649 | r245650 | |
|---|---|---|
| 60 | 60 | // device_state_interface overrides |
| 61 | 61 | virtual void state_import(const device_state_entry &entry); |
| 62 | 62 | virtual void state_export(const device_state_entry &entry); |
| 63 | void state_string_export(const device_state_entry &entry, astring &str | |
| 63 | void state_string_export(const device_state_entry &entry, astring &str); | |
| 64 | 64 | |
| 65 | 65 | // device_disasm_interface overrides |
| 66 | 66 | virtual UINT32 disasm_min_opcode_bytes() const { return 1; } |
| r245649 | r245650 | |
|---|---|---|
| 3666 | 3666 | } |
| 3667 | 3667 | } |
| 3668 | 3668 | |
| 3669 | void z80_device::state_string_export(const device_state_entry &entry, astring &str | |
| 3669 | void z80_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 3670 | 3670 | { |
| 3671 | 3671 | switch (entry.index()) |
| 3672 | 3672 | { |
| 3673 | 3673 | case STATE_GENFLAGS: |
| 3674 | str | |
| 3674 | str.printf("%c%c%c%c%c%c%c%c", | |
| 3675 | 3675 | F & 0x80 ? 'S':'.', |
| 3676 | 3676 | F & 0x40 ? 'Z':'.', |
| 3677 | 3677 | F & 0x20 ? 'Y':'.', |
| r245649 | r245650 | |
|---|---|---|
| 58 | 58 | // device_state_interface overrides |
| 59 | 59 | virtual void state_import(const device_state_entry &entry); |
| 60 | 60 | virtual void state_export(const device_state_entry &entry); |
| 61 | virtual void state_string_export(const device_state_entry &entry, astring &str | |
| 61 | virtual void state_string_export(const device_state_entry &entry, astring &str); | |
| 62 | 62 | |
| 63 | 63 | // device_disasm_interface overrides |
| 64 | 64 | virtual UINT32 disasm_min_opcode_bytes() const { return 1; } |
| r245649 | r245650 | |
|---|---|---|
| 648 | 648 | state_add( STATE_GENSP, "GENSP", m_nspoff ).noshow(); |
| 649 | 649 | } |
| 650 | 650 | |
| 651 | void z8002_device::state_string_export(const device_state_entry &entry, astring &str | |
| 651 | void z8002_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 652 | 652 | { |
| 653 | 653 | switch (entry.index()) |
| 654 | 654 | { |
| 655 | 655 | case STATE_GENFLAGS: |
| 656 | str | |
| 656 | str.printf("%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c", | |
| 657 | 657 | m_fcw & 0x8000 ? 'S':'s', |
| 658 | 658 | m_fcw & 0x4000 ? 'n':'N', |
| 659 | 659 | m_fcw & 0x2000 ? 'E':'e', |
| r245649 | r245650 | |
|---|---|---|
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 | // device_state_interface overrides |
| 63 | void state_string_export(const device_state_entry &entry, astring &str | |
| 63 | void state_string_export(const device_state_entry &entry, astring &str); | |
| 64 | 64 | |
| 65 | 65 | // device_disasm_interface overrides |
| 66 | 66 | virtual UINT32 disasm_min_opcode_bytes() const { return 2; } |
| r245649 | r245650 | |
|---|---|---|
| 580 | 580 | // written to perform any post-processing |
| 581 | 581 | //------------------------------------------------- |
| 582 | 582 | |
| 583 | void device_state_interface::state_string_import(const device_state_entry &entry, astring &str | |
| 583 | void device_state_interface::state_string_import(const device_state_entry &entry, astring &str) | |
| 584 | 584 | { |
| 585 | 585 | // do nothing by default |
| 586 | 586 | } |
| r245649 | r245650 | |
| 591 | 591 | // written to perform any post-processing |
| 592 | 592 | //------------------------------------------------- |
| 593 | 593 | |
| 594 | void device_state_interface::state_string_export(const device_state_entry &entry, astring &str | |
| 594 | void device_state_interface::state_string_export(const device_state_entry &entry, astring &str) | |
| 595 | 595 | { |
| 596 | 596 | // do nothing by default |
| 597 | 597 | } |
| r245649 | r245650 | |
|---|---|---|
| 162 | 162 | // derived class overrides |
| 163 | 163 | virtual void state_import(const device_state_entry &entry); |
| 164 | 164 | virtual void state_export(const device_state_entry &entry); |
| 165 | virtual void state_string_import(const device_state_entry &entry, astring &string); | |
| 166 | virtual void state_string_export(const device_state_entry &entry, astring &string); | |
| 165 | virtual void state_string_import(const device_state_entry &entry, astring &str); | |
| 166 | virtual void state_string_export(const device_state_entry &entry, astring &str); | |
| 167 | 167 | |
| 168 | 168 | // internal operation overrides |
| 169 | 169 | virtual void interface_post_start(); |
| r245649 | r245650 | |
|---|---|---|
| 529 | 529 | // friendly display |
| 530 | 530 | //------------------------------------------------- |
| 531 | 531 | |
| 532 | const char *joystick_map::to_string(astring &str | |
| 532 | const char *joystick_map::to_string(astring &str) const | |
| 533 | 533 | { |
| 534 | str | |
| 534 | str.printf("%s\n", m_origstring.c_str()); | |
| 535 | 535 | for (int rownum = 0; rownum < 9; rownum++) |
| 536 | 536 | { |
| 537 | str | |
| 537 | str.catprintf(" "); | |
| 538 | 538 | for (int colnum = 0; colnum < 9; colnum++) |
| 539 | 539 | switch (m_map[rownum][colnum]) |
| 540 | 540 | { |
| 541 | case JOYSTICK_MAP_UP | JOYSTICK_MAP_LEFT: string.catprintf("7"); break; | |
| 542 | case JOYSTICK_MAP_UP: string.catprintf("8"); break; | |
| 543 | case JOYSTICK_MAP_UP | JOYSTICK_MAP_RIGHT: string.catprintf("9"); break; | |
| 544 | case JOYSTICK_MAP_LEFT: string.catprintf("4"); break; | |
| 545 | case JOYSTICK_MAP_NEUTRAL: string.catprintf("5"); break; | |
| 546 | case JOYSTICK_MAP_RIGHT: string.catprintf("6"); break; | |
| 547 | case JOYSTICK_MAP_DOWN | JOYSTICK_MAP_LEFT: string.catprintf("1"); break; | |
| 548 | case JOYSTICK_MAP_DOWN: string.catprintf("2"); break; | |
| 549 | case JOYSTICK_MAP_DOWN | JOYSTICK_MAP_RIGHT:string.catprintf("3"); break; | |
| 550 | case JOYSTICK_MAP_STICKY: string.catprintf("s"); break; | |
| 551 | default: string.catprintf("?"); break; | |
| 541 | case JOYSTICK_MAP_UP | JOYSTICK_MAP_LEFT: str.catprintf("7"); break; | |
| 542 | case JOYSTICK_MAP_UP: str.catprintf("8"); break; | |
| 543 | case JOYSTICK_MAP_UP | JOYSTICK_MAP_RIGHT: str.catprintf("9"); break; | |
| 544 | case JOYSTICK_MAP_LEFT: str.catprintf("4"); break; | |
| 545 | case JOYSTICK_MAP_NEUTRAL: str.catprintf("5"); break; | |
| 546 | case JOYSTICK_MAP_RIGHT: str.catprintf("6"); break; | |
| 547 | case JOYSTICK_MAP_DOWN | JOYSTICK_MAP_LEFT: str.catprintf("1"); break; | |
| 548 | case JOYSTICK_MAP_DOWN: str.catprintf("2"); break; | |
| 549 | case JOYSTICK_MAP_DOWN | JOYSTICK_MAP_RIGHT:str.catprintf("3"); break; | |
| 550 | case JOYSTICK_MAP_STICKY: str.catprintf("s"); break; | |
| 551 | default: str.catprintf("?"); break; | |
| 552 | 552 | } |
| 553 | 553 | |
| 554 | str | |
| 554 | str.catprintf("\n"); | |
| 555 | 555 | } |
| 556 | return str | |
| 556 | return str.c_str(); | |
| 557 | 557 | } |
| 558 | 558 | |
| 559 | 559 | |
| r245649 | r245650 | |
| 1461 | 1461 | // friendly name |
| 1462 | 1462 | //------------------------------------------------- |
| 1463 | 1463 | |
| 1464 | const char *input_manager::code_name(astring &str | |
| 1464 | const char *input_manager::code_name(astring &str, input_code code) const | |
| 1465 | 1465 | { |
| 1466 | str | |
| 1466 | str.reset(); | |
| 1467 | 1467 | |
| 1468 | 1468 | // if nothing there, return an empty string |
| 1469 | 1469 | input_device_item *item = item_from_code(code); |
| 1470 | 1470 | if (item == NULL) |
| 1471 | return str | |
| 1471 | return str.c_str(); | |
| 1472 | 1472 | |
| 1473 | 1473 | // determine the devclass part |
| 1474 | 1474 | const char *devclass = (*devclass_string_table)[code.device_class()]; |
| r245649 | r245650 | |
| 1501 | 1501 | devcode = ""; |
| 1502 | 1502 | |
| 1503 | 1503 | // concatenate the strings |
| 1504 | str | |
| 1504 | str.cpy(devclass); | |
| 1505 | 1505 | if (devindex) |
| 1506 | str | |
| 1506 | str.cat(" ").cat(devindex); | |
| 1507 | 1507 | if (devcode[0] != 0) |
| 1508 | str | |
| 1508 | str.cat(" ").cat(devcode); | |
| 1509 | 1509 | if (modifier != NULL) |
| 1510 | str | |
| 1510 | str.cat(" ").cat(modifier); | |
| 1511 | 1511 | |
| 1512 | 1512 | // delete any leading spaces |
| 1513 | return str | |
| 1513 | return str.trimspace().c_str(); | |
| 1514 | 1514 | } |
| 1515 | 1515 | |
| 1516 | 1516 | |
| r245649 | r245650 | |
| 1518 | 1518 | // code_to_token - create a token for a given code |
| 1519 | 1519 | //------------------------------------------------- |
| 1520 | 1520 | |
| 1521 | const char *input_manager::code_to_token(astring &str | |
| 1521 | const char *input_manager::code_to_token(astring &str, input_code code) const | |
| 1522 | 1522 | { |
| 1523 | 1523 | // determine the devclass part |
| 1524 | 1524 | const char *devclass = (*devclass_token_table)[code.device_class()]; |
| r245649 | r245650 | |
| 1542 | 1542 | itemclass = (*itemclass_token_table)[code.item_class()]; |
| 1543 | 1543 | |
| 1544 | 1544 | // concatenate the strings |
| 1545 | str | |
| 1545 | str.cpy(devclass); | |
| 1546 | 1546 | if (devindex) |
| 1547 | str | |
| 1547 | str.cat("_").cat(devindex); | |
| 1548 | 1548 | if (devcode[0] != 0) |
| 1549 | str | |
| 1549 | str.cat("_").cat(devcode); | |
| 1550 | 1550 | if (modifier != NULL) |
| 1551 | str | |
| 1551 | str.cat("_").cat(modifier); | |
| 1552 | 1552 | if (itemclass[0] != 0) |
| 1553 | string.cat("_").cat(itemclass); | |
| 1554 | return string.c_str(); | |
| 1553 | str.cat("_").cat(itemclass); | |
| 1554 | return str.c_str(); | |
| 1555 | 1555 | } |
| 1556 | 1556 | |
| 1557 | 1557 | |
| r245649 | r245650 | |
| 1925 | 1925 | // sequence |
| 1926 | 1926 | //------------------------------------------------- |
| 1927 | 1927 | |
| 1928 | const char *input_manager::seq_name(astring &str | |
| 1928 | const char *input_manager::seq_name(astring &str, const input_seq &seq) const | |
| 1929 | 1929 | { |
| 1930 | 1930 | // make a copy of our sequence, removing any invalid bits |
| 1931 | 1931 | input_code clean_codes[sizeof(seq) / sizeof(input_code)]; |
| r245649 | r245650 | |
| 1946 | 1946 | |
| 1947 | 1947 | // special case: empty |
| 1948 | 1948 | if (clean_index == 0) |
| 1949 | return str | |
| 1949 | return str.cpy((seq.length() == 0) ? "None" : "n/a").c_str(); | |
| 1950 | 1950 | |
| 1951 | 1951 | // start with an empty buffer |
| 1952 | str | |
| 1952 | str.reset(); | |
| 1953 | 1953 | |
| 1954 | 1954 | // loop until we hit the end |
| 1955 | 1955 | for (int codenum = 0; codenum < clean_index; codenum++) |
| 1956 | 1956 | { |
| 1957 | 1957 | // append a space if not the first code |
| 1958 | 1958 | if (codenum != 0) |
| 1959 | str | |
| 1959 | str.cat(" "); | |
| 1960 | 1960 | |
| 1961 | 1961 | // handle OR/NOT codes here |
| 1962 | 1962 | input_code code = clean_codes[codenum]; |
| 1963 | 1963 | if (code == input_seq::or_code) |
| 1964 | str | |
| 1964 | str.cat("or"); | |
| 1965 | 1965 | else if (code == input_seq::not_code) |
| 1966 | str | |
| 1966 | str.cat("not"); | |
| 1967 | 1967 | |
| 1968 | 1968 | // otherwise, assume it is an input code and ask the input system to generate it |
| 1969 | 1969 | else |
| 1970 | str | |
| 1970 | str.cat(code_name(codestr, code)); | |
| 1971 | 1971 | } |
| 1972 | return str | |
| 1972 | return str.c_str(); | |
| 1973 | 1973 | } |
| 1974 | 1974 | |
| 1975 | 1975 | |
| r245649 | r245650 | |
| 1978 | 1978 | // a sequence |
| 1979 | 1979 | //------------------------------------------------- |
| 1980 | 1980 | |
| 1981 | const char *input_manager::seq_to_tokens(astring &str | |
| 1981 | const char *input_manager::seq_to_tokens(astring &str, const input_seq &seq) const | |
| 1982 | 1982 | { |
| 1983 | 1983 | // start with an empty buffer |
| 1984 | str | |
| 1984 | str.reset(); | |
| 1985 | 1985 | |
| 1986 | 1986 | // loop until we hit the end |
| 1987 | 1987 | astring codestr; |
| r245649 | r245650 | |
| 1989 | 1989 | { |
| 1990 | 1990 | // append a space if not the first code |
| 1991 | 1991 | if (codenum != 0) |
| 1992 | str | |
| 1992 | str.cat(" "); | |
| 1993 | 1993 | |
| 1994 | 1994 | // handle OR/NOT codes here |
| 1995 | 1995 | input_code code = seq[codenum]; |
| 1996 | 1996 | if (code == input_seq::or_code) |
| 1997 | str | |
| 1997 | str.cat("OR"); | |
| 1998 | 1998 | else if (code == input_seq::not_code) |
| 1999 | str | |
| 1999 | str.cat("NOT"); | |
| 2000 | 2000 | else if (code == input_seq::default_code) |
| 2001 | str | |
| 2001 | str.cat("DEFAULT"); | |
| 2002 | 2002 | |
| 2003 | 2003 | // otherwise, assume it is an input code and ask the input system to generate it |
| 2004 | 2004 | else |
| 2005 | str | |
| 2005 | str.cat(code_to_token(codestr, code)); | |
| 2006 | 2006 | } |
| 2007 | return str | |
| 2007 | return str.c_str(); | |
| 2008 | 2008 | } |
| 2009 | 2009 | |
| 2010 | 2010 |
| r245649 | r245650 | |
|---|---|---|
| 365 | 365 | bool parse(const char *mapstring); |
| 366 | 366 | |
| 367 | 367 | // create a friendly string |
| 368 | const char *to_string(astring &str | |
| 368 | const char *to_string(astring &str) const; | |
| 369 | 369 | |
| 370 | 370 | // update the state of a live map |
| 371 | 371 | UINT8 update(INT32 xaxisval, INT32 yaxisval); |
| r245649 | r245650 | |
| 655 | 655 | input_device *device_from_code(input_code code) const; |
| 656 | 656 | input_device_item *item_from_code(input_code code) const; |
| 657 | 657 | input_code code_from_itemid(input_item_id itemid) const; |
| 658 | const char *code_name(astring &string, input_code code) const; | |
| 659 | const char *code_to_token(astring &string, input_code code) const; | |
| 658 | const char *code_name(astring &str, input_code code) const; | |
| 659 | const char *code_to_token(astring &str, input_code code) const; | |
| 660 | 660 | input_code code_from_token(const char *_token); |
| 661 | 661 | |
| 662 | 662 | // input sequence readers |
| r245649 | r245650 | |
| 669 | 669 | const input_seq &seq_poll_final() const { return m_poll_seq; } |
| 670 | 670 | |
| 671 | 671 | // input sequence helpers |
| 672 | const char *seq_name(astring &string, const input_seq &seq) const; | |
| 673 | const char *seq_to_tokens(astring &string, const input_seq &seq) const; | |
| 672 | const char *seq_name(astring &str, const input_seq &seq) const; | |
| 673 | const char *seq_to_tokens(astring &str, const input_seq &seq) const; | |
| 674 | 674 | void seq_from_tokens(input_seq &seq, const char *_token); |
| 675 | 675 | |
| 676 | 676 | // misc |
| r245649 | r245650 | |
|---|---|---|
| 1307 | 1307 | // key_name - returns the name of a specific key |
| 1308 | 1308 | //------------------------------------------------- |
| 1309 | 1309 | |
| 1310 | const char *natural_keyboard::key_name(astring &str | |
| 1310 | const char *natural_keyboard::key_name(astring &str, unicode_char ch) | |
| 1311 | 1311 | { |
| 1312 | 1312 | // attempt to get the string from the character info table |
| 1313 | 1313 | const char_info *ci = char_info::find(ch); |
| 1314 | 1314 | const char *result = (ci != NULL) ? ci->name : NULL; |
| 1315 | 1315 | if (result != NULL) |
| 1316 | str | |
| 1316 | str.cpy(result); | |
| 1317 | 1317 | |
| 1318 | 1318 | // if that doesn't work, convert to UTF-8 |
| 1319 | 1319 | else if (ch > 0x7F || isprint(ch)) |
| r245649 | r245650 | |
| 1321 | 1321 | char buf[10]; |
| 1322 | 1322 | int count = utf8_from_uchar(buf, ARRAY_LENGTH(buf), ch); |
| 1323 | 1323 | buf[count] = 0; |
| 1324 | str | |
| 1324 | str.cpy(buf); | |
| 1325 | 1325 | } |
| 1326 | 1326 | |
| 1327 | 1327 | // otherwise, opt for question marks |
| 1328 | 1328 | else |
| 1329 | string.cpy("???"); | |
| 1330 | return string.c_str(); | |
| 1329 | str.cpy("???"); | |
| 1330 | return str.c_str(); | |
| 1331 | 1331 | } |
| 1332 | 1332 | |
| 1333 | 1333 | |
| r245649 | r245650 | |
| 4397 | 4397 | // type and player to a string token |
| 4398 | 4398 | //------------------------------------------------- |
| 4399 | 4399 | |
| 4400 | const char *ioport_manager::input_type_to_token(astring &str | |
| 4400 | const char *ioport_manager::input_type_to_token(astring &str, ioport_type type, int player) | |
| 4401 | 4401 | { |
| 4402 | 4402 | // look up the port and return the token |
| 4403 | 4403 | input_type_entry *entry = m_type_to_entry[type][player]; |
| 4404 | 4404 | if (entry != NULL) |
| 4405 | return str | |
| 4405 | return str.cpy(entry->token()).c_str(); | |
| 4406 | 4406 | |
| 4407 | 4407 | // if that fails, carry on |
| 4408 | return str | |
| 4408 | return str.format("TYPE_OTHER(%d,%d)", type, player).c_str(); | |
| 4409 | 4409 | } |
| 4410 | 4410 | |
| 4411 | 4411 |
| r245649 | r245650 | |
|---|---|---|
| 830 | 830 | void post_coded(const char *text, size_t length = 0, const attotime &rate = attotime::zero); |
| 831 | 831 | |
| 832 | 832 | void frame_update(ioport_port &port, ioport_value &digital); |
| 833 | const char *key_name(astring &str | |
| 833 | const char *key_name(astring &str, unicode_char ch); | |
| 834 | 834 | |
| 835 | 835 | // debugging |
| 836 | 836 | astring dump(); |
| r245649 | r245650 | |
| 1397 | 1397 | void setup_natural_keyboard(ioport_queue_chars_delegate queue_chars, ioport_accept_char_delegate accept_char, ioport_charqueue_empty_delegate charqueue_empty); |
| 1398 | 1398 | INT32 frame_interpolate(INT32 oldval, INT32 newval); |
| 1399 | 1399 | ioport_type token_to_input_type(const char *string, int &player) const; |
| 1400 | const char *input_type_to_token(astring &str | |
| 1400 | const char *input_type_to_token(astring &str, ioport_type type, int player); | |
| 1401 | 1401 | |
| 1402 | 1402 | private: |
| 1403 | 1403 | // internal helpers |
| r245649 | r245650 | |
|---|---|---|
| 268 | 268 | |
| 269 | 269 | // device_state_interface overrides |
| 270 | 270 | |
| 271 | virtual void state_string_export(const device_state_entry &entry, astring &str | |
| 271 | virtual void state_string_export(const device_state_entry &entry, astring &str) | |
| 272 | 272 | { |
| 273 | 273 | if (entry.index() >= 0) |
| 274 | 274 | { |
| 275 | 275 | if (entry.index() & 1) |
| 276 | str | |
| 276 | str.format("%10.6f", *((double *)entry.dataptr())); | |
| 277 | 277 | else |
| 278 | str | |
| 278 | str.format("%d", *((netlist_sig_t *)entry.dataptr())); | |
| 279 | 279 | } |
| 280 | 280 | } |
| 281 | 281 |
| r245649 | r245650 | |
|---|---|---|
| 163 | 163 | // on a given stream's input |
| 164 | 164 | //------------------------------------------------- |
| 165 | 165 | |
| 166 | const char *sound_stream::input_name(int inputnum, astring &str | |
| 166 | const char *sound_stream::input_name(int inputnum, astring &str) const | |
| 167 | 167 | { |
| 168 | 168 | // start with our device name and tag |
| 169 | 169 | assert(inputnum >= 0 && inputnum < m_input.count()); |
| 170 | str | |
| 170 | str.printf("%s '%s': ", m_device.name(), m_device.tag()); | |
| 171 | 171 | |
| 172 | 172 | // if we have a source, indicate where the sound comes from by device name and tag |
| 173 | 173 | if (m_input[inputnum].m_source != NULL && m_input[inputnum].m_source->m_stream != NULL) |
| 174 | 174 | { |
| 175 | 175 | device_t &source = m_input[inputnum].m_source->m_stream->device(); |
| 176 | str | |
| 176 | str.catprintf("%s '%s'", source.name(), source.tag()); | |
| 177 | 177 | |
| 178 | 178 | // get the sound interface; if there is more than 1 output we need to figure out which one |
| 179 | 179 | device_sound_interface *sound; |
| r245649 | r245650 | |
| 186 | 186 | for (int outputnum = 0; (outstream = sound->output_to_stream_output(outputnum, streamoutputnum)) != NULL; outputnum++) |
| 187 | 187 | if (outstream == m_input[inputnum].m_source->m_stream && m_input[inputnum].m_source == &outstream->m_output[streamoutputnum]) |
| 188 | 188 | { |
| 189 | str | |
| 189 | str.catprintf(" Ch.%d", outputnum); | |
| 190 | 190 | break; |
| 191 | 191 | } |
| 192 | 192 | } |
| 193 | 193 | } |
| 194 | return str | |
| 194 | return str.c_str(); | |
| 195 | 195 | } |
| 196 | 196 | |
| 197 | 197 |
| r245649 | r245650 | |
|---|---|---|
| 106 | 106 | attotime sample_period() const { return attotime(0, m_attoseconds_per_sample); } |
| 107 | 107 | int input_count() const { return m_input.count(); } |
| 108 | 108 | int output_count() const { return m_output.count(); } |
| 109 | const char *input_name(int inputnum, astring &str | |
| 109 | const char *input_name(int inputnum, astring &str) const; | |
| 110 | 110 | device_t *input_source_device(int inputnum) const; |
| 111 | 111 | int input_source_outputnum(int inputnum) const; |
| 112 | 112 | float user_gain(int inputnum) const; |
| r245649 | r245650 | |
|---|---|---|
| 39 | 39 | |
| 40 | 40 | void ui_menu_device_config::populate() |
| 41 | 41 | { |
| 42 | astring str | |
| 42 | astring str; | |
| 43 | 43 | device_t *dev; |
| 44 | 44 | |
| 45 | string.printf("[This option is%s currently mounted in the running system]\n\n", m_mounted ? "" : " NOT"); | |
| 46 | string.catprintf("Option: %s\n", m_option->name()); | |
| 45 | str.printf("[This option is%s currently mounted in the running system]\n\n", m_mounted ? "" : " NOT"); | |
| 46 | str.catprintf("Option: %s\n", m_option->name()); | |
| 47 | 47 | |
| 48 | 48 | dev = const_cast<machine_config &>(machine().config()).device_add(&machine().config().root_device(), m_option->name(), m_option->devtype(), 0); |
| 49 | 49 | |
| 50 | str | |
| 50 | str.catprintf("Device: %s\n", dev->name()); | |
| 51 | 51 | if (!m_mounted) |
| 52 | str | |
| 52 | str.cat("\nIf you select this option, the following items will be enabled:\n"); | |
| 53 | 53 | else |
| 54 | str | |
| 54 | str.cat("\nThe selected option enables the following items:\n"); | |
| 55 | 55 | |
| 56 | 56 | // loop over all CPUs |
| 57 | 57 | execute_interface_iterator execiter(*dev); |
| 58 | 58 | if (execiter.count() > 0) |
| 59 | 59 | { |
| 60 | str | |
| 60 | str.cat("* CPU:\n"); | |
| 61 | 61 | tagmap_t<UINT8> exectags; |
| 62 | 62 | for (device_execute_interface *exec = execiter.first(); exec != NULL; exec = execiter.next()) |
| 63 | 63 | { |
| r245649 | r245650 | |
| 80 | 80 | |
| 81 | 81 | // if more than one, prepend a #x in front of the CPU name |
| 82 | 82 | if (count > 1) |
| 83 | str | |
| 83 | str.catprintf(" %d" UTF8_MULTIPLY, count); | |
| 84 | 84 | else |
| 85 | string.cat(" "); | |
| 86 | string.cat(name); | |
| 85 | str.cat(" "); | |
| 86 | str.cat(name); | |
| 87 | 87 | |
| 88 | 88 | // display clock in kHz or MHz |
| 89 | 89 | if (clock >= 1000000) |
| 90 | str | |
| 90 | str.catprintf(" %d.%06d" UTF8_NBSP "MHz\n", clock / 1000000, clock % 1000000); | |
| 91 | 91 | else |
| 92 | str | |
| 92 | str.catprintf(" %d.%03d" UTF8_NBSP "kHz\n", clock / 1000, clock % 1000); | |
| 93 | 93 | } |
| 94 | 94 | } |
| 95 | 95 | |
| r245649 | r245650 | |
| 97 | 97 | screen_device_iterator scriter(*dev); |
| 98 | 98 | if (scriter.count() > 0) |
| 99 | 99 | { |
| 100 | str | |
| 100 | str.cat("* Video:\n"); | |
| 101 | 101 | for (screen_device *screen = scriter.first(); screen != NULL; screen = scriter.next()) |
| 102 | 102 | { |
| 103 | str | |
| 103 | str.catprintf(" Screen '%s': ", screen->tag()); | |
| 104 | 104 | |
| 105 | 105 | if (screen->screen_type() == SCREEN_TYPE_VECTOR) |
| 106 | str | |
| 106 | str.cat("Vector\n"); | |
| 107 | 107 | else |
| 108 | 108 | { |
| 109 | 109 | const rectangle &visarea = screen->visible_area(); |
| 110 | 110 | |
| 111 | str | |
| 111 | str.catprintf("%d " UTF8_MULTIPLY " %d (%s) %f" UTF8_NBSP "Hz\n", | |
| 112 | 112 | visarea.width(), visarea.height(), |
| 113 | 113 | (machine().system().flags & ORIENTATION_SWAP_XY) ? "V" : "H", |
| 114 | 114 | ATTOSECONDS_TO_HZ(screen->frame_period().attoseconds)); |
| r245649 | r245650 | |
| 120 | 120 | sound_interface_iterator snditer(*dev); |
| 121 | 121 | if (snditer.count() > 0) |
| 122 | 122 | { |
| 123 | str | |
| 123 | str.cat("* Sound:\n"); | |
| 124 | 124 | tagmap_t<UINT8> soundtags; |
| 125 | 125 | for (device_sound_interface *sound = snditer.first(); sound != NULL; sound = snditer.next()) |
| 126 | 126 | { |
| r245649 | r245650 | |
| 138 | 138 | } |
| 139 | 139 | // if more than one, prepend a #x in front of the CPU name |
| 140 | 140 | if (count > 1) |
| 141 | str | |
| 141 | str.catprintf(" %d" UTF8_MULTIPLY, count); | |
| 142 | 142 | else |
| 143 | string.cat(" "); | |
| 144 | string.cat(sound->device().name()); | |
| 143 | str.cat(" "); | |
| 144 | str.cat(sound->device().name()); | |
| 145 | 145 | |
| 146 | 146 | // display clock in kHz or MHz |
| 147 | 147 | int clock = sound->device().clock(); |
| 148 | 148 | if (clock >= 1000000) |
| 149 | str | |
| 149 | str.catprintf(" %d.%06d" UTF8_NBSP "MHz\n", clock / 1000000, clock % 1000000); | |
| 150 | 150 | else if (clock != 0) |
| 151 | str | |
| 151 | str.catprintf(" %d.%03d" UTF8_NBSP "kHz\n", clock / 1000, clock % 1000); | |
| 152 | 152 | else |
| 153 | str | |
| 153 | str.cat("\n"); | |
| 154 | 154 | } |
| 155 | 155 | } |
| 156 | 156 | |
| r245649 | r245650 | |
| 176 | 176 | } |
| 177 | 177 | |
| 178 | 178 | if (bios) |
| 179 | str | |
| 179 | str.catprintf("* BIOS settings:\n %d options [default: %s]\n", bios, bios_str.c_str()); | |
| 180 | 180 | } |
| 181 | 181 | |
| 182 | 182 | int input = 0, input_mj = 0, input_hana = 0, input_gamble = 0, input_analog = 0, input_adjust = 0; |
| r245649 | r245650 | |
| 236 | 236 | } |
| 237 | 237 | |
| 238 | 238 | if (dips) |
| 239 | str | |
| 239 | str.cat("* Dispwitch settings:\n").cat(dips_opt); | |
| 240 | 240 | if (confs) |
| 241 | str | |
| 241 | str.cat("* Configuration settings:\n").cat(confs_opt); | |
| 242 | 242 | if (input + input_mj + input_hana + input_gamble + input_analog + input_adjust + input_keypad + input_keyboard) |
| 243 | str | |
| 243 | str.cat("* Input device(s):\n"); | |
| 244 | 244 | if (input) |
| 245 | str | |
| 245 | str.catprintf(" User inputs [%d inputs]\n", input); | |
| 246 | 246 | if (input_mj) |
| 247 | str | |
| 247 | str.catprintf(" Mahjong inputs [%d inputs]\n", input_mj); | |
| 248 | 248 | if (input_hana) |
| 249 | str | |
| 249 | str.catprintf(" Hanafuda inputs [%d inputs]\n", input_hana); | |
| 250 | 250 | if (input_gamble) |
| 251 | str | |
| 251 | str.catprintf(" Gambling inputs [%d inputs]\n", input_gamble); | |
| 252 | 252 | if (input_analog) |
| 253 | str | |
| 253 | str.catprintf(" Analog inputs [%d inputs]\n", input_analog); | |
| 254 | 254 | if (input_adjust) |
| 255 | str | |
| 255 | str.catprintf(" Adjuster inputs [%d inputs]\n", input_adjust); | |
| 256 | 256 | if (input_keypad) |
| 257 | str | |
| 257 | str.catprintf(" Keypad inputs [%d inputs]\n", input_keypad); | |
| 258 | 258 | if (input_keyboard) |
| 259 | str | |
| 259 | str.catprintf(" Keyboard inputs [%d inputs]\n", input_keyboard); | |
| 260 | 260 | |
| 261 | 261 | image_interface_iterator imgiter(*dev); |
| 262 | 262 | if (imgiter.count() > 0) |
| 263 | 263 | { |
| 264 | str | |
| 264 | str.cat("* Media Options:\n"); | |
| 265 | 265 | for (const device_image_interface *imagedev = imgiter.first(); imagedev != NULL; imagedev = imgiter.next()) |
| 266 | str | |
| 266 | str.catprintf(" %s [tag: %s]\n", imagedev->image_type_name(), imagedev->device().tag()); | |
| 267 | 267 | } |
| 268 | 268 | |
| 269 | 269 | slot_interface_iterator slotiter(*dev); |
| 270 | 270 | if (slotiter.count() > 0) |
| 271 | 271 | { |
| 272 | str | |
| 272 | str.cat("* Slot Options:\n"); | |
| 273 | 273 | for (const device_slot_interface *slot = slotiter.first(); slot != NULL; slot = slotiter.next()) |
| 274 | str | |
| 274 | str.catprintf(" %s [default: %s]\n", slot->device().tag(), slot->default_option() ? slot->default_option() : "----"); | |
| 275 | 275 | } |
| 276 | 276 | |
| 277 | 277 | if ((execiter.count() + scriter.count() + snditer.count() + imgiter.count() + slotiter.count() + bios + dips + confs |
| 278 | 278 | + input + input_mj + input_hana + input_gamble + input_analog + input_adjust + input_keypad + input_keyboard) == 0) |
| 279 | str | |
| 279 | str.cat("[None]\n"); | |
| 280 | 280 | |
| 281 | 281 | const_cast<machine_config &>(machine().config()).device_remove(&machine().config().root_device(), m_option->name()); |
| 282 | item_append(str | |
| 282 | item_append(str.c_str(), NULL, MENU_FLAG_MULTILINE, NULL); | |
| 283 | 283 | } |
| 284 | 284 | |
| 285 | 285 | void ui_menu_device_config::handle() |
| r245649 | r245650 | |
|---|---|---|
| 85 | 85 | // if image has been loaded through softlist, let's add some more info |
| 86 | 86 | if (image->software_entry()) |
| 87 | 87 | { |
| 88 | astring str | |
| 88 | astring str; | |
| 89 | 89 | |
| 90 | 90 | // display long filename |
| 91 | 91 | item_append(image->longname(), "", MENU_FLAG_DISABLE, NULL); |
| 92 | 92 | |
| 93 | 93 | // display manufacturer and year |
| 94 | string.catprintf("%s, %s", image->manufacturer(), image->year()); | |
| 95 | item_append(string.c_str(), "", MENU_FLAG_DISABLE, NULL); | |
| 94 | str.catprintf("%s, %s", image->manufacturer(), image->year()); | |
| 95 | item_append(str.c_str(), "", MENU_FLAG_DISABLE, NULL); | |
| 96 | 96 | |
| 97 | 97 | // display supported information, if available |
| 98 | 98 | switch (image->supported()) |
| r245649 | r245650 | |
|---|---|---|
| 989 | 989 | // text to the given buffer |
| 990 | 990 | //------------------------------------------------- |
| 991 | 991 | |
| 992 | astring &ui_manager::disclaimer_string(astring &str | |
| 992 | astring &ui_manager::disclaimer_string(astring &str) | |
| 993 | 993 | { |
| 994 | string.cpy("Usage of emulators in conjunction with ROMs you don't own is forbidden by copyright law.\n\n"); | |
| 995 | string.catprintf("IF YOU ARE NOT LEGALLY ENTITLED TO PLAY \"%s\" ON THIS EMULATOR, PRESS ESC.\n\n", machine().system().description); | |
| 996 | string.cat("Otherwise, type OK or move the joystick left then right to continue"); | |
| 997 | return string; | |
| 994 | str.cpy("Usage of emulators in conjunction with ROMs you don't own is forbidden by copyright law.\n\n"); | |
| 995 | str.catprintf("IF YOU ARE NOT LEGALLY ENTITLED TO PLAY \"%s\" ON THIS EMULATOR, PRESS ESC.\n\n", machine().system().description); | |
| 996 | str.cat("Otherwise, type OK or move the joystick left then right to continue"); | |
| 997 | return str; | |
| 998 | 998 | } |
| 999 | 999 | |
| 1000 | 1000 | |
| r245649 | r245650 | |
| 1003 | 1003 | // text to the given buffer |
| 1004 | 1004 | //------------------------------------------------- |
| 1005 | 1005 | |
| 1006 | astring &ui_manager::warnings_string(astring &str | |
| 1006 | astring &ui_manager::warnings_string(astring &str) | |
| 1007 | 1007 | { |
| 1008 | 1008 | #define WARNING_FLAGS ( GAME_NOT_WORKING | \ |
| 1009 | 1009 | GAME_UNEMULATED_PROTECTION | \ |
| r245649 | r245650 | |
| 1017 | 1017 | GAME_IMPERFECT_KEYBOARD | \ |
| 1018 | 1018 | GAME_NO_COCKTAIL) |
| 1019 | 1019 | |
| 1020 | str | |
| 1020 | str.reset(); | |
| 1021 | 1021 | |
| 1022 | 1022 | // if no warnings, nothing to return |
| 1023 | 1023 | if (rom_load_warnings(machine()) == 0 && rom_load_knownbad(machine()) == 0 && !(machine().system().flags & WARNING_FLAGS) && software_load_warnings_message(machine()).len()==0) |
| 1024 | return str | |
| 1024 | return str; | |
| 1025 | 1025 | |
| 1026 | 1026 | // add a warning if any ROMs were loaded with warnings |
| 1027 | 1027 | if (rom_load_warnings(machine()) > 0) |
| 1028 | 1028 | { |
| 1029 | string.cat("One or more ROMs/CHDs for this game are incorrect. The "); | |
| 1030 | string.cat(emulator_info::get_gamenoun()); | |
| 1031 | string.cat(" may not run correctly.\n"); | |
| 1029 | str.cat("One or more ROMs/CHDs for this game are incorrect. The "); | |
| 1030 | str.cat(emulator_info::get_gamenoun()); | |
| 1031 | str.cat(" may not run correctly.\n"); | |
| 1032 | 1032 | if (machine().system().flags & WARNING_FLAGS) |
| 1033 | str | |
| 1033 | str.cat("\n"); | |
| 1034 | 1034 | } |
| 1035 | 1035 | |
| 1036 | 1036 | if (software_load_warnings_message(machine()).len()>0) { |
| 1037 | str | |
| 1037 | str.cat(software_load_warnings_message(machine())); | |
| 1038 | 1038 | if (machine().system().flags & WARNING_FLAGS) |
| 1039 | str | |
| 1039 | str.cat("\n"); | |
| 1040 | 1040 | } |
| 1041 | 1041 | // if we have at least one warning flag, print the general header |
| 1042 | 1042 | if ((machine().system().flags & WARNING_FLAGS) || rom_load_knownbad(machine()) > 0) |
| 1043 | 1043 | { |
| 1044 | string.cat("There are known problems with this "); | |
| 1045 | string.cat(emulator_info::get_gamenoun()); | |
| 1046 | string.cat("\n\n"); | |
| 1044 | str.cat("There are known problems with this "); | |
| 1045 | str.cat(emulator_info::get_gamenoun()); | |
| 1046 | str.cat("\n\n"); | |
| 1047 | 1047 | |
| 1048 | 1048 | // add a warning if any ROMs are flagged BAD_DUMP/NO_DUMP |
| 1049 | 1049 | if (rom_load_knownbad(machine()) > 0) { |
| 1050 | string.cat("One or more ROMs/CHDs for this "); | |
| 1051 | string.cat(emulator_info::get_gamenoun()); | |
| 1052 | string.cat(" have not been correctly dumped.\n"); | |
| 1050 | str.cat("One or more ROMs/CHDs for this "); | |
| 1051 | str.cat(emulator_info::get_gamenoun()); | |
| 1052 | str.cat(" have not been correctly dumped.\n"); | |
| 1053 | 1053 | } |
| 1054 | 1054 | // add one line per warning flag |
| 1055 | 1055 | if (machine().system().flags & GAME_IMPERFECT_KEYBOARD) |
| 1056 | str | |
| 1056 | str.cat("The keyboard emulation may not be 100% accurate.\n"); | |
| 1057 | 1057 | if (machine().system().flags & GAME_IMPERFECT_COLORS) |
| 1058 | str | |
| 1058 | str.cat("The colors aren't 100% accurate.\n"); | |
| 1059 | 1059 | if (machine().system().flags & GAME_WRONG_COLORS) |
| 1060 | str | |
| 1060 | str.cat("The colors are completely wrong.\n"); | |
| 1061 | 1061 | if (machine().system().flags & GAME_IMPERFECT_GRAPHICS) |
| 1062 | str | |
| 1062 | str.cat("The video emulation isn't 100% accurate.\n"); | |
| 1063 | 1063 | if (machine().system().flags & GAME_IMPERFECT_SOUND) |
| 1064 | str | |
| 1064 | str.cat("The sound emulation isn't 100% accurate.\n"); | |
| 1065 | 1065 | if (machine().system().flags & GAME_NO_SOUND) |
| 1066 | str | |
| 1066 | str.cat("The game lacks sound.\n"); | |
| 1067 | 1067 | if (machine().system().flags & GAME_NO_COCKTAIL) |
| 1068 | str | |
| 1068 | str.cat("Screen flipping in cocktail mode is not supported.\n"); | |
| 1069 | 1069 | |
| 1070 | 1070 | // check if external artwork is present before displaying this warning? |
| 1071 | 1071 | if (machine().system().flags & GAME_REQUIRES_ARTWORK) |
| 1072 | str | |
| 1072 | str.cat("The game requires external artwork files\n"); | |
| 1073 | 1073 | |
| 1074 | 1074 | // if there's a NOT WORKING, UNEMULATED PROTECTION or GAME MECHANICAL warning, make it stronger |
| 1075 | 1075 | if (machine().system().flags & (GAME_NOT_WORKING | GAME_UNEMULATED_PROTECTION | GAME_MECHANICAL)) |
| 1076 | 1076 | { |
| 1077 | 1077 | // add the strings for these warnings |
| 1078 | 1078 | if (machine().system().flags & GAME_UNEMULATED_PROTECTION) |
| 1079 | str | |
| 1079 | str.cat("The game has protection which isn't fully emulated.\n"); | |
| 1080 | 1080 | if (machine().system().flags & GAME_NOT_WORKING) { |
| 1081 | string.cat("\nTHIS "); | |
| 1082 | string.cat(emulator_info::get_capgamenoun()); | |
| 1083 | string.cat(" DOESN'T WORK. The emulation for this game is not yet complete. " | |
| 1081 | str.cat("\nTHIS "); | |
| 1082 | str.cat(emulator_info::get_capgamenoun()); | |
| 1083 | str.cat(" DOESN'T WORK. The emulation for this game is not yet complete. " | |
| 1084 | 1084 | "There is nothing you can do to fix this problem except wait for the developers to improve the emulation.\n"); |
| 1085 | 1085 | } |
| 1086 | 1086 | if (machine().system().flags & GAME_MECHANICAL) { |
| 1087 | string.cat("\nCertain elements of this "); | |
| 1088 | string.cat(emulator_info::get_gamenoun()); | |
| 1089 | string.cat(" cannot be emulated as it requires actual physical interaction or consists of mechanical devices. " | |
| 1087 | str.cat("\nCertain elements of this "); | |
| 1088 | str.cat(emulator_info::get_gamenoun()); | |
| 1089 | str.cat(" cannot be emulated as it requires actual physical interaction or consists of mechanical devices. " | |
| 1090 | 1090 | "It is not possible to fully play this "); |
| 1091 | string.cat(emulator_info::get_gamenoun()); | |
| 1092 | string.cat(".\n"); | |
| 1091 | str.cat(emulator_info::get_gamenoun()); | |
| 1092 | str.cat(".\n"); | |
| 1093 | 1093 | } |
| 1094 | 1094 | |
| 1095 | 1095 | // find the parent of this driver |
| r245649 | r245650 | |
| 1107 | 1107 | { |
| 1108 | 1108 | // this one works, add a header and display the name of the clone |
| 1109 | 1109 | if (!foundworking) |
| 1110 | str | |
| 1110 | str.cat("\n\nThere are working clones of this game: "); | |
| 1111 | 1111 | else |
| 1112 | string.cat(", "); | |
| 1113 | string.cat(drivlist.driver().name); | |
| 1112 | str.cat(", "); | |
| 1113 | str.cat(drivlist.driver().name); | |
| 1114 | 1114 | foundworking = true; |
| 1115 | 1115 | } |
| 1116 | 1116 | |
| 1117 | 1117 | if (foundworking) |
| 1118 | str | |
| 1118 | str.cat("\n"); | |
| 1119 | 1119 | } |
| 1120 | 1120 | } |
| 1121 | 1121 | |
| 1122 | 1122 | // add the 'press OK' string |
| 1123 | string.cat("\n\nType OK or move the joystick left then right to continue"); | |
| 1124 | return string; | |
| 1123 | str.cat("\n\nType OK or move the joystick left then right to continue"); | |
| 1124 | return str; | |
| 1125 | 1125 | } |
| 1126 | 1126 | |
| 1127 | 1127 | |
| r245649 | r245650 | |
| 1130 | 1130 | // string with the game info text |
| 1131 | 1131 | //------------------------------------------------- |
| 1132 | 1132 | |
| 1133 | astring &ui_manager::game_info_astring(astring &str | |
| 1133 | astring &ui_manager::game_info_astring(astring &str) | |
| 1134 | 1134 | { |
| 1135 | 1135 | // print description, manufacturer, and CPU: |
| 1136 | 1136 | astring tempstr; |
| 1137 | str | |
| 1137 | str.printf("%s\n%s %s\nDriver: %s\n\nCPU:\n", machine().system().description, machine().system().year, machine().system().manufacturer, core_filename_extract_base(tempstr, machine().system().source_file).c_str()); | |
| 1138 | 1138 | |
| 1139 | 1139 | // loop over all CPUs |
| 1140 | 1140 | execute_interface_iterator execiter(machine().root_device()); |
| r245649 | r245650 | |
| 1159 | 1159 | |
| 1160 | 1160 | // if more than one, prepend a #x in front of the CPU name |
| 1161 | 1161 | if (count > 1) |
| 1162 | string.catprintf("%d" UTF8_MULTIPLY, count); | |
| 1163 | string.cat(name); | |
| 1162 | str.catprintf("%d" UTF8_MULTIPLY, count); | |
| 1163 | str.cat(name); | |
| 1164 | 1164 | |
| 1165 | 1165 | // display clock in kHz or MHz |
| 1166 | 1166 | if (clock >= 1000000) |
| 1167 | str | |
| 1167 | str.catprintf(" %d.%06d" UTF8_NBSP "MHz\n", clock / 1000000, clock % 1000000); | |
| 1168 | 1168 | else |
| 1169 | str | |
| 1169 | str.catprintf(" %d.%03d" UTF8_NBSP "kHz\n", clock / 1000, clock % 1000); | |
| 1170 | 1170 | } |
| 1171 | 1171 | |
| 1172 | 1172 | // loop over all sound chips |
| r245649 | r245650 | |
| 1180 | 1180 | |
| 1181 | 1181 | // append the Sound: string |
| 1182 | 1182 | if (!found_sound) |
| 1183 | str | |
| 1183 | str.cat("\nSound:\n"); | |
| 1184 | 1184 | found_sound = true; |
| 1185 | 1185 | |
| 1186 | 1186 | // count how many identical sound chips we have |
| r245649 | r245650 | |
| 1194 | 1194 | } |
| 1195 | 1195 | // if more than one, prepend a #x in front of the CPU name |
| 1196 | 1196 | if (count > 1) |
| 1197 | string.catprintf("%d" UTF8_MULTIPLY, count); | |
| 1198 | string.cat(sound->device().name()); | |
| 1197 | str.catprintf("%d" UTF8_MULTIPLY, count); | |
| 1198 | str.cat(sound->device().name()); | |
| 1199 | 1199 | |
| 1200 | 1200 | // display clock in kHz or MHz |
| 1201 | 1201 | int clock = sound->device().clock(); |
| 1202 | 1202 | if (clock >= 1000000) |
| 1203 | str | |
| 1203 | str.catprintf(" %d.%06d" UTF8_NBSP "MHz\n", clock / 1000000, clock % 1000000); | |
| 1204 | 1204 | else if (clock != 0) |
| 1205 | str | |
| 1205 | str.catprintf(" %d.%03d" UTF8_NBSP "kHz\n", clock / 1000, clock % 1000); | |
| 1206 | 1206 | else |
| 1207 | str | |
| 1207 | str.cat("\n"); | |
| 1208 | 1208 | } |
| 1209 | 1209 | |
| 1210 | 1210 | // display screen information |
| 1211 | str | |
| 1211 | str.cat("\nVideo:\n"); | |
| 1212 | 1212 | screen_device_iterator scriter(machine().root_device()); |
| 1213 | 1213 | int scrcount = scriter.count(); |
| 1214 | 1214 | if (scrcount == 0) |
| 1215 | str | |
| 1215 | str.cat("None\n"); | |
| 1216 | 1216 | else |
| 1217 | 1217 | { |
| 1218 | 1218 | for (screen_device *screen = scriter.first(); screen != NULL; screen = scriter.next()) |
| 1219 | 1219 | { |
| 1220 | 1220 | if (scrcount > 1) |
| 1221 | 1221 | { |
| 1222 | string.cat(slider_get_screen_desc(*screen)); | |
| 1223 | string.cat(": "); | |
| 1222 | str.cat(slider_get_screen_desc(*screen)); | |
| 1223 | str.cat(": "); | |
| 1224 | 1224 | } |
| 1225 | 1225 | |
| 1226 | 1226 | if (screen->screen_type() == SCREEN_TYPE_VECTOR) |
| 1227 | str | |
| 1227 | str.cat("Vector\n"); | |
| 1228 | 1228 | else |
| 1229 | 1229 | { |
| 1230 | 1230 | const rectangle &visarea = screen->visible_area(); |
| 1231 | 1231 | |
| 1232 | str | |
| 1232 | str.catprintf("%d " UTF8_MULTIPLY " %d (%s) %f" UTF8_NBSP "Hz\n", | |
| 1233 | 1233 | visarea.width(), visarea.height(), |
| 1234 | 1234 | (machine().system().flags & ORIENTATION_SWAP_XY) ? "V" : "H", |
| 1235 | 1235 | ATTOSECONDS_TO_HZ(screen->frame_period().attoseconds)); |
| r245649 | r245650 | |
| 1237 | 1237 | } |
| 1238 | 1238 | } |
| 1239 | 1239 | |
| 1240 | return str | |
| 1240 | return str; | |
| 1241 | 1241 | } |
| 1242 | 1242 | |
| 1243 | 1243 | |
| r245649 | r245650 | |
| 1828 | 1828 | ioport_port *port; |
| 1829 | 1829 | slider_state *listhead = NULL; |
| 1830 | 1830 | slider_state **tailptr = &listhead; |
| 1831 | astring str | |
| 1831 | astring str; | |
| 1832 | 1832 | int item; |
| 1833 | 1833 | |
| 1834 | 1834 | // add overall volume |
| r245649 | r245650 | |
| 1842 | 1842 | INT32 maxval = 2000; |
| 1843 | 1843 | INT32 defval = 1000; |
| 1844 | 1844 | |
| 1845 | info.stream->input_name(info.inputnum, string); | |
| 1846 | string.cat(" Volume"); | |
| 1847 | *tailptr = slider_alloc(machine, string.c_str(), 0, defval, maxval, 20, slider_mixervol, (void *)(FPTR)item); | |
| 1845 | info.stream->input_name(info.inputnum, str); | |
| 1846 | str.cat(" Volume"); | |
| 1847 | *tailptr = slider_alloc(machine, str.c_str(), 0, defval, maxval, 20, slider_mixervol, (void *)(FPTR)item); | |
| 1848 | 1848 | tailptr = &(*tailptr)->next; |
| 1849 | 1849 | } |
| 1850 | 1850 | |
| r245649 | r245650 | |
| 1865 | 1865 | for (device_execute_interface *exec = iter.first(); exec != NULL; exec = iter.next()) |
| 1866 | 1866 | { |
| 1867 | 1867 | void *param = (void *)&exec->device(); |
| 1868 | string.printf("Overclock CPU %s", exec->device().tag()); | |
| 1869 | *tailptr = slider_alloc(machine, string.c_str(), 10, 1000, 2000, 1, slider_overclock, param); | |
| 1868 | str.printf("Overclock CPU %s", exec->device().tag()); | |
| 1869 | *tailptr = slider_alloc(machine, str.c_str(), 10, 1000, 2000, 1, slider_overclock, param); | |
| 1870 | 1870 | tailptr = &(*tailptr)->next; |
| 1871 | 1871 | } |
| 1872 | 1872 | } |
| r245649 | r245650 | |
| 1884 | 1884 | // add refresh rate tweaker |
| 1885 | 1885 | if (machine.options().cheat()) |
| 1886 | 1886 | { |
| 1887 | string.printf("%s Refresh Rate", slider_get_screen_desc(*screen)); | |
| 1888 | *tailptr = slider_alloc(machine, string.c_str(), -10000, 0, 10000, 1000, slider_refresh, param); | |
| 1887 | str.printf("%s Refresh Rate", slider_get_screen_desc(*screen)); | |
| 1888 | *tailptr = slider_alloc(machine, str.c_str(), -10000, 0, 10000, 1000, slider_refresh, param); | |
| 1889 | 1889 | tailptr = &(*tailptr)->next; |
| 1890 | 1890 | } |
| 1891 | 1891 | |
| 1892 | 1892 | // add standard brightness/contrast/gamma controls per-screen |
| 1893 | string.printf("%s Brightness", slider_get_screen_desc(*screen)); | |
| 1894 | *tailptr = slider_alloc(machine, string.c_str(), 100, 1000, 2000, 10, slider_brightness, param); | |
| 1893 | str.printf("%s Brightness", slider_get_screen_desc(*screen)); | |
| 1894 | *tailptr = slider_alloc(machine, str.c_str(), 100, 1000, 2000, 10, slider_brightness, param); | |
| 1895 | 1895 | tailptr = &(*tailptr)->next; |
| 1896 | string.printf("%s Contrast", slider_get_screen_desc(*screen)); | |
| 1897 | *tailptr = slider_alloc(machine, string.c_str(), 100, 1000, 2000, 50, slider_contrast, param); | |
| 1896 | str.printf("%s Contrast", slider_get_screen_desc(*screen)); | |
| 1897 | *tailptr = slider_alloc(machine, str.c_str(), 100, 1000, 2000, 50, slider_contrast, param); | |
| 1898 | 1898 | tailptr = &(*tailptr)->next; |
| 1899 | string.printf("%s Gamma", slider_get_screen_desc(*screen)); | |
| 1900 | *tailptr = slider_alloc(machine, string.c_str(), 100, 1000, 3000, 50, slider_gamma, param); | |
| 1899 | str.printf("%s Gamma", slider_get_screen_desc(*screen)); | |
| 1900 | *tailptr = slider_alloc(machine, str.c_str(), 100, 1000, 3000, 50, slider_gamma, param); | |
| 1901 | 1901 | tailptr = &(*tailptr)->next; |
| 1902 | 1902 | |
| 1903 | 1903 | // add scale and offset controls per-screen |
| 1904 | string.printf("%s Horiz Stretch", slider_get_screen_desc(*screen)); | |
| 1905 | *tailptr = slider_alloc(machine, string.c_str(), 500, defxscale, 1500, 2, slider_xscale, param); | |
| 1904 | str.printf("%s Horiz Stretch", slider_get_screen_desc(*screen)); | |
| 1905 | *tailptr = slider_alloc(machine, str.c_str(), 500, defxscale, 1500, 2, slider_xscale, param); | |
| 1906 | 1906 | tailptr = &(*tailptr)->next; |
| 1907 | string.printf("%s Horiz Position", slider_get_screen_desc(*screen)); | |
| 1908 | *tailptr = slider_alloc(machine, string.c_str(), -500, defxoffset, 500, 2, slider_xoffset, param); | |
| 1907 | str.printf("%s Horiz Position", slider_get_screen_desc(*screen)); | |
| 1908 | *tailptr = slider_alloc(machine, str.c_str(), -500, defxoffset, 500, 2, slider_xoffset, param); | |
| 1909 | 1909 | tailptr = &(*tailptr)->next; |
| 1910 | string.printf("%s Vert Stretch", slider_get_screen_desc(*screen)); | |
| 1911 | *tailptr = slider_alloc(machine, string.c_str(), 500, defyscale, 1500, 2, slider_yscale, param); | |
| 1910 | str.printf("%s Vert Stretch", slider_get_screen_desc(*screen)); | |
| 1911 | *tailptr = slider_alloc(machine, str.c_str(), 500, defyscale, 1500, 2, slider_yscale, param); | |
| 1912 | 1912 | tailptr = &(*tailptr)->next; |
| 1913 | string.printf("%s Vert Position", slider_get_screen_desc(*screen)); | |
| 1914 | *tailptr = slider_alloc(machine, string.c_str(), -500, defyoffset, 500, 2, slider_yoffset, param); | |
| 1913 | str.printf("%s Vert Position", slider_get_screen_desc(*screen)); | |
| 1914 | *tailptr = slider_alloc(machine, str.c_str(), -500, defyoffset, 500, 2, slider_yoffset, param); | |
| 1915 | 1915 | tailptr = &(*tailptr)->next; |
| 1916 | 1916 | } |
| 1917 | 1917 | |
| r245649 | r245650 | |
| 1928 | 1928 | void *param = (void *)laserdisc; |
| 1929 | 1929 | |
| 1930 | 1930 | // add scale and offset controls per-overlay |
| 1931 | string.printf("Laserdisc '%s' Horiz Stretch", laserdisc->tag()); | |
| 1932 | *tailptr = slider_alloc(machine, string.c_str(), 500, (defxscale == 0) ? 1000 : defxscale, 1500, 2, slider_overxscale, param); | |
| 1931 | str.printf("Laserdisc '%s' Horiz Stretch", laserdisc->tag()); | |
| 1932 | *tailptr = slider_alloc(machine, str.c_str(), 500, (defxscale == 0) ? 1000 : defxscale, 1500, 2, slider_overxscale, param); | |
| 1933 | 1933 | tailptr = &(*tailptr)->next; |
| 1934 | string.printf("Laserdisc '%s' Horiz Position", laserdisc->tag()); | |
| 1935 | *tailptr = slider_alloc(machine, string.c_str(), -500, defxoffset, 500, 2, slider_overxoffset, param); | |
| 1934 | str.printf("Laserdisc '%s' Horiz Position", laserdisc->tag()); | |
| 1935 | *tailptr = slider_alloc(machine, str.c_str(), -500, defxoffset, 500, 2, slider_overxoffset, param); | |
| 1936 | 1936 | tailptr = &(*tailptr)->next; |
| 1937 | string.printf("Laserdisc '%s' Vert Stretch", laserdisc->tag()); | |
| 1938 | *tailptr = slider_alloc(machine, string.c_str(), 500, (defyscale == 0) ? 1000 : defyscale, 1500, 2, slider_overyscale, param); | |
| 1937 | str.printf("Laserdisc '%s' Vert Stretch", laserdisc->tag()); | |
| 1938 | *tailptr = slider_alloc(machine, str.c_str(), 500, (defyscale == 0) ? 1000 : defyscale, 1500, 2, slider_overyscale, param); | |
| 1939 | 1939 | tailptr = &(*tailptr)->next; |
| 1940 | string.printf("Laserdisc '%s' Vert Position", laserdisc->tag()); | |
| 1941 | *tailptr = slider_alloc(machine, string.c_str(), -500, defyoffset, 500, 2, slider_overyoffset, param); | |
| 1940 | str.printf("Laserdisc '%s' Vert Position", laserdisc->tag()); | |
| 1941 | *tailptr = slider_alloc(machine, str.c_str(), -500, defyoffset, 500, 2, slider_overyoffset, param); | |
| 1942 | 1942 | tailptr = &(*tailptr)->next; |
| 1943 | 1943 | } |
| 1944 | 1944 | |
| r245649 | r245650 | |
| 1960 | 1960 | if (field->crosshair_axis() != CROSSHAIR_AXIS_NONE && field->player() == 0) |
| 1961 | 1961 | { |
| 1962 | 1962 | void *param = (void *)field; |
| 1963 | string.printf("Crosshair Scale %s", (field->crosshair_axis() == CROSSHAIR_AXIS_X) ? "X" : "Y"); | |
| 1964 | *tailptr = slider_alloc(machine, string.c_str(), -3000, 1000, 3000, 100, slider_crossscale, param); | |
| 1963 | str.printf("Crosshair Scale %s", (field->crosshair_axis() == CROSSHAIR_AXIS_X) ? "X" : "Y"); | |
| 1964 | *tailptr = slider_alloc(machine, str.c_str(), -3000, 1000, 3000, 100, slider_crossscale, param); | |
| 1965 | 1965 | tailptr = &(*tailptr)->next; |
| 1966 | string.printf("Crosshair Offset %s", (field->crosshair_axis() == CROSSHAIR_AXIS_X) ? "X" : "Y"); | |
| 1967 | *tailptr = slider_alloc(machine, string.c_str(), -3000, 0, 3000, 100, slider_crossoffset, param); | |
| 1966 | str.printf("Crosshair Offset %s", (field->crosshair_axis() == CROSSHAIR_AXIS_X) ? "X" : "Y"); | |
| 1967 | *tailptr = slider_alloc(machine, str.c_str(), -3000, 0, 3000, 100, slider_crossoffset, param); | |
| 1968 | 1968 | tailptr = &(*tailptr)->next; |
| 1969 | 1969 | } |
| 1970 | 1970 | #endif |
| r245649 | r245650 | |
|---|---|---|
| 160 | 160 | void request_quit(); |
| 161 | 161 | |
| 162 | 162 | // print the game info string into a buffer |
| 163 | astring &game_info_astring(astring &str | |
| 163 | astring &game_info_astring(astring &str); | |
| 164 | 164 | |
| 165 | 165 | // slider controls |
| 166 | 166 | const slider_state *get_slider_list(void); |
| r245649 | r245650 | |
|---|---|---|
| 1036 | 1036 | // and device |
| 1037 | 1037 | //------------------------------------------------- |
| 1038 | 1038 | |
| 1039 | void validity_checker::build_output_prefix(astring &str | |
| 1039 | void validity_checker::build_output_prefix(astring &str) | |
| 1040 | 1040 | { |
| 1041 | 1041 | // start empty |
| 1042 | str | |
| 1042 | str.reset(); | |
| 1043 | 1043 | |
| 1044 | 1044 | // if we have a current device, indicate that |
| 1045 | 1045 | if (m_current_device != NULL) |
| 1046 | str | |
| 1046 | str.cat(m_current_device->name()).cat(" device '").cat(m_current_device->tag()).cat("': "); | |
| 1047 | 1047 | |
| 1048 | 1048 | // if we have a current port, indicate that as well |
| 1049 | 1049 | if (m_current_ioport != NULL) |
| 1050 | str | |
| 1050 | str.cat("ioport '").cat(m_current_ioport).cat("': "); | |
| 1051 | 1051 | } |
| 1052 | 1052 | |
| 1053 | 1053 |
| r245649 | r245650 | |
|---|---|---|
| 79 | 79 | void validate_devices(); |
| 80 | 80 | |
| 81 | 81 | // output helpers |
| 82 | void build_output_prefix(astring &str | |
| 82 | void build_output_prefix(astring &str); | |
| 83 | 83 | void output_via_delegate(osd_output_channel channel, const char *format, ...) ATTR_PRINTF(3,4); |
| 84 | 84 | |
| 85 | 85 | // internal driver list |
| r245649 | r245650 | |
|---|---|---|
| 257 | 257 | // into a string buffer |
| 258 | 258 | //------------------------------------------------- |
| 259 | 259 | |
| 260 | astring &video_manager::speed_text(astring &str | |
| 260 | astring &video_manager::speed_text(astring &str) | |
| 261 | 261 | { |
| 262 | str | |
| 262 | str.reset(); | |
| 263 | 263 | |
| 264 | 264 | // if we're paused, just display Paused |
| 265 | 265 | bool paused = machine().paused(); |
| 266 | 266 | if (paused) |
| 267 | str | |
| 267 | str.cat("paused"); | |
| 268 | 268 | |
| 269 | 269 | // if we're fast forwarding, just display Fast-forward |
| 270 | 270 | else if (m_fastforward) |
| 271 | str | |
| 271 | str.cat("fast "); | |
| 272 | 272 | |
| 273 | 273 | // if we're auto frameskipping, display that plus the level |
| 274 | 274 | else if (effective_autoframeskip()) |
| 275 | str | |
| 275 | str.catprintf("auto%2d/%d", effective_frameskip(), MAX_FRAMESKIP); | |
| 276 | 276 | |
| 277 | 277 | // otherwise, just display the frameskip plus the level |
| 278 | 278 | else |
| 279 | str | |
| 279 | str.catprintf("skip %d/%d", effective_frameskip(), MAX_FRAMESKIP); | |
| 280 | 280 | |
| 281 | 281 | // append the speed for all cases except paused |
| 282 | 282 | if (!paused) |
| 283 | str | |
| 283 | str.catprintf("%4d%%", (int)(100 * m_speed_percent + 0.5)); | |
| 284 | 284 | |
| 285 | 285 | // display the number of partial updates as well |
| 286 | 286 | int partials = 0; |
| r245649 | r245650 | |
| 288 | 288 | for (screen_device *screen = iter.first(); screen != NULL; screen = iter.next()) |
| 289 | 289 | partials += screen->partial_updates(); |
| 290 | 290 | if (partials > 1) |
| 291 | str | |
| 291 | str.catprintf("\n%d partial updates", partials); | |
| 292 | 292 | |
| 293 | return str | |
| 293 | return str; | |
| 294 | 294 | } |
| 295 | 295 | |
| 296 | 296 |
| r245649 | r245650 | |
|---|---|---|
| 81 | 81 | void frame_update(bool debug = false); |
| 82 | 82 | |
| 83 | 83 | // current speed helpers |
| 84 | astring &speed_text(astring &str | |
| 84 | astring &speed_text(astring &str); | |
| 85 | 85 | double speed_percent() const { return m_speed_percent; } |
| 86 | 86 | |
| 87 | 87 | // snapshots |
| r245649 | r245650 | |
|---|---|---|
| 107 | 107 | } |
| 108 | 108 | |
| 109 | 109 | |
| 110 | void xxx_cpu_device::state_string_export(const device_state_entry &entry, astring &str | |
| 110 | void xxx_cpu_device::state_string_export(const device_state_entry &entry, astring &str) | |
| 111 | 111 | { |
| 112 | 112 | switch (entry.index()) |
| 113 | 113 | { |
| 114 | 114 | case STATE_GENFLAGS: |
| 115 | str | |
| 115 | str.printf("%c%c%c%c", | |
| 116 | 116 | m_flags & 0x80 ? 'S':'.', |
| 117 | 117 | m_flags & 0x40 ? 'Z':'.', |
| 118 | 118 | m_flags & 0x20 ? 'V':'.', |
| r245649 | r245650 | |
|---|---|---|
| 42 | 42 | virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_DATA) ? &m_data_config : NULL ); } |
| 43 | 43 | |
| 44 | 44 | // device_state_interface overrides |
| 45 | void state_string_export(const device_state_entry &entry, astring &str | |
| 45 | void state_string_export(const device_state_entry &entry, astring &str); | |
| 46 | 46 | |
| 47 | 47 | // device_disasm_interface overrides |
| 48 | 48 | virtual UINT32 disasm_min_opcode_bytes() const { return 4; } |
| r245649 | r245650 | |
|---|---|---|
| 822 | 822 | // big_int_string - create a 64-bit string |
| 823 | 823 | //------------------------------------------------- |
| 824 | 824 | |
| 825 | const char *big_int_string(astring &str | |
| 825 | const char *big_int_string(astring &str, UINT64 intvalue) | |
| 826 | 826 | { |
| 827 | 827 | // 0 is a special case |
| 828 | 828 | if (intvalue == 0) |
| 829 | return str | |
| 829 | return str.cpy("0").c_str(); | |
| 830 | 830 | |
| 831 | 831 | // loop until all chunks are done |
| 832 | str | |
| 832 | str.reset(); | |
| 833 | 833 | bool first = true; |
| 834 | 834 | while (intvalue != 0) |
| 835 | 835 | { |
| r245649 | r245650 | |
| 840 | 840 | insert.format((intvalue != 0) ? "%03d" : "%d", chunk); |
| 841 | 841 | |
| 842 | 842 | if (!first) |
| 843 | str | |
| 843 | str.ins(0, ",").c_str(); | |
| 844 | 844 | first = false; |
| 845 | str | |
| 845 | str.ins(0, insert); | |
| 846 | 846 | } |
| 847 | return str | |
| 847 | return str.c_str(); | |
| 848 | 848 | } |
| 849 | 849 | |
| 850 | 850 | |
| r245649 | r245650 | |
| 853 | 853 | // number of frames in M:S:F format |
| 854 | 854 | //------------------------------------------------- |
| 855 | 855 | |
| 856 | const char *msf_string_from_frames(astring &str | |
| 856 | const char *msf_string_from_frames(astring &str, UINT32 frames) | |
| 857 | 857 | { |
| 858 | return str | |
| 858 | return str.format("%02d:%02d:%02d", frames / (75 * 60), (frames / 75) % 60, frames % 75).c_str(); | |
| 859 | 859 | } |
| 860 | 860 | |
| 861 | 861 | |
| r245649 | r245650 | |
| 1124 | 1124 | // describing a set of compressors |
| 1125 | 1125 | //------------------------------------------------- |
| 1126 | 1126 | |
| 1127 | static const char *compression_string(astring &str | |
| 1127 | static const char *compression_string(astring &str, chd_codec_type compression[4]) | |
| 1128 | 1128 | { |
| 1129 | 1129 | // output compression types |
| 1130 | str | |
| 1130 | str.reset(); | |
| 1131 | 1131 | if (compression[0] == CHD_CODEC_NONE) |
| 1132 | return str | |
| 1132 | return str.cpy("none").c_str(); | |
| 1133 | 1133 | |
| 1134 | 1134 | // iterate over types |
| 1135 | 1135 | for (int index = 0; index < 4; index++) |
| r245649 | r245650 | |
| 1138 | 1138 | if (type == CHD_CODEC_NONE) |
| 1139 | 1139 | break; |
| 1140 | 1140 | if (index != 0) |
| 1141 | string.cat(", "); | |
| 1142 | string.cat((type >> 24) & 0xff).cat((type >> 16) & 0xff).cat((type >> 8) & 0xff).cat(type & 0xff); | |
| 1143 | string.cat(" (").cat(chd_codec_list::codec_name(type)).cat(")"); | |
| 1141 | str.cat(", "); | |
| 1142 | str.cat((type >> 24) & 0xff).cat((type >> 16) & 0xff).cat((type >> 8) & 0xff).cat(type & 0xff); | |
| 1143 | str.cat(" (").cat(chd_codec_list::codec_name(type)).cat(")"); | |
| 1144 | 1144 | } |
| 1145 | return str | |
| 1145 | return str.c_str(); | |
| 1146 | 1146 | } |
| 1147 | 1147 | |
| 1148 | 1148 |
| https://github.com/mamedev/mame/commit/87f705b984df084f2a6658d838d6b56eee576e13 |
| Previous | 199869 Revisions | Next |