Previous 15994 Revisions Next

r15158 Sunday 13th May, 2012 at 07:19:30 UTC by Robbbert
Fixed apexc (broke in r14977)
[src/mess/drivers]apexc.c

src/mess/drivers/apexc.c
r15157r15158
5151    the user to enter such a loader manually, but it would take hours...)
5252*/
5353
54class apexc_cylinder_image_device :   public device_t,
55                           public device_image_interface
54class apexc_cylinder_image_device :   public device_t, public device_image_interface
5655{
5756public:
5857   // construction/destruction
r15157r15158
7473   virtual void call_unload();
7574protected:
7675   // device-level overrides
77    virtual void device_config_complete() { update_names(); }
76   virtual void device_config_complete() { update_names(); }
7877   virtual void device_start() { }
7978private:
8079   int m_writable;
r15157r15158
8382const device_type APEXC_CYLINDER = &device_creator<apexc_cylinder_image_device>;
8483
8584apexc_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),
8786     device_image_interface(mconfig, *this)
8887{
8988}
r15157r15158
9695   /* load RAM contents */
9796   m_writable = !is_readonly();
9897
99   fread( memregion("maincpu")->base(), /*0x8000*/0x1000);
98   fread( machine().root_device().memregion("maincpu")->base(), 0x1000);
10099#ifdef LSB_FIRST
101100   {   /* fix endianness */
102101      UINT32 *RAM;
r15157r15158
104103
105104      RAM = (UINT32 *)(*machine().root_device().memregion("maincpu"));
106105
107      for (i=0; i < /*0x2000*/0x0400; i++)
106      for (i=0; i < 0x0400; i++)
108107         RAM[i] = BIG_ENDIANIZE_INT32(RAM[i]);
109108   }
110109#endif
r15157r15158
187186    11111                   Letters
188187*/
189188
190class apexc_tape_puncher_image_device :   public device_t,
191                              public device_image_interface
189class apexc_tape_puncher_image_device :   public device_t, public device_image_interface
192190{
193191public:
194192   // construction/destruction
r15157r15158
207205   virtual const option_guide *create_option_guide() const { return NULL; }
208206protected:
209207   // device-level overrides
210    virtual void device_config_complete() { update_names(); }
208   virtual void device_config_complete() { update_names(); }
211209   virtual void device_start() { }
212210};
213211
214212const device_type APEXC_TAPE_PUNCHER = &device_creator<apexc_tape_puncher_image_device>;
215213
216214apexc_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),
218216     device_image_interface(mconfig, *this)
219217{
220218}
r15157r15158
222220#define MCFG_APEXC_TAPE_PUNCHER_ADD(_tag) \
223221   MCFG_DEVICE_ADD(_tag, APEXC_TAPE_PUNCHER, 0)
224222
225class apexc_tape_reader_image_device :   public device_t,
226                              public device_image_interface
223class apexc_tape_reader_image_device :   public device_t, public device_image_interface
227224{
228225public:
229226   // construction/destruction
r15157r15158
242239   virtual const option_guide *create_option_guide() const { return NULL; }
243240protected:
244241   // device-level overrides
245    virtual void device_config_complete() { update_names(); }
242   virtual void device_config_complete() { update_names(); }
246243   virtual void device_start() { }
247244};
248245
249246const device_type APEXC_TAPE_READER = &device_creator<apexc_tape_reader_image_device>;
250247
251248apexc_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),
253250     device_image_interface(mconfig, *this)
254251{
255252}
r15157r15158
823820      0x00
824821   };
825822
826   dst = machine.root_device().memregion("gfx1")->base();
823   dst = machine.root_device().memregion("chargen")->base();
827824
828825   memcpy(dst, fontdata6x8, apexcfontdata_size);
829826}
r15157r15158
840837};
841838
842839static GFXDECODE_START( apexc )
843   GFXDECODE_ENTRY( "gfx1", 0, fontlayout, 0, 2 )
840   GFXDECODE_ENTRY( "chargen", 0, fontlayout, 0, 2 )
844841GFXDECODE_END
845842
846843
r15157r15158
898895   ROM_REGION32_BE(0x10000, "maincpu", ROMREGION_ERASEFF)
899896      /* Note this computer has no ROM... */
900897
901   ROM_REGION(apexcfontdata_size, "gfx1", ROMREGION_ERASEFF)
898   ROM_REGION(apexcfontdata_size, "chargen", ROMREGION_ERASEFF)
902899      /* space filled with our font */
903900ROM_END
904901
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)
907COMP(      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)
904COMP(  1955,    apexc,      0,        0,      apexc,      apexc,  apexc, "Andrew Donald Booth", "All Purpose Electronic X-ray Computer (as described in 1957)" , GAME_NO_SOUND_HW)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team