src/mess/machine/iq151_minigraf.c
| r0 | r13208 | |
| 1 | /*************************************************************************** |
| 2 | |
| 3 | IQ151 Aritma Minigraf 0507 module emulation |
| 4 | |
| 5 | ***************************************************************************/ |
| 6 | |
| 7 | #include "emu.h" |
| 8 | #include "iq151_minigraf.h" |
| 9 | |
| 10 | |
| 11 | /*************************************************************************** |
| 12 | IMPLEMENTATION |
| 13 | ***************************************************************************/ |
| 14 | |
| 15 | ROM_START( iq151_minigraf ) |
| 16 | ROM_REGION(0x1000, "minigraf", 0) |
| 17 | ROM_LOAD( "minigraf_010787.rom", 0x0000, 0x0800, CRC(d854d203) SHA1(ae19c2859f8d78fda227a74ab50c6eb095d14014)) |
| 18 | ROM_LOAD( "minigraf_050986.rom", 0x0800, 0x0800, CRC(e0559e9e) SHA1(475d294e4976f88ad13e77a39b1c607827c791dc)) |
| 19 | ROM_END |
| 20 | |
| 21 | //************************************************************************** |
| 22 | // GLOBAL VARIABLES |
| 23 | //************************************************************************** |
| 24 | |
| 25 | const device_type IQ151_MINIGRAF = &device_creator<iq151_minigraf_device>; |
| 26 | |
| 27 | //************************************************************************** |
| 28 | // LIVE DEVICE |
| 29 | //************************************************************************** |
| 30 | |
| 31 | //------------------------------------------------- |
| 32 | // iq151_minigraf_device - constructor |
| 33 | //------------------------------------------------- |
| 34 | |
| 35 | iq151_minigraf_device::iq151_minigraf_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 36 | : device_t(mconfig, IQ151_MINIGRAF, "IQ151 Minigraf", tag, owner, clock), |
| 37 | device_iq151cart_interface( mconfig, *this ) |
| 38 | { |
| 39 | } |
| 40 | |
| 41 | //------------------------------------------------- |
| 42 | // device_start - device-specific startup |
| 43 | //------------------------------------------------- |
| 44 | |
| 45 | void iq151_minigraf_device::device_start() |
| 46 | { |
| 47 | m_rom = (UINT8*)subregion("minigraf")->base(); |
| 48 | } |
| 49 | |
| 50 | //------------------------------------------------- |
| 51 | // rom_region - device-specific ROM region |
| 52 | //------------------------------------------------- |
| 53 | |
| 54 | const rom_entry *iq151_minigraf_device::device_rom_region() const |
| 55 | { |
| 56 | return ROM_NAME( iq151_minigraf ); |
| 57 | } |
| 58 | |
| 59 | //------------------------------------------------- |
| 60 | // read |
| 61 | //------------------------------------------------- |
| 62 | |
| 63 | void iq151_minigraf_device::read(offs_t offset, UINT8 &data) |
| 64 | { |
| 65 | // interal ROM is mapped at 0xc000-0xc7ff |
| 66 | if (offset >= 0xc000 && offset < 0xc800) |
| 67 | data = m_rom[offset & 0x7ff]; |
| 68 | } |
| 69 | |
| 70 | //------------------------------------------------- |
| 71 | // IO write |
| 72 | //------------------------------------------------- |
| 73 | |
| 74 | void iq151_minigraf_device::io_write(offs_t offset, UINT8 data) |
| 75 | { |
| 76 | if (offset >= 0xf0 && offset < 0xf4) |
| 77 | { |
| 78 | // Plotter control lines |
| 79 | } |
| 80 | } |
src/mess/machine/iq151_minigraf.h
| r0 | r13208 | |
| 1 | #pragma once |
| 2 | |
| 3 | #ifndef __IQ151_MINIGRAF_H__ |
| 4 | #define __IQ151_MINIGRAF_H__ |
| 5 | |
| 6 | #include "emu.h" |
| 7 | #include "machine/iq151cart.h" |
| 8 | |
| 9 | //************************************************************************** |
| 10 | // TYPE DEFINITIONS |
| 11 | //************************************************************************** |
| 12 | |
| 13 | // ======================> iq151_minigraf_device |
| 14 | |
| 15 | class iq151_minigraf_device : |
| 16 | public device_t, |
| 17 | public device_iq151cart_interface |
| 18 | { |
| 19 | public: |
| 20 | // construction/destruction |
| 21 | iq151_minigraf_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 22 | |
| 23 | // optional information overrides |
| 24 | virtual const rom_entry *device_rom_region() const; |
| 25 | |
| 26 | |
| 27 | protected: |
| 28 | // device-level overrides |
| 29 | virtual void device_start(); |
| 30 | virtual void device_config_complete() { m_shortname = "iq151_minigraf"; } |
| 31 | |
| 32 | // iq151cart_interface overrides |
| 33 | virtual void read(offs_t offset, UINT8 &data); |
| 34 | virtual void io_write(offs_t offset, UINT8 data); |
| 35 | |
| 36 | private: |
| 37 | |
| 38 | UINT8 * m_rom; |
| 39 | }; |
| 40 | |
| 41 | |
| 42 | // device type definition |
| 43 | extern const device_type IQ151_MINIGRAF; |
| 44 | |
| 45 | #endif /* __IQ151_MINIGRAF_H__ */ |
src/mess/machine/iq151_ms151a.c
| r0 | r13208 | |
| 1 | /*************************************************************************** |
| 2 | |
| 3 | IQ151 MS151A XY plotter module emulation |
| 4 | |
| 5 | ***************************************************************************/ |
| 6 | |
| 7 | #include "emu.h" |
| 8 | #include "iq151_ms151a.h" |
| 9 | |
| 10 | |
| 11 | /*************************************************************************** |
| 12 | IMPLEMENTATION |
| 13 | ***************************************************************************/ |
| 14 | |
| 15 | ROM_START( iq151_ms151a ) |
| 16 | ROM_REGION(0x0800, "ms151a", 0) |
| 17 | ROM_LOAD( "ms151a.rom", 0x0000, 0x0800, CRC(995c58d6) SHA1(ebdc4278cfe6d3cc7dafbaa05bc6c239e4e6c09b)) |
| 18 | ROM_END |
| 19 | |
| 20 | //************************************************************************** |
| 21 | // GLOBAL VARIABLES |
| 22 | //************************************************************************** |
| 23 | |
| 24 | const device_type IQ151_MS151A = &device_creator<iq151_ms151a_device>; |
| 25 | |
| 26 | //************************************************************************** |
| 27 | // LIVE DEVICE |
| 28 | //************************************************************************** |
| 29 | |
| 30 | //------------------------------------------------- |
| 31 | // iq151_ms151a_device - constructor |
| 32 | //------------------------------------------------- |
| 33 | |
| 34 | iq151_ms151a_device::iq151_ms151a_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 35 | : device_t(mconfig, IQ151_MS151A, "IQ151 MS151A", tag, owner, clock), |
| 36 | device_iq151cart_interface( mconfig, *this ) |
| 37 | { |
| 38 | } |
| 39 | |
| 40 | //------------------------------------------------- |
| 41 | // device_start - device-specific startup |
| 42 | //------------------------------------------------- |
| 43 | |
| 44 | void iq151_ms151a_device::device_start() |
| 45 | { |
| 46 | m_rom = (UINT8*)subregion("ms151a")->base(); |
| 47 | } |
| 48 | |
| 49 | //------------------------------------------------- |
| 50 | // rom_region - device-specific ROM region |
| 51 | //------------------------------------------------- |
| 52 | |
| 53 | const rom_entry *iq151_ms151a_device::device_rom_region() const |
| 54 | { |
| 55 | return ROM_NAME( iq151_ms151a ); |
| 56 | } |
| 57 | |
| 58 | //------------------------------------------------- |
| 59 | // read |
| 60 | //------------------------------------------------- |
| 61 | |
| 62 | void iq151_ms151a_device::read(offs_t offset, UINT8 &data) |
| 63 | { |
| 64 | // interal ROM is mapped at 0xc000-0xc7ff |
| 65 | if (offset >= 0xc000 && offset < 0xc800) |
| 66 | data = m_rom[offset & 0x7ff]; |
| 67 | } |
| 68 | |
| 69 | //------------------------------------------------- |
| 70 | // IO read |
| 71 | //------------------------------------------------- |
| 72 | |
| 73 | void iq151_ms151a_device::io_read(offs_t offset, UINT8 &data) |
| 74 | { |
| 75 | |
| 76 | } |
| 77 | |
| 78 | //------------------------------------------------- |
| 79 | // IO write |
| 80 | //------------------------------------------------- |
| 81 | |
| 82 | void iq151_ms151a_device::io_write(offs_t offset, UINT8 data) |
| 83 | { |
| 84 | |
| 85 | } |
src/mess/machine/iq151_ms151a.h
| r0 | r13208 | |
| 1 | #pragma once |
| 2 | |
| 3 | #ifndef __IQ151_MS151A_H__ |
| 4 | #define __IQ151_MS151A_H__ |
| 5 | |
| 6 | #include "emu.h" |
| 7 | #include "machine/iq151cart.h" |
| 8 | |
| 9 | //************************************************************************** |
| 10 | // TYPE DEFINITIONS |
| 11 | //************************************************************************** |
| 12 | |
| 13 | // ======================> iq151_ms151a_device |
| 14 | |
| 15 | class iq151_ms151a_device : |
| 16 | public device_t, |
| 17 | public device_iq151cart_interface |
| 18 | { |
| 19 | public: |
| 20 | // construction/destruction |
| 21 | iq151_ms151a_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 22 | |
| 23 | // optional information overrides |
| 24 | virtual const rom_entry *device_rom_region() const; |
| 25 | |
| 26 | protected: |
| 27 | // device-level overrides |
| 28 | virtual void device_start(); |
| 29 | virtual void device_config_complete() { m_shortname = "iq151_ms151a"; } |
| 30 | |
| 31 | // iq151cart_interface overrides |
| 32 | virtual void read(offs_t offset, UINT8 &data); |
| 33 | virtual void io_read(offs_t offset, UINT8 &data); |
| 34 | virtual void io_write(offs_t offset, UINT8 data); |
| 35 | |
| 36 | private: |
| 37 | |
| 38 | UINT8 * m_rom; |
| 39 | }; |
| 40 | |
| 41 | |
| 42 | // device type definition |
| 43 | extern const device_type IQ151_MS151A; |
| 44 | |
| 45 | #endif /* __IQ151_MS151A_H__ */ |
src/mess/drivers/iq151.c
| r13207 | r13208 | |
| 53 | 53 | #include "machine/iq151cart.h" |
| 54 | 54 | #include "machine/iq151_rom.h" |
| 55 | 55 | #include "machine/iq151_disc2.h" |
| 56 | #include "machine/iq151_minigraf.h" |
| 57 | #include "machine/iq151_ms151a.h" |
| 56 | 58 | #include "machine/iq151_staper.h" |
| 57 | 59 | #include "video/iq151_grafik.h" |
| 58 | 60 | #include "video/iq151_video32.h" |
| r13207 | r13208 | |
| 421 | 423 | SLOT_INTERFACE("video64", IQ151_VIDEO64) // video64 |
| 422 | 424 | SLOT_INTERFACE("grafik" , IQ151_GRAFIK) // Grafik |
| 423 | 425 | SLOT_INTERFACE("disc2" , IQ151_DISC2) // Disc 2 |
| 426 | SLOT_INTERFACE("minigraf" , IQ151_MINIGRAF) // Aritma Minigraf 0507 |
| 427 | SLOT_INTERFACE("ms151a" , IQ151_MS151A) // MS151A XY Plotter |
| 424 | 428 | SLOT_INTERFACE("staper" , IQ151_STAPER) // STAPER |
| 425 | 429 | SLOT_INTERFACE("basic6" , IQ151_BASIC6) // BASIC6 |
| 426 | 430 | SLOT_INTERFACE("basicg" , IQ151_BASICG) // BASICG |