trunk/src/emu/cpu/tms7000/tms7000.h
| r31343 | r31344 | |
| 23 | 23 | #define __TMS7000_H__ |
| 24 | 24 | |
| 25 | 25 | #include "emu.h" |
| 26 | #include "debugger.h" |
| 26 | 27 | |
| 27 | 28 | |
| 28 | 29 | enum { TMS7000_PC=1, TMS7000_SP, TMS7000_ST }; |
| r31343 | r31344 | |
| 57 | 58 | tms7000_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 58 | 59 | tms7000_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, address_map_constructor internal, UINT32 info_flags, const char *shortname, const char *source); |
| 59 | 60 | |
| 60 | | DECLARE_READ8_MEMBER(tms7000_unmapped_rf_r) { logerror("'%s' (%04X): unmapped_rf_r @ $%04x\n", tag(), m_pc, offset + 0x80); return 0; }; |
| 61 | DECLARE_READ8_MEMBER(tms7000_unmapped_rf_r) { if (!space.debugger_access()) logerror("'%s' (%04X): unmapped_rf_r @ $%04x\n", tag(), m_pc, offset + 0x80); return 0; }; |
| 61 | 62 | DECLARE_WRITE8_MEMBER(tms7000_unmapped_rf_w) { logerror("'%s' (%04X): unmapped_rf_w @ $%04x = $%02x\n", tag(), m_pc, offset + 0x80, data); }; |
| 62 | 63 | |
| 63 | 64 | DECLARE_READ8_MEMBER(tms7000_pf_r); |
trunk/src/emu/cpu/tms7000/tms7000.c
| r31343 | r31344 | |
| 20 | 20 | * |
| 21 | 21 | * TODO: |
| 22 | 22 | * - dump CROM and emulate cpu at microinstruction level |
| 23 | | * - memory modes with IOCNT0, currently ignored |
| 23 | * - memory modes with IOCNT0, currently always running in full expansion mode |
| 24 | 24 | * - timer event counter mode (timer control register, bit 6) |
| 25 | 25 | * - TMS70x1/2 serial port and timer 3 |
| 26 | 26 | * - when they're needed, add TMS70Cx2, TMS7742, TMS77C82, SE70xxx |
| 27 | 27 | * |
| 28 | 28 | *****************************************************************************/ |
| 29 | 29 | |
| 30 | | #include "debugger.h" |
| 31 | 30 | #include "tms7000.h" |
| 32 | 31 | |
| 33 | 32 | // 7000 is the most basic one, 128 bytes internal RAM and no internal ROM. |
| r31343 | r31344 | |
| 55 | 54 | const device_type TMS7002 = &device_creator<tms7002_device>; |
| 56 | 55 | const device_type TMS7042 = &device_creator<tms7042_device>; |
| 57 | 56 | |
| 57 | // 70Cx2 is an update to 70x2 with some extra features. Due to some changes |
| 58 | // in peripheral file I/O, it is not backward compatible to 70x2. |
| 58 | 59 | |
| 60 | |
| 59 | 61 | // flag helpers |
| 60 | 62 | #define SR_C 0x80 /* Carry */ |
| 61 | 63 | #define SR_N 0x40 /* Negative */ |
| r31343 | r31344 | |
| 514 | 516 | { |
| 515 | 517 | // note: port B is write-only, reading it returns the output value as if ddr is 0xff |
| 516 | 518 | int port = offset / 2 - 2; |
| 517 | | return (m_io->read_byte(port) & ~m_port_ddr[port]) | (m_port_latch[port] & m_port_ddr[port]); |
| 519 | if (!space.debugger_access()) |
| 520 | return (m_io->read_byte(port) & ~m_port_ddr[port]) | (m_port_latch[port] & m_port_ddr[port]); |
| 521 | break; |
| 518 | 522 | } |
| 519 | 523 | |
| 520 | 524 | // port direction (note: 7000 doesn't support it for port A) |
| r31343 | r31344 | |
| 522 | 526 | return m_port_ddr[offset / 2 - 2]; |
| 523 | 527 | |
| 524 | 528 | default: |
| 525 | | logerror("'%s' (%04X): tms7000_pf_r @ $%04x\n", tag(), m_pc, offset); |
| 529 | if (!space.debugger_access()) |
| 530 | logerror("'%s' (%04X): tms7000_pf_r @ $%04x\n", tag(), m_pc, offset); |
| 526 | 531 | break; |
| 527 | 532 | } |
| 528 | 533 | |
trunk/src/mess/drivers/cc40.c
| r31343 | r31344 | |
| 50 | 50 | provided that the machine is turned off properly. If a program is running, |
| 51 | 51 | you may have to press BREAK before turning the CC-40 off. |
| 52 | 52 | |
| 53 | | To run a cartridge that doesn't automatically boot, use the command |
| 54 | | run"dir" to see which program(s) can be loaded. Load a program with |
| 55 | | run"<shortname of program in list>" |
| 53 | To run a cartridge, usually the command run"dir" shows which program(s) |
| 54 | can be loaded. Load a program by pressing the RUN key while viewing the list, |
| 55 | or manually with the command run"<shortname of program in list>" |
| 56 | 56 | |
| 57 | 57 | |
| 58 | 58 | TODO: |
| 59 | | - some strange bugs with cartridge software, maybe TMS7000 bug? |
| 59 | - some strange bugs with Games I cartridge, bad dump or emulation bug? |
| 60 | 60 | - other RAM configurations (6KB(default), 12KB, 18KB, external) |
| 61 | 61 | - Hexbus interface and peripherals |
| 62 | 62 | - HD44100 is not accessed by the CPU, is it connected to the HD44780? |
| r31343 | r31344 | |
| 309 | 309 | AM_RANGE(0x1000, 0x17ff) AM_RAM AM_SHARE("nvram2") |
| 310 | 310 | AM_RANGE(0x3000, 0x37ff) AM_RAM AM_SHARE("nvram3") |
| 311 | 311 | |
| 312 | | AM_RANGE(0x0000, 0x4fff) AM_UNMAP // cartridge rom is at $5000-$cfff - direct address, not relative |
| 313 | | AM_RANGE(0x0000, 0xcfff) AM_MASK(0x7fff) AM_ROMBANK("cartbank") |
| 314 | | |
| 312 | AM_RANGE(0x5000, 0xcfff) AM_ROMBANK("cartbank") |
| 315 | 313 | AM_RANGE(0xd000, 0xefff) AM_ROMBANK("sysbank") |
| 316 | 314 | ADDRESS_MAP_END |
| 317 | 315 | |