Previous 15994 Revisions Next

r4782 Thursday 21st May, 2009 at 12:16:50 UTC by Miodrag Milanović
[POCKETC] Added some of new machines
[docs]messnew.txt
[src/mess]messdriv.c
[src/mess/drivers]pocketc.c
[src/mess/machine]pc1251.c

src/mess/messdriv.c
r4781r4782
545545//   DRIVER( megaopd )
546546
547547   /* SHARP */
548   DRIVER( pc1245 )   /* Pocket Computer 1245                        */
549   DRIVER( pc1250 )   /* Pocket Computer 1250                        */
548550   DRIVER( pc1251 )   /* Pocket Computer 1251                        */
551   DRIVER( pc1255 )   /* Pocket Computer 1255                        */
549552   DRIVER( trs80pc3 )   /* Tandy TRS80 PC-3                           */
553   DRIVER( pc1260 )   /* Pocket Computer 1260                        */
554   DRIVER( pc1261 )   /* Pocket Computer 1261                        */
550555   DRIVER( pc1401 )   /* Pocket Computer 1401                        */
551556   DRIVER( pc1402 )   /* Pocket Computer 1402                        */
552557   DRIVER( pc1350 )   /* Pocket Computer 1350                        */
src/mess/machine/pc1251.c
r4781r4782
121121DRIVER_INIT( pc1251 )
122122{
123123   int i;
124   const address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM);
125124   UINT8 *gfx = memory_region(machine, "gfx1");
126125   for (i=0; i<128; i++) gfx[i]=i;
127126
128127   timer_set(machine, ATTOTIME_IN_SEC(1), NULL, 0, pc1251_power_up);
129
130   // c600 b800 b000 a000 8000 tested
131   // 4 kb memory feedback 512 bytes too few???
132   // 11 kb ram: program stored at 8000
133#if 1
134   memory_install_write8_handler(space, 0x8000, 0xc7ff, 0, 0, SMH_BANK(1));
135   memory_set_bankptr(machine, 1, memory_region(machine, "maincpu") + 0x8000);
136#else
137   if ((input_port_read(machine, "DSW0") & 0xc0) == 0xc0)
138   {
139      memory_install_write8_handler(space, 0x8000, 0xafff, 0, 0, SMH_RAM);
140      memory_install_write8_handler(space, 0xb000, 0xc5ff, 0, 0, SMH_NOP);
141      memory_install_write8_handler(space, 0xc600, 0xc7ff, 0, 0, SMH_RAM);
142      memory_install_write8_handler(space, 0xc800, 0xf7ff, 0, 0, SMH_RAM);
143   }
144   else if ((input_port_read(machine, "DSW0") & 0xc0) == 0x80)
145   {
146      memory_install_write8_handler(space, 0xa000, 0xafff, 0, 0, SMH_NOP);
147      memory_install_write8_handler(space, 0xb000, 0xc7ff, 0, 0, SMH_RAM);
148      memory_install_write8_handler(space, 0xc800, 0xcbff, 0, 0, SMH_RAM);
149   }
150   else if ((input_port_read(machine, "DSW0") & 0xc0) == 0x40)
151   {
152      memory_install_write8_handler(space, 0xa000, 0xb7ff, 0, 0, SMH_NOP);
153      memory_install_write8_handler(space, 0xb800, 0xc7ff, 0, 0, SMH_RAM);
154      memory_install_write8_handler(space, 0xc800, 0xcbff, 0, 0, SMH_RAM);
155   }
156   else
157   {
158      memory_install_write8_handler(space, 0xa000, 0xc5ff, 0, 0, SMH_NOP);
159      memory_install_write8_handler(space, 0xc600, 0xc9ff, 0, 0, SMH_RAM);
160      memory_install_write8_handler(space, 0xca00, 0xcbff, 0, 0, SMH_RAM);
161   }
162#endif
163128}
164129
src/mess/drivers/pocketc.c
r4781r4782
8989   AM_RANGE( 0x8000, 0xffff) AM_ROM
9090ADDRESS_MAP_END
9191
92static ADDRESS_MAP_START( pc1250_mem , ADDRESS_SPACE_PROGRAM, 8)
93   AM_RANGE( 0x0000, 0x1fff) AM_ROM
94   AM_RANGE( 0x4000, 0x7fff) AM_ROM
95   AM_RANGE( 0xc000, 0xc7ff) AM_RAM // 2KB RAM
96   AM_RANGE( 0xf800, 0xf8ff) AM_READWRITE( pc1251_lcd_read, pc1251_lcd_write)
97ADDRESS_MAP_END
98
9299static ADDRESS_MAP_START( pc1251_mem , ADDRESS_SPACE_PROGRAM, 8)
93100   AM_RANGE( 0x0000, 0x1fff) AM_ROM
94//  { 0x2000, 0x3fff, SMH_RAM },
95101   AM_RANGE( 0x4000, 0x7fff) AM_ROM
96   AM_RANGE( 0xa000, 0xcbff) AM_ROM
102   AM_RANGE( 0xb800, 0xc7ff) AM_RAM // 4KB RAM
97103   AM_RANGE( 0xf800, 0xf8ff) AM_READWRITE( pc1251_lcd_read, pc1251_lcd_write)
98104ADDRESS_MAP_END
99105
106static ADDRESS_MAP_START( pc1255_mem , ADDRESS_SPACE_PROGRAM, 8)
107   AM_RANGE( 0x0000, 0x1fff) AM_ROM
108   AM_RANGE( 0x4000, 0x7fff) AM_ROM
109   AM_RANGE( 0xa000, 0xc7ff) AM_RAM // 10KB RAM
110   AM_RANGE( 0xf800, 0xf8ff) AM_READWRITE( pc1251_lcd_read, pc1251_lcd_write)
111ADDRESS_MAP_END
112
113static ADDRESS_MAP_START( pc1260_mem , ADDRESS_SPACE_PROGRAM, 8)
114   AM_RANGE( 0x0000, 0x1fff) AM_ROM
115   AM_RANGE( 0x2000, 0x20ff) AM_READWRITE( pc1251_lcd_read, pc1251_lcd_write)
116   //AM_RANGE( 0x2800, 0x28ff) AM_READWRITE( pc1251_lcd_read, pc1251_lcd_write)
117   AM_RANGE( 0x5800, 0x67ff) AM_RAM // 4KB RAM
118   AM_RANGE( 0x8000, 0xffff) AM_ROM
119ADDRESS_MAP_END
120
121static ADDRESS_MAP_START( pc1261_mem , ADDRESS_SPACE_PROGRAM, 8)
122   AM_RANGE( 0x0000, 0x1fff) AM_ROM
123   AM_RANGE( 0x2000, 0x20ff) AM_READWRITE( pc1251_lcd_read, pc1251_lcd_write)
124   //AM_RANGE( 0x2800, 0x28ff) AM_READWRITE( pc1251_lcd_read, pc1251_lcd_write)
125   AM_RANGE( 0x4000, 0x67ff) AM_RAM // 10KB RAM
126   AM_RANGE( 0x8000, 0xffff) AM_ROM
127ADDRESS_MAP_END
128
129
100130static ADDRESS_MAP_START( pc1350_mem , ADDRESS_SPACE_PROGRAM, 8)
101131   AM_RANGE( 0x0000, 0x1fff) AM_ROM
102132   AM_RANGE( 0x7000, 0x7eff) AM_READWRITE( pc1350_lcd_read, pc1350_lcd_write )
r4781r4782
125155   AM_RANGE( 0x3800, 0x47ff) AM_WRITE( SMH_RAM )
126156   AM_RANGE( 0x8000, 0xffff) AM_WRITE( SMH_ROM )
127157ADDRESS_MAP_END
128
129static ADDRESS_MAP_START( pc1260_readmem , ADDRESS_SPACE_PROGRAM, 8)
130   AM_RANGE( 0x0000, 0x1fff) AM_READ( SMH_ROM )
131   AM_RANGE( 0x4000, 0x5fff) AM_READ( SMH_RAM )
132   AM_RANGE( 0x8000, 0xffff) AM_READ( SMH_ROM )
133ADDRESS_MAP_END
134
135static ADDRESS_MAP_START( pc1260_writemem , ADDRESS_SPACE_PROGRAM, 8)
136   AM_RANGE( 0x0000, 0x1fff) AM_WRITE( SMH_ROM )
137   AM_RANGE( 0x4000, 0x57ff) AM_WRITE( SMH_RAM ) /* 1261 */
138   AM_RANGE( 0x5800, 0x67ff) AM_WRITE( SMH_RAM )
139   AM_RANGE( 0x6000, 0x6fff) AM_WRITE( SMH_RAM )
140
141   AM_RANGE( 0x8000, 0xffff) AM_WRITE( SMH_ROM )
142ADDRESS_MAP_END
143158#endif
144159
145160
r4781r4782
531546   PORT_DIPSETTING(   0x01, "On/RSV" )
532547
533548   PORT_START("DSW0")
534#if 0
535    PORT_DIPNAME( 0xc0, 0xc0, "RAM")
536   PORT_DIPSETTING(   0x00, "1KB" )
537   PORT_DIPSETTING(   0x40, "3.5KB" )
538   PORT_DIPSETTING(   0x80, "6KB" )
539   PORT_DIPSETTING(   0xc0, "11KB" )
540#endif
541549    PORT_DIPNAME( 0x07, 0x02, "Contrast")
542550   PORT_DIPSETTING(   0x00, "0/Low" )
543551   PORT_DIPSETTING(   0x01, "1" )
r4781r4782
763771    pc1251_outc
764772};
765773
766static MACHINE_DRIVER_START( pc1251 )
774static MACHINE_DRIVER_START( pc1250 )
767775   MDRV_IMPORT_FROM( pc1401 )
768776   MDRV_CPU_MODIFY( "maincpu" )
769   MDRV_CPU_PROGRAM_MAP( pc1251_mem)
777   MDRV_CPU_PROGRAM_MAP( pc1250_mem)
770778   MDRV_CPU_CONFIG( pc1251_config )
771779
772780   MDRV_NVRAM_HANDLER( pc1251 )
r4781r4782
775783   MDRV_SCREEN_MODIFY("screen")
776784   MDRV_SCREEN_SIZE(608, 300)
777785   MDRV_SCREEN_VISIBLE_AREA(0, 608-1, 0, 300-1)
778//  MDRV_SCREEN_SIZE(640, 334)
779//  MDRV_SCREEN_VISIBLE_AREA(0, 640-1, 0, 334-1)
780786   MDRV_GFXDECODE( pc1251 )
781
787   
782788   MDRV_VIDEO_UPDATE( pc1251 )
783789MACHINE_DRIVER_END
784790
791static MACHINE_DRIVER_START( pc1251 )
792   MDRV_IMPORT_FROM( pc1250)
793   MDRV_CPU_MODIFY( "maincpu" )
794   MDRV_CPU_PROGRAM_MAP( pc1251_mem)
795MACHINE_DRIVER_END
785796
797static MACHINE_DRIVER_START( pc1255 )
798   MDRV_IMPORT_FROM( pc1250)
799   MDRV_CPU_MODIFY( "maincpu" )
800   MDRV_CPU_PROGRAM_MAP( pc1255_mem)
801MACHINE_DRIVER_END
802
803NVRAM_HANDLER( pc1260 )
804{
805   const device_config *main_cpu = cputag_get_cpu(machine, "maincpu");
806   UINT8 *ram = memory_region(machine, "maincpu") + 0x4000;
807   UINT8 *cpu = sc61860_internal_ram(main_cpu);
808
809   if (read_or_write)
810   {
811      mame_fwrite(file, cpu, 96);
812      mame_fwrite(file, ram, 0x2800);
813   }
814   else if (file)
815   {
816      mame_fread(file, cpu, 96);
817      mame_fread(file, ram, 0x2800);
818   }
819   else
820   {
821      memset(cpu, 0, 96);
822      memset(ram, 0, 0x2800);
823   }
824}
825
826static MACHINE_DRIVER_START( pc1260 )
827   MDRV_IMPORT_FROM( pc1250)
828   MDRV_CPU_MODIFY( "maincpu" )
829   MDRV_CPU_PROGRAM_MAP( pc1260_mem)
830   
831   MDRV_NVRAM_HANDLER( pc1260 )
832MACHINE_DRIVER_END
833
834static MACHINE_DRIVER_START( pc1261 )
835   MDRV_IMPORT_FROM( pc1260)
836   MDRV_CPU_MODIFY( "maincpu" )
837   MDRV_CPU_PROGRAM_MAP( pc1261_mem)
838MACHINE_DRIVER_END
839
786840static const sc61860_cpu_core pc1350_config =
787841{
788842    NULL, pc1350_brk,NULL,
r4781r4782
857911
858912#define rom_pc1402 rom_pc1401
859913
860ROM_START(pc1251)
914ROM_START(pc1245)
861915   ROM_REGION(0x10000,"maincpu",0)
916     ROM_LOAD( "cpu1245.rom", 0x0000, 0x2000, CRC(e0964069) SHA1(293c57b233d55944b308191fd72ecff81979cda7))
917     ROM_LOAD( "bas1245.rom", 0x4000, 0x4000, CRC(f6253a0d) SHA1(bcac9b4f5a88eb952e81b3ee28f922c06bace18e))
918     ROM_REGION(0x80,"gfx1",ROMREGION_ERASEFF)
919ROM_END
920
921ROM_START(pc1250)
922   ROM_REGION(0x10000,"maincpu",0)
862923   /* sc61860a13 6c 13 ld */
863   ROM_LOAD("cpu1251.rom", 0x0000, 0x2000, CRC(f7287aca) SHA1(19bfa778e3e05ea06bdca15cd9dfbba9b971340e))
864   ROM_LOAD("bas1251.rom", 0x4000, 0x4000, CRC(93ecb629) SHA1(0fe0ad419053ee7814600b0be320dd2e8eb2ec92))
924   ROM_LOAD("cpu1250.rom", 0x0000, 0x2000, CRC(f7287aca) SHA1(19bfa778e3e05ea06bdca15cd9dfbba9b971340e))
925   ROM_LOAD("bas1250.rom", 0x4000, 0x4000, CRC(93ecb629) SHA1(0fe0ad419053ee7814600b0be320dd2e8eb2ec92))
865926   ROM_REGION(0x80,"gfx1",ROMREGION_ERASEFF)
866927ROM_END
867928
868#define rom_trs80pc3 rom_pc1251
929#define rom_pc1251 rom_pc1250
930#define rom_pc1255 rom_pc1250
931#define rom_trs80pc3 rom_pc1250
869932
933
934ROM_START(pc1260)
935   ROM_REGION(0x10000,"maincpu",0)
936   ROM_LOAD( "cpu1260.rom", 0x0000, 0x2000, CRC(f46d23d3) SHA1(e00c9194570048185ec8358732adeba151c56b33))
937   ROM_LOAD( "bas1260.rom", 0x8000, 0x8000, CRC(6c7e017d) SHA1(e2ae717438cea59416b0670e2a53989c147fb362))
938     ROM_REGION(0x80,"gfx1",ROMREGION_ERASEFF)
939ROM_END
940
941#define rom_pc1261 rom_pc1260
942
870943ROM_START(pc1350)
871944   ROM_REGION(0x10000,"maincpu",0)
872945   /* sc61860a13 6c 13 ld */
r4781r4782
917990   pc1600
918991*/
919992
920/*    YEAR  NAME        PARENT  COMPAT  MACHINE INPUT   INIT    CONFIG      COMPANY     FULLNAME */
993/*    YEAR  NAME    PARENT  COMPAT  MACHINE INPUT   INIT    CONFIG      COMPANY     FULLNAME */
921994/* cpu sc61860 */
922COMP( 1982, pc1251,   0,   0,   pc1251,   pc1251,   pc1251,   pocketc, "Sharp", "Pocket Computer 1251", 0 )
923COMP( 198?, trs80pc3,   pc1251,   0,   pc1251,   pc1251,   pc1251,   pocketc, "Tandy", "TRS80 PC-3", 0 )
995COMP( 1982, pc1245,   0,      0,   pc1250,   pc1251,   pc1251,   pocketc, "Sharp", "Pocket Computer 1245", GAME_NOT_WORKING )
996COMP( 1982, pc1250,   0,      0,   pc1250,   pc1251,   pc1251,   pocketc, "Sharp", "Pocket Computer 1250", 0 )
997COMP( 1982, pc1251,   pc1250,   0,   pc1251,   pc1251,   pc1251,   pocketc, "Sharp", "Pocket Computer 1251", 0 )
998COMP( 1982, pc1255,   pc1250,   0,   pc1255,   pc1251,   pc1251,   pocketc, "Sharp", "Pocket Computer 1255", 0 )
999COMP( 198?, trs80pc3,pc1250,0,   pc1251,   pc1251,   pc1251,   pocketc, "Tandy", "TRS80 PC-3", 0 )
9241000
1001COMP( 1982, pc1260,   0,      0,   pc1260,   pc1251,   pc1251,   pocketc, "Sharp", "Pocket Computer 1260", GAME_NOT_WORKING )
1002COMP( 1982, pc1261,   pc1260,   0,   pc1261,   pc1251,   pc1251,   pocketc, "Sharp", "Pocket Computer 1261/1262", GAME_NOT_WORKING )
1003
9251004/* pc1261/pc1262 */
926COMP( 1984, pc1350,   0,   0,   pc1350,   pc1350,   0,   pc1350,    "Sharp", "Pocket Computer 1350", 0 )
927COMP( 1983, pc1401,   0,   0,   pc1401,   pc1401,   pc1401,   pocketc, "Sharp", "Pocket Computer 1401", 0 )
1005COMP( 1984, pc1350,   0,      0,   pc1350,   pc1350,   0,   pc1350,    "Sharp", "Pocket Computer 1350", 0 )
1006
1007COMP( 1983, pc1401,   0,      0,   pc1401,   pc1401,   pc1401,   pocketc, "Sharp", "Pocket Computer 1401", 0 )
9281008COMP( 1984, pc1402,   pc1401,   0,   pc1401,   pc1402,   pc1401,   pocketc, "Sharp", "Pocket Computer 1402", 0 )
9291009
9301010/* 72kb rom, 32kb ram, cpu? pc1360 */
docs/messnew.txt
r4781r4782
2121- Pravetz 82, 8M and 8C [Miodrag Milanovic]
2222- Microprofessor III [Miodrag Milanovic]
2323- Brailab 4 (not working) [Miodrag Milanovic]
24- Sharp Pocket Computer 1245,1250,1255,1260,1261/1262 [Miodrag Milanovic]
2425
2526Skeleton drivers :
2627------------------

Previous 15994 Revisions Next


© 1998-2018 The MESS Team