Previous 15994 Revisions Next

r5646 Tuesday 8th September, 2009 at 14:08:06 UTC by Dirk Best
[PX4] Added RAM disk support.
[docs]messnew.txt
[src/mess/drivers]px4.c

src/mess/drivers/px4.c
r5645r5646
6262
6363   UINT8 key_status;
6464   UINT8 interrupt_status;
65
66   /* external ramdisk */
67   offs_t ramdisk_address;
68   UINT8 *ramdisk;
6569};
6670
6771
r5645r5646
561565
562566
563567/***************************************************************************
568    EXTERNAL RAM-DISK
569***************************************************************************/
570
571static WRITE8_HANDLER( px4_ramdisk_address_w )
572{
573   px4_state *px4 = space->machine->driver_data;
574
575   switch (offset)
576   {
577   case 0x00: px4->ramdisk_address = (px4->ramdisk_address & 0xffff00) | data; break;
578   case 0x01: px4->ramdisk_address = (px4->ramdisk_address & 0xff00ff) | (data << 8); break;
579   case 0x02: px4->ramdisk_address = (px4->ramdisk_address & 0x00ffff) | ((data & 0x07) << 16); break;
580   }
581}
582
583static READ8_HANDLER( px4_ramdisk_data_r )
584{
585   px4_state *px4 = space->machine->driver_data;
586   UINT8 ret = 0xff;
587
588   if (px4->ramdisk_address < 0x20000)
589   {
590      /* read from ram */
591      ret = px4->ramdisk[px4->ramdisk_address];
592   }
593   else if (px4->ramdisk_address < 0x40000)
594   {
595      /* read from rom */
596      ret = memory_region(space->machine, "ramdisk")[px4->ramdisk_address];
597   }
598
599   px4->ramdisk_address = (px4->ramdisk_address & 0xffff00) | ((px4->ramdisk_address & 0xff) + 1);
600
601   return ret;
602}
603
604static WRITE8_HANDLER( px4_ramdisk_data_w )
605{
606   px4_state *px4 = space->machine->driver_data;
607
608   if (px4->ramdisk_address < 0x20000)
609      px4->ramdisk[px4->ramdisk_address] = data;
610
611   px4->ramdisk_address = (px4->ramdisk_address & 0xffff00) | ((px4->ramdisk_address & 0xff) + 1);
612}
613
614static READ8_HANDLER( px4_ramdisk_control_r )
615{
616   /* bit 7 determines the presence of a ram-disk */
617   return 0x7f;
618}
619
620static NVRAM_HANDLER( px4_ramdisk )
621{
622   px4_state *px4 = machine->driver_data;
623
624   if (read_or_write)
625      mame_fwrite(file, px4->ramdisk, 0x20000);
626   else
627      if (file)
628         mame_fread(file, px4->ramdisk, 0x20000);
629}
630
631
632/***************************************************************************
564633    VIDEO EMULATION
565634***************************************************************************/
566635
r5645r5646
627696   memory_set_bankptr(machine, 2, mess_ram + 0x8000);
628697}
629698
699static DRIVER_INIT( px4p )
700{
701   px4_state *px4 = machine->driver_data;
630702
703   DRIVER_INIT_CALL(px4);
704
705   /* reserve memory for external ram-disk */
706   px4->ramdisk = auto_alloc_array(machine, UINT8, 0x20000);
707}
708
709
631710/***************************************************************************
632711    ADDRESS MAPS
633712***************************************************************************/
r5645r5646
663742   AM_RANGE(0x1a, 0x1f) AM_NOP
664743ADDRESS_MAP_END
665744
745static ADDRESS_MAP_START( px4p_io, ADDRESS_SPACE_IO, 8 )
746   AM_IMPORT_FROM(px4_io)
747   AM_RANGE(0x90, 0x92) AM_WRITE(px4_ramdisk_address_w)
748   AM_RANGE(0x93, 0x93) AM_READWRITE(px4_ramdisk_data_r, px4_ramdisk_data_w)
749   AM_RANGE(0x94, 0x94) AM_READ(px4_ramdisk_control_r)
750ADDRESS_MAP_END
666751
752
667753/***************************************************************************
668754    INPUT PORTS
669755***************************************************************************/
r5645r5646
826912   palette_set_color(machine, 1, MAKE_RGB(92, 83, 88));
827913}
828914
915static PALETTE_INIT( px4p )
916{
917   palette_set_color(machine, 0, MAKE_RGB(149, 157, 130));
918   palette_set_color(machine, 1, MAKE_RGB(92, 83, 88));
919}
829920
921
830922/***************************************************************************
831923    MACHINE DRIVERS
832924***************************************************************************/
r5645r5646
866958   MDRV_CARTSLOT_NOT_MANDATORY
867959MACHINE_DRIVER_END
868960
961static MACHINE_DRIVER_START( px4p )
962   MDRV_IMPORT_FROM(px4)
869963
964   MDRV_CPU_MODIFY("maincpu")
965   MDRV_CPU_IO_MAP(px4p_io)
966
967   MDRV_NVRAM_HANDLER(px4_ramdisk)
968
969   MDRV_PALETTE_INIT(px4p)
970
971   MDRV_CARTSLOT_ADD("ramdisk")
972   MDRV_CARTSLOT_NOT_MANDATORY
973MACHINE_DRIVER_END
974
975
870976/***************************************************************************
871977    ROM DEFINITIONS
872978***************************************************************************/
r5645r5646
8971003
8981004    ROM_REGION(0x8000, "capsule2", 0)
8991005    ROM_CART_LOAD("capsule2", 0x0000, 0x8000, ROM_OPTIONAL)
1006
1007    ROM_REGION(0x20000, "ramdisk", 0)
1008    ROM_CART_LOAD("ramdisk", 0x0000, 0x20000, ROM_OPTIONAL | ROM_MIRROR)
9001009ROM_END
9011010
9021011
r5645r5646
9151024
9161025/*    YEAR  NAME  PARENT  COMPAT  MACHINE  INPUT      INIT  CONFIG  COMPANY  FULLNAME  FLAGS */
9171026COMP( 1985, px4,  0,      0,      px4,     px4_h450a, px4,  px4,    "Epson", "PX-4",   0 )
918COMP( 1985, px4p, px4,    0,      px4,    px4_h450a, px4, px4,    "Epson", "PX-4+",  0 )
1027COMP( 1985, px4p, px4,    0,      px4p,    px4_h450a, px4p, px4,    "Epson", "PX-4+",  0 )
docs/messnew.txt
r5645r5646
6767
6868- [PIPPIN] Added CD-ROM firmware. [incog nito]
6969
70- [PX4] Added RAM disk support.  [Dirk Best]
71
7072- [SNES] Plenty of improvements to SNES emulation (see MAME whatsnew for
7173  more details) [Fabio Priuli, Angelo Salese]:
7274  * fixes to hi-res in Mode 5/6, interlaced graphics, rowscroll, window effect
r5645r5646
656658- Amateurcomputer AC1 [Miodrag Milanovic]
657659- Pilot 1000, Pilot 5000, PalmPilot Personal, PalmPilot Pro, Palm III
658660  [MooglyGuy, R. Belmont]
659- Hewlett Packard HP 48 S/SX/G/GX/G+ [Antoine Miné]
661- Hewlett Packard HP 48 S/SX/G/GX/G+ [Antoine Min�]
660662- Epson PX-4  [Dirk Best]
661- Various Channel F clones [Fredric QJ Blåholtz]
663- Various Channel F clones [Fredric QJ Bl�holtz]
662664- Radionic [Incog, Robbbert]
663665
664666
r5645r5646
683685- [BW2] Updated to use the new centronics interface.  [Dirk Best]
684686
685687- [CHANNELF] Added support for "new" sound, fixed PAL clock.  [Fredric QJ
686  Blåholtz]
688  Bl�holtz]
687689
688690- [COCO] Cleanups  [Nathan Woods]
689691
r5645r5646
10241026  had plugged your joystick in port 2). This helps with games which expect
10251027  joystick inputs from port 2 of the C64 [Fabio Priuli]
10261028
1027- [C64] Fixed memory leaks with floppies [Oliver Stöneberg]
1029- [C64] Fixed memory leaks with floppies [Oliver St�neberg]
10281030
1029- [C64] Fixed floppy unmounting [Oliver Stöneberg]
1031- [C64] Fixed floppy unmounting [Oliver St�neberg]
10301032
10311033- [C65] Added preliminary cartridge support through MESS core functions.
10321034  Currently, .crt emulation uses unmodified C64 cart code and therefore
r5645r5646
10751077
10761078- [OSCNANO] Implemented RUN/MONITOR keys properly, changed video to
10771079  black and white, and fixed quickloading. System is now fully
1078  working, including the "Säkkijärven polkka" program. [Curt Coder]
1080  working, including the "S�kkij�rven polkka" program. [Curt Coder]
10791081
10801082- [JUPITER] Fixed regression; driver works again.  [Wilbert Pol]
10811083
r5645r5646
11361138  single VP-580 Auxiliary Keyboard emulation. The VIP Blockout game can
11371139  now be played in color with sound using 2 keypads. [Curt Coder]
11381140
1139- [X68000] Fixed SASI harddisk device info [Oliver Stöneberg]
1141- [X68000] Fixed SASI harddisk device info [Oliver St�neberg]
11401142
11411143
11421144
r5645r5646
11491151  Woods]
11501152
11511153- Added "Keyboard Mode" menu to switch between emulated and natural keyboard
1152  during emulation. [Oliver Stöneberg]
1154  during emulation. [Oliver St�neberg]
11531155
11541156- Fixed toggling through multiple cassettes in Tape Control menu [Oliver
1155  Stöneberg]
1157  St�neberg]
11561158
11571159- MESSUI now shows the actual values of the system configuration
11581160  settings instead of the defaults. (bug #1679) [Curt Coder]
r5645r5646
11781180  Woods]
11791181
11801182- Removed MESS_DEBUG and the TESTDRIVER define and enabled a lot of
1181  non-working drivers [Oliver Stöneberg]
1183  non-working drivers [Oliver St�neberg]
11821184
11831185- Changed the cassette implementation into a regular mame device.  [Wilbert Pol]
11841186
r5645r5646
14681470
14691471- [CBM, C16] Simplified keyboard and interrupt handling code.  [Fabio Priuli]
14701472
1471- [C64] Fixed some timings in c64 pal. [Roberto Zandonà]
1473- [C64] Fixed some timings in c64 pal. [Roberto Zandon�]
14721474
14731475- [C64] Partial input fix, joystick 2 still not working. (bug #1150) [Roberto
1474  Zandonà]
1476  Zandon�]
14751477
14761478- [C64] Implentation of sprite wrapping at the top of the screen. (bug #1599)
1477  [Roberto Zandonà]
1479  [Roberto Zandon�]
14781480
14791481- [COCO/COCO3] Transitioned Bitbanger and VHD support to use MAME's core
14801482  device system.  [Nate Woods]
r5645r5646
16521654
16531655- [COCO] Added a quickload for .BIN files.  [Nate Woods]
16541656
1655- [COUPE] Added many new BIOS revisions.  [Oliver Stöneberg]
1657- [COUPE] Added many new BIOS revisions.  [Oliver St�neberg]
16561658
16571659- [EP128] Fixed 0.119 regression in graphics display. (bug #1478)
16581660  [Wilbert Pol]
r5645r5646
19341936  to the data port.  (bug #1378 and bug #1418) [Wilbert Pol]
19351937
19361938- [MEPHISTO] Implemented artwork/code for real chess board usage. [Ralf
1937  Schäfer, Cowering]
1939  Sch�fer, Cowering]
19381940
19391941- [ORIC] Fixed floppy interface detection.  [Dirk Best]
19401942
r5645r5646
75707572  *"Engine" is separate from the "shell"; which gives the potential for front ends for
75717573   those who don't like command lines. [Nate Woods]
75727574
7573- Disk write support for AMSTRAD CPC [Oscar Martín González]
7575- Disk write support for AMSTRAD CPC [Oscar Mart�n Gonz�lez]
75747576
7575- Wave timer fix [Oscar Martín González]
7577- Wave timer fix [Oscar Mart�n Gonz�lez]
75767578
75777579- m6510t/m7501/m8502 CPU cores added [Peter Trauner]
75787580

Previous 15994 Revisions Next


© 1998-2018 The MESS Team