Previous 199869 Revisions Next

r41446 Thursday 29th October, 2015 at 00:32:00 UTC by David Haywood
(nw)
[src/devices/bus/vcs]dpcplus.c dpcplus.h

trunk/src/devices/bus/vcs/dpcplus.c
r249957r249958
1818   Bankswitching uses addresses $FFF6-$FFFB
1919
2020   * ARM RAM mapped at $40000000 in this area
21   $0000-$0BFF: DPC+ driver (not accessible by 2600 itself)
22   $0C00-$1BFF: Bank 0 - ARM code starts here, but 6507 code can also be placed here aswell
21   $0000-$0BFF: DPC+ driver (not accessible by 2600 itself) (copied to $40000000 - $40000bff on startup by ARM)
22   $0C00-$1BFF: Bank 0 (each bank can map to 0x1000 - 0x1fff in 6507 space, like other carts)
2323   $1C00-$2BFF: Bank 1
2424   $2C00-$3BFF: Bank 2
2525   $3C00-$4BFF: Bank 3
2626   $4C00-$5BFF: Bank 4
27   $5C00-$6BFF: Bank 5 - 6507 code
28   * ARM RAM mapped at $40000C00 in this area
29   $6C00-$7BFF: Display Data (indirect access)
30   * ARM RAM mapped at $40001C00 in this area
31   $7C00-$7FFF: Synth Frequency Data (not accessible by 2600 itself)
27   $5C00-$6BFF: Bank 5 (default bank is bank 5)
28   $6C00-$7BFF: Display Data (indirect access) (copied to $40000C00 - $40001bff on startup by ARM)
29   $7C00-$7FFF: Synth Frequency Data (not accessible by 2600 itself) (copied to $40001C00 - $40001fff on startup by ARM)
3230
3331***************************************************************************/
3432
r249957r249958
6159
6260void a26_rom_dpcplus_device::device_reset()
6361{
64   m_base_bank = 0;
62   m_base_bank = 5;
6563}
6664
65
66READ8_MEMBER(a26_rom_dpcplus_device::read8_r)
67{
68   return m_rom[offset + (m_base_bank * 0x1000)];
69}
70
71
6772READ32_MEMBER(a26_rom_dpcplus_device::armrom_r)
6873{
69   UINT32 ret = (a26_rom_f8_device::read_rom(space, offset * 4 + 3) << 24) |
70                  (a26_rom_f8_device::read_rom(space, offset * 4 + 2) << 16) |
71               (a26_rom_f8_device::read_rom(space, offset * 4 + 1) << 8) |
72                (a26_rom_f8_device::read_rom(space, offset * 4 + 0) << 0);
74   UINT32 ret = (m_rom[offset * 4 + 3] << 24) |
75                  (m_rom[offset * 4 + 2] << 16) |
76               (m_rom[offset * 4 + 1] << 8) |
77                (m_rom[offset * 4 + 0] << 0);
7378   return ret;
7479}
7580
r249957r249958
7883
7984}
8085
86READ32_MEMBER(a26_rom_dpcplus_device::arm_E01FC088_r)
87{
88   return 0xffffffff;
89}
90
8191static ADDRESS_MAP_START( dpcplus_arm7_map, AS_PROGRAM, 32, a26_rom_dpcplus_device )
8292   // todo: implement all this correctly
8393   AM_RANGE(0x00000000, 0x00007fff) AM_READWRITE(armrom_r,armrom_w) // flash, 32k
8494   AM_RANGE(0x40000000, 0x40001fff) AM_RAM // sram, 8k
95
96   AM_RANGE(0xE01FC088, 0xE01FC08b) AM_READ(arm_E01FC088_r)
8597ADDRESS_MAP_END
8698
8799static MACHINE_CONFIG_FRAGMENT( a26_dpcplus )
r249957r249958
97109
98110READ8_MEMBER(a26_rom_dpcplus_device::read_rom)
99111{
100   return a26_rom_f8_device::read_rom(space, offset);
112   // banks start at 0xc00
113   return read8_r(space, offset+0xc00);
101114}
102115
103116WRITE8_MEMBER(a26_rom_dpcplus_device::write_bank)
104117{
105   a26_rom_f8_device::write_bank(space, offset, data);
118//   a26_rom_f8_device::write_bank(space, offset, data);
106119}
trunk/src/devices/bus/vcs/dpcplus.h
r249957r249958
2626
2727   DECLARE_READ32_MEMBER(armrom_r);
2828   DECLARE_WRITE32_MEMBER(armrom_w);
29   
30   DECLARE_READ8_MEMBER(read8_r);
2931
30
32   DECLARE_READ32_MEMBER(arm_E01FC088_r);
3133protected:
3234};
3335


Previous 199869 Revisions Next


© 1997-2024 The MAME Team