diff options
author | Vas Crabb <vas@vastheman.com> | 2022-06-17 05:36:24 +1000 |
---|---|---|
committer | Vas Crabb <vas@vastheman.com> | 2022-06-17 05:36:24 +1000 |
commit | 94c22aaf785b5c5e678e2ae73487a0c1a6de23a3 (patch) | |
tree | d79534b736cbb4c837a8585d093e38eee59ad5a1 /src/mame/machine | |
parent | 662747fb22ded65bf3539a8e24bb80c64cbe6196 (diff) |
More scheduler optimisation, Visual Studio build fixes, and cleanup.
emu/schedule.cpp: Fixed a few more pessimising assumptions. Gains a few
percent in Ketsui and SNES SuperFX.
util/endianness.h: Added some more operations on endian-swizzlers.
Changed a few more drivers to use them.
sun2.cpp: Fixed uninitialised variable that could cause corrupt video.
Fixed some issues with Visual Studio project generation after the
changes to Windows resource creation.
Diffstat (limited to 'src/mame/machine')
-rw-r--r-- | src/mame/machine/gaelco2.cpp | 4 | ||||
-rw-r--r-- | src/mame/machine/kaneko_toybox.cpp | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/mame/machine/gaelco2.cpp b/src/mame/machine/gaelco2.cpp index 944af41b8e7..5d8c121a710 100644 --- a/src/mame/machine/gaelco2.cpp +++ b/src/mame/machine/gaelco2.cpp @@ -168,13 +168,13 @@ void gaelco2_state::init_wrally2() void gaelco2_state::shareram_w(offs_t offset, u8 data) { // why isn't there address map functionality for this? - reinterpret_cast<u8 *>(m_shareram.target())[BYTE_XOR_BE(offset)] = data; + util::big_endian_cast<u8>(m_shareram.target())[offset] = data; } u8 gaelco2_state::shareram_r(offs_t offset) { // why isn't there address map functionality for this? - return reinterpret_cast<u8 const *>(m_shareram.target())[BYTE_XOR_BE(offset)]; + return util::big_endian_cast<u8 const>(m_shareram.target())[offset]; } diff --git a/src/mame/machine/kaneko_toybox.cpp b/src/mame/machine/kaneko_toybox.cpp index ecc89d04bb3..a092545ac1e 100644 --- a/src/mame/machine/kaneko_toybox.cpp +++ b/src/mame/machine/kaneko_toybox.cpp @@ -417,9 +417,8 @@ void kaneko_toybox_device::decrypt_rom() void kaneko_toybox_device::handle_04_subcommand(uint8_t mcu_subcmd, uint16_t *mcu_ram) { - uint8_t* src = (uint8_t *)&m_mcudata[0x10000]; - uint8_t* dst = (uint8_t *)mcu_ram; - int offs = (mcu_subcmd & 0x3f) * 8; + uint8_t const *const src = &m_mcudata[0x10000]; + int const offs = (mcu_subcmd & 0x3f) * 8; //uint16_t unused = src[offs + 0] | (src[offs + 1] << 8); uint16_t romstart = src[offs + 2] | (src[offs + 3] << 8); @@ -429,9 +428,10 @@ void kaneko_toybox_device::handle_04_subcommand(uint8_t mcu_subcmd, uint16_t *mc //printf("romstart %04x length %04x\n", romstart, romlength); + auto const dst = util::little_endian_cast<uint8_t>(mcu_ram); for (int x = 0; x < romlength; x++) { - dst[BYTE_XOR_LE(ramdest + x)] = src[(romstart + x)]; + dst[ramdest + x] = src[romstart + x]; } } |