src/mess/drivers/vc4000.c
| r6497 | r6498 | |
| 35 | 35 | Rom is mapped from $0000 - $15FF (only 5,5K ROM visible to the CPU) |
| 36 | 36 | Ram is mapped from $1800 - $1BFF |
| 37 | 37 | |
| 38 | | One other type is known for Radofin (compatible to VC4000, but not the Cartridge Pins) |
| 39 | | which consisted of 2K ROM and 2K RAM which are properly mapped as follows: |
| 38 | One other type is known for Radofin (rom compatible to VC4000, but not the Cartridge connector). |
| 39 | It consisted of a 2K ROM and 2K RAM which are most likely mapped as follows (needs to be confirmed): |
| 40 | 40 | 2K Rom mapped from $0000 - $07FF |
| 41 | 41 | 2K Ram mapped from $0800 - $0FFF |
| 42 | | The Cartridge is called Hobby Module and properly the Rom is the same as used in |
| 42 | The Cartridge is called Hobby Module and the Rom is probably the same as used in |
| 43 | 43 | elektor TV Game Computer which is a kind of developer machine for the VC4000. |
| 44 | 44 | |
| 45 | 45 | Go to the bottom to see the game list and emulation status of each. |
| r6497 | r6498 | |
| 90 | 90 | |
| 91 | 91 | |
| 92 | 92 | static ADDRESS_MAP_START( vc4000_mem , ADDRESS_SPACE_PROGRAM, 8) |
| 93 | ADDRESS_MAP_UNMAP_HIGH |
| 93 | 94 | ADDRESS_MAP_GLOBAL_MASK(0x1fff) |
| 94 | | AM_RANGE(0x0000, 0x0fff) AM_ROM |
| 95 | AM_RANGE(0x0000, 0x07ff) AM_ROM |
| 95 | 96 | AM_RANGE(0x1680, 0x16ff) AM_READWRITE( vc4000_key_r, vc4000_sound_ctl ) AM_MIRROR(0x0800) |
| 96 | 97 | AM_RANGE(0x1700, 0x17ff) AM_READWRITE( vc4000_video_r, vc4000_video_w ) AM_MIRROR(0x0800) |
| 97 | 98 | ADDRESS_MAP_END |
| r6497 | r6498 | |
| 187 | 188 | { |
| 188 | 189 | running_machine *machine = image->machine; |
| 189 | 190 | int size = image_length(image); |
| 191 | const address_space *memspace = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM); |
| 190 | 192 | |
| 191 | 193 | if (size > 0x1600) |
| 192 | 194 | size = 0x1600; |
| 193 | 195 | |
| 194 | 196 | if (size > 0x1000) /* 6k rom + 1k ram - Chess2 only */ |
| 195 | 197 | { |
| 196 | | memory_install_read8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x1000, 0x15ff, 0, 0, SMH_BANK(1)); /* extra rom */ |
| 198 | memory_install_read8_handler(memspace, 0x0800, 0x15ff, 0, 0, SMH_BANK(1)); /* extra rom */ |
| 197 | 199 | memory_set_bankptr(machine, 1, memory_region(machine, "maincpu") + 0x1000); |
| 198 | 200 | |
| 199 | | memory_install_readwrite8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x1800, 0x1bff, 0, 0, SMH_BANK(3), SMH_BANK(4)); /* ram */ |
| 200 | | memory_set_bankptr(machine, 3, memory_region(machine, "maincpu") + 0x1800); |
| 201 | | memory_set_bankptr(machine, 4, memory_region(machine, "maincpu") + 0x1800); |
| 201 | memory_install_readwrite8_handler(memspace, 0x1800, 0x1bff, 0, 0, SMH_BANK(2), SMH_BANK(2)); /* ram */ |
| 202 | memory_set_bankptr(machine, 2, memory_region(machine, "maincpu") + 0x1800); |
| 202 | 203 | } |
| 203 | 204 | else |
| 204 | 205 | if (size > 0x0800) /* some 4k roms have 1k of mirrored ram */ |
| 205 | 206 | { |
| 206 | | memory_install_readwrite8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x1000, 0x15ff, 0, 0x800, SMH_BANK(1), SMH_BANK(2)); /* ram */ |
| 207 | | memory_set_bankptr(machine, 1, memory_region(machine, "maincpu") + 0x1000); |
| 207 | memory_install_read8_handler(memspace, 0x0800, 0x0fff, 0, 0, SMH_BANK(1)); /* extra rom */ |
| 208 | memory_set_bankptr(machine, 1, memory_region(machine, "maincpu") + 0x0800); |
| 209 | |
| 210 | memory_install_readwrite8_handler(memspace, 0x1000, 0x15ff, 0, 0x800, SMH_BANK(2), SMH_BANK(2)); /* ram */ |
| 208 | 211 | memory_set_bankptr(machine, 2, memory_region(machine, "maincpu") + 0x1000); |
| 209 | 212 | } |
| 213 | else |
| 214 | if (size == 0x0800) /* 2k roms + 2k ram - Hobby Module(Radofin) and elektor TVGC*/ |
| 215 | { |
| 216 | memory_install_readwrite8_handler(memspace, 0x0800, 0x0fff, 0, 0, SMH_BANK(1), SMH_BANK(1)); /* ram */ |
| 217 | memory_set_bankptr(machine, 1, memory_region(machine, "maincpu") + 0x0800); |
| 218 | } |
| 210 | 219 | |
| 211 | 220 | if (size > 0) |
| 212 | 221 | { |