src/mess/drivers/apexc.c
| r15157 | r15158 | |
| 51 | 51 | the user to enter such a loader manually, but it would take hours...) |
| 52 | 52 | */ |
| 53 | 53 | |
| 54 | | class apexc_cylinder_image_device : public device_t, |
| 55 | | public device_image_interface |
| 54 | class apexc_cylinder_image_device : public device_t, public device_image_interface |
| 56 | 55 | { |
| 57 | 56 | public: |
| 58 | 57 | // construction/destruction |
| r15157 | r15158 | |
| 74 | 73 | virtual void call_unload(); |
| 75 | 74 | protected: |
| 76 | 75 | // device-level overrides |
| 77 | | virtual void device_config_complete() { update_names(); } |
| 76 | virtual void device_config_complete() { update_names(); } |
| 78 | 77 | virtual void device_start() { } |
| 79 | 78 | private: |
| 80 | 79 | int m_writable; |
| r15157 | r15158 | |
| 83 | 82 | const device_type APEXC_CYLINDER = &device_creator<apexc_cylinder_image_device>; |
| 84 | 83 | |
| 85 | 84 | apexc_cylinder_image_device::apexc_cylinder_image_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 86 | | : device_t(mconfig, APEXC_CYLINDER, "APEXC Cylinder", tag, owner, clock), |
| 85 | : device_t(mconfig, APEXC_CYLINDER, "APEXC Cylinder", tag, owner, clock), |
| 87 | 86 | device_image_interface(mconfig, *this) |
| 88 | 87 | { |
| 89 | 88 | } |
| r15157 | r15158 | |
| 96 | 95 | /* load RAM contents */ |
| 97 | 96 | m_writable = !is_readonly(); |
| 98 | 97 | |
| 99 | | fread( memregion("maincpu")->base(), /*0x8000*/0x1000); |
| 98 | fread( machine().root_device().memregion("maincpu")->base(), 0x1000); |
| 100 | 99 | #ifdef LSB_FIRST |
| 101 | 100 | { /* fix endianness */ |
| 102 | 101 | UINT32 *RAM; |
| r15157 | r15158 | |
| 104 | 103 | |
| 105 | 104 | RAM = (UINT32 *)(*machine().root_device().memregion("maincpu")); |
| 106 | 105 | |
| 107 | | for (i=0; i < /*0x2000*/0x0400; i++) |
| 106 | for (i=0; i < 0x0400; i++) |
| 108 | 107 | RAM[i] = BIG_ENDIANIZE_INT32(RAM[i]); |
| 109 | 108 | } |
| 110 | 109 | #endif |
| r15157 | r15158 | |
| 187 | 186 | 11111 Letters |
| 188 | 187 | */ |
| 189 | 188 | |
| 190 | | class apexc_tape_puncher_image_device : public device_t, |
| 191 | | public device_image_interface |
| 189 | class apexc_tape_puncher_image_device : public device_t, public device_image_interface |
| 192 | 190 | { |
| 193 | 191 | public: |
| 194 | 192 | // construction/destruction |
| r15157 | r15158 | |
| 207 | 205 | virtual const option_guide *create_option_guide() const { return NULL; } |
| 208 | 206 | protected: |
| 209 | 207 | // device-level overrides |
| 210 | | virtual void device_config_complete() { update_names(); } |
| 208 | virtual void device_config_complete() { update_names(); } |
| 211 | 209 | virtual void device_start() { } |
| 212 | 210 | }; |
| 213 | 211 | |
| 214 | 212 | const device_type APEXC_TAPE_PUNCHER = &device_creator<apexc_tape_puncher_image_device>; |
| 215 | 213 | |
| 216 | 214 | apexc_tape_puncher_image_device::apexc_tape_puncher_image_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 217 | | : device_t(mconfig, APEXC_TAPE_PUNCHER, "APEXC Tape Puncher", tag, owner, clock), |
| 215 | : device_t(mconfig, APEXC_TAPE_PUNCHER, "APEXC Tape Puncher", tag, owner, clock), |
| 218 | 216 | device_image_interface(mconfig, *this) |
| 219 | 217 | { |
| 220 | 218 | } |
| r15157 | r15158 | |
| 222 | 220 | #define MCFG_APEXC_TAPE_PUNCHER_ADD(_tag) \ |
| 223 | 221 | MCFG_DEVICE_ADD(_tag, APEXC_TAPE_PUNCHER, 0) |
| 224 | 222 | |
| 225 | | class apexc_tape_reader_image_device : public device_t, |
| 226 | | public device_image_interface |
| 223 | class apexc_tape_reader_image_device : public device_t, public device_image_interface |
| 227 | 224 | { |
| 228 | 225 | public: |
| 229 | 226 | // construction/destruction |
| r15157 | r15158 | |
| 242 | 239 | virtual const option_guide *create_option_guide() const { return NULL; } |
| 243 | 240 | protected: |
| 244 | 241 | // device-level overrides |
| 245 | | virtual void device_config_complete() { update_names(); } |
| 242 | virtual void device_config_complete() { update_names(); } |
| 246 | 243 | virtual void device_start() { } |
| 247 | 244 | }; |
| 248 | 245 | |
| 249 | 246 | const device_type APEXC_TAPE_READER = &device_creator<apexc_tape_reader_image_device>; |
| 250 | 247 | |
| 251 | 248 | apexc_tape_reader_image_device::apexc_tape_reader_image_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 252 | | : device_t(mconfig, APEXC_TAPE_READER, "APEXC Tape Reader", tag, owner, clock), |
| 249 | : device_t(mconfig, APEXC_TAPE_READER, "APEXC Tape Reader", tag, owner, clock), |
| 253 | 250 | device_image_interface(mconfig, *this) |
| 254 | 251 | { |
| 255 | 252 | } |
| r15157 | r15158 | |
| 823 | 820 | 0x00 |
| 824 | 821 | }; |
| 825 | 822 | |
| 826 | | dst = machine.root_device().memregion("gfx1")->base(); |
| 823 | dst = machine.root_device().memregion("chargen")->base(); |
| 827 | 824 | |
| 828 | 825 | memcpy(dst, fontdata6x8, apexcfontdata_size); |
| 829 | 826 | } |
| r15157 | r15158 | |
| 840 | 837 | }; |
| 841 | 838 | |
| 842 | 839 | static GFXDECODE_START( apexc ) |
| 843 | | GFXDECODE_ENTRY( "gfx1", 0, fontlayout, 0, 2 ) |
| 840 | GFXDECODE_ENTRY( "chargen", 0, fontlayout, 0, 2 ) |
| 844 | 841 | GFXDECODE_END |
| 845 | 842 | |
| 846 | 843 | |
| r15157 | r15158 | |
| 898 | 895 | ROM_REGION32_BE(0x10000, "maincpu", ROMREGION_ERASEFF) |
| 899 | 896 | /* Note this computer has no ROM... */ |
| 900 | 897 | |
| 901 | | ROM_REGION(apexcfontdata_size, "gfx1", ROMREGION_ERASEFF) |
| 898 | ROM_REGION(apexcfontdata_size, "chargen", ROMREGION_ERASEFF) |
| 902 | 899 | /* space filled with our font */ |
| 903 | 900 | ROM_END |
| 904 | 901 | |
| 905 | | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME */ |
| 906 | | //COMP( 1951, apexc53, 0, 0, apexc53, apexc, apexc, "Andrew Donald Booth", "All Purpose Electronic X-ray Computer (as described in 1953)" , GAME_NOT_WORKING | GAME_NO_SOUND_HW) |
| 907 | | COMP( 1955, apexc, /*apexc53*/0, 0, apexc, apexc, apexc, "Andrew Donald Booth", "All Purpose Electronic X-ray Computer (as described in 1957)" , GAME_NO_SOUND_HW) |
| 902 | // YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME */ |
| 903 | //COMP( 1951, apexc53, 0, 0, apexc53, apexc, apexc, "Andrew Donald Booth", "All Purpose Electronic X-ray Computer (as described in 1953)" , GAME_NOT_WORKING | GAME_NO_SOUND_HW) |
| 904 | COMP( 1955, apexc, 0, 0, apexc, apexc, apexc, "Andrew Donald Booth", "All Purpose Electronic X-ray Computer (as described in 1957)" , GAME_NO_SOUND_HW) |