Previous 15994 Revisions Next

r8040 Friday 14th May, 2010 at 17:20:27 UTC by Angelo Salese
[X1]: Added experimental cartslot support
[src/mess/drivers]x1.c

src/mess/drivers/x1.c
r8039r8040
3939      Any i/o read disables this extended bitmap ram.
4040    - I/O port $700 bit 7 of X1 Turbo is a sound (dip-)switch / jumper setting. I don't know yet what is for,
4141      but King's Knight needs it to be active otherwise it refuses to boot.
42    - ROM format is:
43      0x00 ROM id (must be 0x01)
44      0x01 - 0x0e ROM header
45      0xff16 - 0xff17 start-up vector
46      In theory, you can convert your tape / floppy games into ROM format easily, provided that you know what's the pinout of the
47      cartridge slot and it doesn't exceed 64k (0x10000) of size.
4248
4349=================================================================================================
4450
r8039r8040
191197#include "formats/flopimg.h"
192198#include "formats/basicdsk.h"
193199#include "formats/x1_tap.h"
200#include "devices/cartslot.h"
194201//#include <ctype.h>
195202
196203#define MAIN_CLOCK XTAL_16MHz
r8039r8040
868875
869876static READ8_HANDLER( x1_rom_r )
870877{
871   //UINT8 *ROM = memory_region(space->machine, "rom");
878   UINT8 *rom = memory_region(space->machine, "cart_img");
872879
873//  popmessage("%06x",rom_index[0]<<16|rom_index[1]<<8|rom_index[2]<<0);
880//   printf("%06x\n",rom_index[0]<<16|rom_index[1]<<8|rom_index[2]<<0);
874881
875   return 0; //ROM[rom_index[0]<<16|rom_index[1]<<8|rom_index[2]<<0];
882   return rom[rom_index[0]<<16|rom_index[1]<<8|rom_index[2]<<0];
876883}
877884
878885static WRITE8_HANDLER( x1_rom_w )
r8039r8040
21752182
21762183   MDRV_MB8877_ADD("fdc",x1_mb8877a_interface)
21772184
2185   MDRV_CARTSLOT_ADD("cart")
2186   MDRV_CARTSLOT_EXTENSION_LIST("rom")
2187   MDRV_CARTSLOT_NOT_MANDATORY
2188
21782189   MDRV_SPEAKER_STANDARD_MONO("mono")
21792190
21802191   MDRV_SOUND_ADD("ay", AY8910, MAIN_CLOCK/8)
r8039r8040
22322243   ROM_REGION(0x20000, "kanji", ROMREGION_ERASEFF)
22332244
22342245   ROM_REGION(0x20000, "raw_kanji", ROMREGION_ERASEFF)
2246
2247   ROM_REGION( 0x1000000, "cart_img", ROMREGION_ERASE00 )
2248   ROM_CART_LOAD("cart", 0x0000, 0xffffff, ROM_OPTIONAL | ROM_NOMIRROR)
22352249ROM_END
22362250
22372251ROM_START( x1ck )
r8039r8040
22572271   ROM_REGION(0x20000, "kanji", ROMREGION_ERASEFF)
22582272
22592273   ROM_REGION(0x20000, "raw_kanji", ROMREGION_ERASEFF)
2274
2275   ROM_REGION( 0x1000000, "cart_img", ROMREGION_ERASE00 )
2276   ROM_CART_LOAD("cart", 0x0000, 0xffffff, ROM_OPTIONAL | ROM_NOMIRROR)
22602277ROM_END
22612278
22622279ROM_START( x1turbo )
r8039r8040
22832300   ROM_LOAD("kanji2.rom", 0x08000, 0x8000, CRC(e710628a) SHA1(103bbe459dc8da27a9400aa45b385255c18fcc75) )
22842301   ROM_LOAD("kanji3.rom", 0x10000, 0x8000, CRC(8cae13ae) SHA1(273f3329c70b332f6a49a3a95e906bbfe3e9f0a1) )
22852302   ROM_LOAD("kanji1.rom", 0x18000, 0x8000, CRC(5874f70b) SHA1(dad7ada1b70c45f1e9db11db273ef7b385ef4f17) )
2303
2304   ROM_REGION( 0x1000000, "cart_img", ROMREGION_ERASE00 )
2305   ROM_CART_LOAD("cart", 0x0000, 0xffffff, ROM_OPTIONAL | ROM_NOMIRROR)
22862306ROM_END
22872307
22882308ROM_START( x1turbo40 )
r8039r8040
23092329   ROM_LOAD("kanji2.rom", 0x08000, 0x8000, CRC(e710628a) SHA1(103bbe459dc8da27a9400aa45b385255c18fcc75) )
23102330   ROM_LOAD("kanji3.rom", 0x10000, 0x8000, CRC(8cae13ae) SHA1(273f3329c70b332f6a49a3a95e906bbfe3e9f0a1) )
23112331   ROM_LOAD("kanji1.rom", 0x18000, 0x8000, CRC(5874f70b) SHA1(dad7ada1b70c45f1e9db11db273ef7b385ef4f17) )
2332
2333   ROM_REGION( 0x1000000, "cart_img", ROMREGION_ERASE00 )
2334   ROM_CART_LOAD("cart", 0x0000, 0xffffff, ROM_OPTIONAL | ROM_NOMIRROR)
23122335ROM_END
23132336
23142337

Previous 15994 Revisions Next


© 1998-2018 The MESS Team