Previous 15994 Revisions Next

r9182 Sunday 19th September, 2010 at 04:57:00 UTC by Robbbert
[ZX, SUPER80] Indicate homebrew modified computers {SUPER80] (super80v) Simplify memory handling, no need to save it twice.
[src/mess/drivers]super80.c zx.c
[src/mess/includes]super80.h
[src/mess/machine]super80.c
[src/mess/video]super80.c

src/mess/machine/super80.c
r9181r9182
239239
240240DRIVER_INIT( super80v )
241241{
242   super80_state *state = machine->driver_data<super80_state>();
243   state->pcgram = memory_region(machine, "maincpu")+0xf000;
244   state->videoram = memory_region(machine, "maincpu")+0x18000;
245   state->colorram = memory_region(machine, "maincpu")+0x1C000;
246242   driver_init_common(machine);
247243}
248244
src/mess/video/super80.c
r9181r9182
303303static UINT8 framecnt=0;
304304static UINT8 speed,flash;
305305static UINT16 cursor;
306static UINT8 *videoram;
307static UINT8 *colorram;
308static UINT8 *pcgram;
306309
307310READ8_HANDLER( super80v_low_r )
308311{
309312   super80_state *state = space->machine->driver_data<super80_state>();
310313
311314   if (state->super80_shared & 4)
312   {
313      UINT8 *videoram = state->videoram;
314315      return videoram[offset];
315   }
316316   else
317   {
318      UINT8 *colorram = state->colorram;
319317      return colorram[offset];
320   }
321318}
322319
323320WRITE8_HANDLER( super80v_low_w )
r9181r9182
325322   super80_state *state = space->machine->driver_data<super80_state>();
326323   
327324   if (state->super80_shared & 4)
328   {
329      UINT8 *videoram = state->videoram;
330325      videoram[offset] = data;
331   }
332326   else
333   {
334      UINT8 *colorram = state->colorram;
335327      colorram[offset] = data;
336   }
337328}
338329
339330READ8_HANDLER( super80v_high_r )
r9181r9182
341332   super80_state *state = space->machine->driver_data<super80_state>();
342333
343334   if (~state->super80_shared & 4)
344   {
345      UINT8 *colorram = state->colorram;
346      return colorram[0x800+offset];
347   }
335      return colorram[0x800 | offset];
348336   else
349   {
350      UINT8 *pcgram = state->pcgram;
351      if (state->super80_shared & 0x10)
352         return pcgram[0x800+offset];
353      else
354         return pcgram[offset];
355   }
337   if (state->super80_shared & 0x10)
338      return pcgram[0x800 | offset];
339   else
340      return pcgram[offset];
356341}
357342
358343WRITE8_HANDLER( super80v_high_w )
r9181r9182
360345   super80_state *state = space->machine->driver_data<super80_state>();
361346
362347   if (~state->super80_shared & 4)
363   {
364      UINT8 *colorram = state->colorram;
365      colorram[offset+0x800] = data;
366   }
348      colorram[0x800 | offset] = data;
367349   else
368350   {
369      UINT8 *videoram = state->videoram;
370      videoram[offset+0x800] = data;
351      videoram[0x800 | offset] = data;
371352
372353      if (state->super80_shared & 0x10)
373      {
374         UINT8 *pcgram = state->pcgram;
375         pcgram[0x800+offset] = data;
376      }
354         pcgram[0x800 | offset] = data;
377355   }
378356}
379357
r9181r9182
434412{
435413   mc6845 = machine->device("crtc");
436414   FNT = memory_region(machine, "gfx1");
415   pcgram = memory_region(machine, "maincpu")+0xf000;
416   videoram = memory_region(machine, "videoram");
417   colorram = memory_region(machine, "colorram");
437418}
438419
439420VIDEO_UPDATE( super80v )
r9181r9182
451432MC6845_UPDATE_ROW( super80v_update_row )
452433{
453434   super80_state *state = device->machine->driver_data<super80_state>();
454   UINT8 *videoram = state->videoram;
455   UINT8 *pcgram = state->pcgram;
456   UINT8 *colorram = state->colorram;
457435   UINT8 chr,col,gfx,fg,bg=0;
458436   UINT16 mem,x;
459437   UINT16  *p = BITMAP_ADDR16(bitmap, y, 0);
src/mess/includes/super80.h
r9181r9182
1616      : driver_device(machine, config) { }
1717
1818   UINT8 super80_shared;
19   UINT8 *videoram;
20   UINT8 *pcgram;
21   UINT8 *colorram;
2219};
2320
2421
src/mess/drivers/zx.c
r9181r9182
569569COMP( 1984, pc8300,     zx81,   0,      pc8300,     pc8300,     zx,     "Your Computer",            "PC8300",              0 )
570570COMP( 1983, pow3000,    zx81,   0,      pow3000,    pow3000,    zx,     "Creon Enterprises",        "Power 3000",          0 )
571571COMP( 1982, lambda,     zx81,   0,      pow3000,    pow3000,    zx,     "Lambda Electronics Ltd",   "Lambda 8300",         0 )
572COMP( 1997, zx97,       zx81,   0,      zx81,       zx81,      zx,     "Wilf Rigter",              "ZX97",     GAME_NOT_WORKING )
572COMP( 1997, zx97,       zx81,   0,      zx81,       zx81,      zx,     "Wilf Rigter",              "ZX97",     GAME_NOT_WORKING | GAME_UNOFFICIAL )
src/mess/drivers/super80.c
r9181r9182
226226   AM_RANGE(0x0000, 0x3fff) AM_RAMBANK("bank1")
227227   AM_RANGE(0x4000, 0xbfff) AM_RAM
228228   AM_RANGE(0xc000, 0xefff) AM_ROM
229   AM_RANGE(0xf000, 0xf7ff) AM_READWRITE(super80v_low_r, super80v_low_w) AM_BASE_MEMBER(super80_state, pcgram)
229   AM_RANGE(0xf000, 0xf7ff) AM_READWRITE(super80v_low_r, super80v_low_w)
230230   AM_RANGE(0xf800, 0xffff) AM_READWRITE(super80v_high_r, super80v_high_w)
231231ADDRESS_MAP_END
232232
r9181r9182
824824   ROM_LOAD("super80.u33",     0xd000, 0x1000, CRC(cf8020a8) SHA1(2179a61f80372cd49e122ad3364773451531ae85) )
825825   ROM_LOAD("super80.u42",     0xe000, 0x1000, CRC(a1c6cb75) SHA1(d644ca3b399c1a8902f365c6095e0bbdcea6733b) )
826826   ROM_LOAD("s80hmce.ic24",  0xf000, 0x0800, CRC(a6488a1e) SHA1(7ba613d70a37a6b738dcd80c2bb9988ff1f011ef) )
827
828   ROM_REGION( 0x1000, "videoram", ROMREGION_ERASEFF )
827829ROM_END
828830
829831ROM_START( super80v )
r9181r9182
832834   ROM_LOAD("s80-v37.u33",   0xd000, 0x1000, CRC(812ad777) SHA1(04f355bea3470a7d9ea23bb2811f6af7d81dc400) )
833835   ROM_LOAD("s80-v37.u42",   0xe000, 0x1000, CRC(e02e736e) SHA1(57b0264c805da99234ab5e8e028fca456851a4f9) )
834836   ROM_LOAD("s80hmce.ic24",  0xf000, 0x0800, CRC(a6488a1e) SHA1(7ba613d70a37a6b738dcd80c2bb9988ff1f011ef) )
837
838   ROM_REGION( 0x1000, "videoram", ROMREGION_ERASEFF )
839   ROM_REGION( 0x1000, "colorram", ROMREGION_ERASEFF )
835840ROM_END
836841
837842/*    YEAR  NAME      PARENT COMPAT MACHINE INPUT     INIT      COMPANY       FULLNAME */
838843COMP( 1981, super80,  0,       0, super80,  super80,  super80,  "Dick Smith Electronics","Super-80 (V1.2)" , 0)
839844COMP( 1981, super80d, super80, 0, super80d, super80d, super80,  "Dick Smith Electronics","Super-80 (V2.2)" , 0)
840COMP( 1981, super80e, super80, 0, super80e, super80d, super80,  "Dick Smith Electronics","Super-80 (El Graphix 4)" , 0)
841COMP( 1981, super80m, super80, 0, super80m, super80m, super80,  "Dick Smith Electronics","Super-80 (8R0)" , 0)
842COMP( 1981, super80r, super80, 0, super80r, super80r, super80v, "Dick Smith Electronics","Super-80 (with VDUEB)" , 0)
843COMP( 1981, super80v, super80, 0, super80v, super80v, super80v, "Dick Smith Electronics","Super-80 (with enhanced VDUEB)" , 0)
845COMP( 1981, super80e, super80, 0, super80e, super80d, super80,  "Dick Smith Electronics","Super-80 (El Graphix 4)" , GAME_UNOFFICIAL)
846COMP( 1981, super80m, super80, 0, super80m, super80m, super80,  "Dick Smith Electronics","Super-80 (8R0)" , GAME_UNOFFICIAL)
847COMP( 1981, super80r, super80, 0, super80r, super80r, super80v, "Dick Smith Electronics","Super-80 (with VDUEB)" , GAME_UNOFFICIAL)
848COMP( 1981, super80v, super80, 0, super80v, super80v, super80v, "Dick Smith Electronics","Super-80 (with enhanced VDUEB)" , GAME_UNOFFICIAL)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team