Previous 15994 Revisions Next

r997 Tuesday 18th September, 2007 at 12:35:31 UTC by Wilbert Pol
[PCE] Added support for Populous on-cart RAM.
[docs]messnew.txt
[src/mess/drivers]pce.c
[src/mess/machine]pce.c

src/mess/machine/pce.c
r996r997
1414
1515struct pce_struct pce;
1616
17static UINT8 *cartridge_ram;
18
1719/* joystick related data*/
1820
1921#define JOY_CLOCK   0x01
r996r997
2426
2527static WRITE8_HANDLER( pce_sf2_banking_w ) {
2628   memory_set_bankptr( 2, memory_region(REGION_USER1) + ( offset + 1 ) * 0x080000 );
29   memory_set_bankptr( 3, memory_region(REGION_USER1) + ( offset + 1 ) * 0x080000 + 0x8000 );
2730}
2831
32static WRITE8_HANDLER( pce_populous_ram_w ) {
33   cartridge_ram[ offset ] = data;
34}
35
2936DEVICE_LOAD(pce_cart)
3037{
3138   int size;
r996r997
110117
111118   memory_set_bankptr( 1, ROM );
112119   memory_set_bankptr( 2, ROM + 0x080000 );
113   memory_set_bankptr( 3, ROM + 0x100000 );
120   memory_set_bankptr( 3, ROM + 0x088000 );
121   memory_set_bankptr( 4, ROM + 0x100000 );
114122
115123   /* Check for Street fighter 2 */
116124   if ( size == PCE_ROM_MAXSIZE ) {
117125      memory_install_write8_handler( 0, ADDRESS_SPACE_PROGRAM, 0x01ff0, 0x01ff3, 0, 0, pce_sf2_banking_w );
118126   }
127
128   /* Check for Populous */
129   if ( ! memcmp( ROM + 0x1F26, "POPULOUS", 8 ) ) {
130      cartridge_ram = auto_malloc( 0x8000 );
131      memory_set_bankptr( 2, cartridge_ram );
132      memory_install_write8_handler( 0, ADDRESS_SPACE_PROGRAM, 0x080000, 0x087FFF, 0, 0, pce_populous_ram_w );
133   }
119134   return 0;
120135}
121136
src/mess/drivers/pce.c
r996r997
1818- Add 6 button joystick support
1919- Add 263 line mode
2020- Sprite DMA should use vdc VRAM functions
21
22Banking
23=======
24
25Normally banks 00-F6 are assigned to regular HuCard ROM space. There
26are a couple of special situations:
27
28Street Fighter II:
29  - address space banks 40-7F switchable by writing to 1FF0-1FF3
30    1FF0 - select rom banks 40-7F
31    1FF1 - select rom banks 80-BF
32    1FF2 - select rom banks C0-FF
33    1FF3 - select rom banks 100-13F
34
35Populous:
36  - address space banks 40-43 contains 32KB RAM
37
38CDRom units:
39  - address space banks 80-87 contains 64KB RAM
40
41Super System Card:
42  - address space banks 68-7F contains 192KB RAM
43
2144**********************************************************************/
2245
2346/**********************************************************************
r996r997
4063
4164ADDRESS_MAP_START( pce_mem , ADDRESS_SPACE_PROGRAM, 8)
4265   AM_RANGE( 0x000000, 0x07FFFF) AM_ROMBANK(1)
43   AM_RANGE( 0x080000, 0x0FFFFF) AM_ROMBANK(2)
44   AM_RANGE( 0x100000, 0x1EDFFF) AM_ROMBANK(3)
66   AM_RANGE( 0x080000, 0x087FFF) AM_ROMBANK(2)
67   AM_RANGE( 0x088000, 0x0FFFFF) AM_ROMBANK(3)
68   AM_RANGE( 0x100000, 0x1EDFFF) AM_ROMBANK(4)
4569   AM_RANGE( 0x1EE000, 0x1EFFFF) AM_RAM AM_BASE( &pce_nvram )
4670   AM_RANGE( 0x1F0000, 0x1F1FFF) AM_RAM AM_MIRROR(0x6000) AM_BASE( &pce_user_ram )
4771   AM_RANGE( 0x1FE000, 0x1FE3FF) AM_READWRITE( vdc_0_r, vdc_0_w )
r996r997
5983
6084ADDRESS_MAP_START( sgx_mem , ADDRESS_SPACE_PROGRAM, 8)
6185   AM_RANGE( 0x000000, 0x07FFFF) AM_ROMBANK(1)
62   AM_RANGE( 0x080000, 0x0FFFFF) AM_ROMBANK(2)
63   AM_RANGE( 0x100000, 0x1EDFFF) AM_ROMBANK(3)
86   AM_RANGE( 0x080000, 0x087FFF) AM_ROMBANK(2)
87   AM_RANGE( 0x088000, 0x0FFFFF) AM_ROMBANK(3)
88   AM_RANGE( 0x100000, 0x1EDFFF) AM_ROMBANK(4)
6489   AM_RANGE( 0x1EE000, 0x1EFFFF) AM_RAM AM_BASE( &pce_nvram )
6590   AM_RANGE( 0x1F0000, 0x1F7FFF) AM_RAM AM_BASE( &pce_user_ram )
6691   AM_RANGE( 0x1FE000, 0x1FE007) AM_READWRITE( vdc_0_r, vdc_0_w ) AM_MIRROR(0x03E0)
docs/messnew.txt
r996r997
88
99System Driver Changes:
1010----------------------
11(none)
11- [PCE] Added support for Populous on-cart RAM.  [Wilbert Pol]
1212
1313
1414

Previous 15994 Revisions Next


© 1998-2018 The MESS Team