src/mess/machine/abc99.c
| r9210 | r9211 | |
| 1 | 1 | #include "emu.h" |
| 2 | 2 | #include "abc99.h" |
| 3 | 3 | #include "cpu/mcs48/mcs48.h" |
| 4 | #include "machine/devhelpr.h" |
| 4 | 5 | |
| 5 | | /*------------------------------------------------- |
| 6 | | ADDRESS_MAP( abc99_map ) |
| 7 | | -------------------------------------------------*/ |
| 8 | 6 | |
| 7 | |
| 8 | //************************************************************************** |
| 9 | // MACROS / CONSTANTS |
| 10 | //************************************************************************** |
| 11 | |
| 12 | #define I8035_TAG "i8035" |
| 13 | |
| 14 | |
| 15 | |
| 16 | //************************************************************************** |
| 17 | // DEVICE DEFINITIONS |
| 18 | //************************************************************************** |
| 19 | |
| 20 | const device_type ABC99 = abc99_device_config::static_alloc_device_config; |
| 21 | |
| 22 | |
| 23 | |
| 24 | //************************************************************************** |
| 25 | // DEVICE CONFIGURATION |
| 26 | //************************************************************************** |
| 27 | |
| 28 | GENERIC_DEVICE_CONFIG_SETUP(abc99, "Luxor ABC 99") |
| 29 | |
| 30 | |
| 31 | //------------------------------------------------- |
| 32 | // device_config_complete - perform any |
| 33 | // operations now that the configuration is |
| 34 | // complete |
| 35 | //------------------------------------------------- |
| 36 | |
| 37 | void abc99_device_config::device_config_complete() |
| 38 | { |
| 39 | } |
| 40 | |
| 41 | |
| 42 | //------------------------------------------------- |
| 43 | // ROM( abc99 ) |
| 44 | //------------------------------------------------- |
| 45 | |
| 46 | ROM_START( abc99 ) |
| 47 | ROM_REGION( 0x1800, I8035_TAG, 0 ) |
| 48 | ROM_LOAD( "10681909.bin", 0x0000, 0x1000, CRC(ffe32a71) SHA1(fa2ce8e0216a433f9bbad0bdd6e3dc0b540f03b7) ) |
| 49 | ROM_LOAD( "10726864.bin", 0x1000, 0x0800, CRC(e33683ae) SHA1(0c1d9e320f82df05f4804992ef6f6f6cd20623f3) ) |
| 50 | ROM_END |
| 51 | |
| 52 | |
| 53 | //------------------------------------------------- |
| 54 | // rom_region - device-specific ROM region |
| 55 | //------------------------------------------------- |
| 56 | |
| 57 | const rom_entry *abc99_device_config::rom_region() const |
| 58 | { |
| 59 | return ROM_NAME( abc99 ); |
| 60 | } |
| 61 | |
| 62 | |
| 63 | //------------------------------------------------- |
| 64 | // ADDRESS_MAP( abc99_map ) |
| 65 | //------------------------------------------------- |
| 66 | |
| 9 | 67 | static ADDRESS_MAP_START( abc99_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 10 | | AM_RANGE(0x000, 0xfff) AM_ROM |
| 68 | AM_RANGE(0x0000, 0x17ff) AM_ROM |
| 11 | 69 | ADDRESS_MAP_END |
| 12 | 70 | |
| 13 | | /*------------------------------------------------- |
| 14 | | ADDRESS_MAP( abc99_io_map ) |
| 15 | | -------------------------------------------------*/ |
| 16 | 71 | |
| 72 | //------------------------------------------------- |
| 73 | // ADDRESS_MAP( abc99_io_map ) |
| 74 | //------------------------------------------------- |
| 75 | |
| 17 | 76 | static ADDRESS_MAP_START( abc99_io_map, ADDRESS_SPACE_IO, 8 ) |
| 18 | 77 | ADDRESS_MAP_END |
| 19 | 78 | |
| 20 | | /*------------------------------------------------- |
| 21 | | MACHINE_DRIVER( abc99 ) |
| 22 | | -------------------------------------------------*/ |
| 23 | 79 | |
| 80 | //------------------------------------------------- |
| 81 | // MACHINE_DRIVER( abc99 ) |
| 82 | //------------------------------------------------- |
| 83 | |
| 24 | 84 | static MACHINE_CONFIG_FRAGMENT( abc99 ) |
| 25 | | MDRV_CPU_ADD("i8035", I8035, XTAL_4_608MHz) |
| 85 | MDRV_CPU_ADD(I8035_TAG, I8035, 4608000) // ? |
| 26 | 86 | MDRV_CPU_PROGRAM_MAP(abc99_map) |
| 27 | 87 | MDRV_CPU_IO_MAP(abc99_io_map) |
| 28 | 88 | MACHINE_CONFIG_END |
| 29 | 89 | |
| 30 | | /*------------------------------------------------- |
| 31 | | ROM( abc99 ) |
| 32 | | -------------------------------------------------*/ |
| 33 | 90 | |
| 34 | | ROM_START( abc99 ) |
| 35 | | ROM_REGION( 0x1800, "i8035", 0 ) |
| 36 | | ROM_LOAD( "10681909.bin", 0x0000, 0x1000, CRC(ffe32a71) SHA1(fa2ce8e0216a433f9bbad0bdd6e3dc0b540f03b7) ) |
| 37 | | ROM_LOAD( "10726864.bin", 0x1000, 0x0800, CRC(e33683ae) SHA1(0c1d9e320f82df05f4804992ef6f6f6cd20623f3) ) |
| 38 | | ROM_END |
| 91 | //------------------------------------------------- |
| 92 | // machine_config_additions - device-specific |
| 93 | // machine configurations |
| 94 | //------------------------------------------------- |
| 39 | 95 | |
| 40 | | /*------------------------------------------------- |
| 41 | | DEVICE_START( abc99 ) |
| 42 | | -------------------------------------------------*/ |
| 96 | machine_config_constructor abc99_device_config::machine_config_additions() const |
| 97 | { |
| 98 | return MACHINE_CONFIG_NAME( abc99 ); |
| 99 | } |
| 43 | 100 | |
| 44 | | static DEVICE_START( abc99 ) |
| 101 | |
| 102 | |
| 103 | //************************************************************************** |
| 104 | // LIVE DEVICE |
| 105 | //************************************************************************** |
| 106 | |
| 107 | //------------------------------------------------- |
| 108 | // abc99_device - constructor |
| 109 | //------------------------------------------------- |
| 110 | |
| 111 | abc99_device::abc99_device(running_machine &_machine, const abc99_device_config &config) |
| 112 | : device_t(_machine, config), |
| 113 | m_config(config) |
| 45 | 114 | { |
| 115 | |
| 46 | 116 | } |
| 47 | 117 | |
| 48 | | /*------------------------------------------------- |
| 49 | | DEVICE_GET_INFO( abc99 ) |
| 50 | | -------------------------------------------------*/ |
| 51 | 118 | |
| 52 | | DEVICE_GET_INFO( abc99 ) |
| 119 | //------------------------------------------------- |
| 120 | // device_start - device-specific startup |
| 121 | //------------------------------------------------- |
| 122 | |
| 123 | void abc99_device::device_start() |
| 53 | 124 | { |
| 54 | | switch (state) |
| 55 | | { |
| 56 | | /* --- the following bits of info are returned as 64-bit signed integers --- */ |
| 57 | | case DEVINFO_INT_INLINE_CONFIG_BYTES: info->i = 0; break; |
| 58 | | |
| 59 | | /* --- the following bits of info are returned as pointers --- */ |
| 60 | | case DEVINFO_PTR_ROM_REGION: info->romregion = rom_abc99; break; |
| 61 | | case DEVINFO_PTR_MACHINE_CONFIG: info->machine_config = MACHINE_CONFIG_NAME(abc99); break; |
| 62 | | |
| 63 | | /* --- the following bits of info are returned as pointers to functions --- */ |
| 64 | | case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(abc99); break; |
| 65 | | case DEVINFO_FCT_STOP: /* Nothing */ break; |
| 66 | | case DEVINFO_FCT_RESET: /* Nothing */ break; |
| 125 | } |
| 67 | 126 | |
| 68 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 69 | | case DEVINFO_STR_NAME: strcpy(info->s, "Luxor ABC-99"); break; |
| 70 | | case DEVINFO_STR_FAMILY: strcpy(info->s, "Luxor ABC"); break; |
| 71 | | case DEVINFO_STR_VERSION: strcpy(info->s, "1.0"); break; |
| 72 | | case DEVINFO_STR_SOURCE_FILE: strcpy(info->s, __FILE__); break; |
| 73 | | case DEVINFO_STR_CREDITS: strcpy(info->s, "Copyright the MESS Team"); break; |
| 74 | | } |
| 127 | |
| 128 | //------------------------------------------------- |
| 129 | // device_reset - device-specific reset |
| 130 | //------------------------------------------------- |
| 131 | |
| 132 | void abc99_device::device_reset() |
| 133 | { |
| 75 | 134 | } |
| 76 | | |
| 77 | | DEFINE_LEGACY_DEVICE(ABC99, abc99); |
src/mess/machine/abc99.h
| r9210 | r9211 | |
| 1 | #pragma once |
| 2 | |
| 1 | 3 | #ifndef __ABC99__ |
| 2 | 4 | #define __ABC99__ |
| 3 | 5 | |
| r9210 | r9211 | |
| 3 | 5 | #include "emu.h" |
| 4 | 6 | |
| 5 | | /*************************************************************************** |
| 6 | | MACROS / CONSTANTS |
| 7 | | ***************************************************************************/ |
| 8 | 7 | |
| 8 | |
| 9 | //************************************************************************** |
| 10 | // MACROS / CONSTANTS |
| 11 | //************************************************************************** |
| 12 | |
| 9 | 13 | #define ABC99_TAG "abc99" |
| 10 | 14 | |
| 11 | | DECLARE_LEGACY_DEVICE(ABC99, abc99); |
| 12 | 15 | |
| 13 | | #define MDRV_ABC99_ADD \ |
| 14 | | MDRV_DEVICE_ADD(ABC99_TAG, ABC99, 0) |
| 15 | 16 | |
| 17 | //************************************************************************** |
| 18 | // INTERFACE CONFIGURATION MACROS |
| 19 | //************************************************************************** |
| 20 | |
| 21 | #define MDRV_ABC99_ADD(_tag) \ |
| 22 | MDRV_DEVICE_ADD(_tag, ABC99, 0) |
| 23 | |
| 24 | |
| 25 | |
| 26 | //************************************************************************** |
| 27 | // TYPE DEFINITIONS |
| 28 | //************************************************************************** |
| 29 | |
| 30 | // ======================> abc99_interface |
| 31 | |
| 32 | struct abc99_interface |
| 33 | { |
| 34 | }; |
| 35 | |
| 36 | |
| 37 | // ======================> abc99_device_config |
| 38 | |
| 39 | class abc99_device_config : public device_config, |
| 40 | public abc99_interface |
| 41 | { |
| 42 | friend class abc99_device; |
| 43 | |
| 44 | // construction/destruction |
| 45 | abc99_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock); |
| 46 | |
| 47 | public: |
| 48 | // allocators |
| 49 | static device_config *static_alloc_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock); |
| 50 | virtual device_t *alloc_device(running_machine &machine) const; |
| 51 | |
| 52 | // optional information overrides |
| 53 | virtual const rom_entry *rom_region() const; |
| 54 | virtual machine_config_constructor machine_config_additions() const; |
| 55 | |
| 56 | protected: |
| 57 | // device_config overrides |
| 58 | virtual void device_config_complete(); |
| 59 | }; |
| 60 | |
| 61 | |
| 62 | // ======================> abc99_device |
| 63 | |
| 64 | class abc99_device : public device_t |
| 65 | { |
| 66 | friend class abc99_device_config; |
| 67 | |
| 68 | // construction/destruction |
| 69 | abc99_device(running_machine &_machine, const abc99_device_config &_config); |
| 70 | |
| 71 | public: |
| 72 | |
| 73 | protected: |
| 74 | // device-level overrides |
| 75 | virtual void device_start(); |
| 76 | virtual void device_reset(); |
| 77 | |
| 78 | private: |
| 79 | const abc99_device_config &m_config; |
| 80 | }; |
| 81 | |
| 82 | |
| 83 | // device type definition |
| 84 | extern const device_type ABC99; |
| 85 | |
| 86 | |
| 87 | |
| 16 | 88 | #endif |