Skip to content

Commit 1d803e7

Browse files
authored
Video 512k bank is external to the GIME. It can be changed at anytime. (#12549)
1 parent bca1714 commit 1d803e7

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/mame/trs/gime.cpp

+6-3
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@
7979
8080
POP*STAR PILOT: Timer is synchronized with scanlines.
8181
82+
Cloud Kingdoms: 512K bank switch on scanline.
83+
8284
**********************************************************************/
8385

8486

@@ -1217,8 +1219,7 @@ inline offs_t gime_device::get_video_base()
12171219
}
12181220

12191221
result += ((offs_t) (m_gime_registers[0x0E] & ff9e_mask) * 0x00008)
1220-
| ((offs_t) (m_gime_registers[0x0D] & ff9d_mask) * 0x00800)
1221-
| ((offs_t) (m_gime_registers[0x0B] & 0x0F) * 0x80000);
1222+
| ((offs_t) (m_gime_registers[0x0D] & ff9d_mask) * 0x00800);
12221223
return result;
12231224
}
12241225

@@ -1409,6 +1410,8 @@ template<uint8_t xres, gime_device::get_data_func get_data, bool record_mode>
14091410
inline uint32_t gime_device::record_scanline_res(int scanline)
14101411
{
14111412
int column;
1413+
/* capture 512K memory bank per scan line */
1414+
uint32_t bank_512k = (m_gime_registers[0x0B] & 0x0F) * 0x80000;
14121415
uint32_t base_offset = m_legacy_video ? 0 : (m_gime_registers[0x0F] & 0x7F) * 2;
14131416
uint32_t offset = 0;
14141417

@@ -1417,7 +1420,7 @@ inline uint32_t gime_device::record_scanline_res(int scanline)
14171420
{
14181421
/* input data */
14191422
uint8_t data, mode;
1420-
offset += ((*this).*(get_data))(m_video_position + ((base_offset + offset) & 0xFF), &data, &mode);
1423+
offset += ((*this).*(get_data))((m_video_position + ((base_offset + offset) & 0xFF)) | bank_512k, &data, &mode);
14211424

14221425
/* and record the pertinent values */
14231426
if (record_mode)

0 commit comments

Comments
 (0)