k054539.cpp: Allow side effects, Add imperfect_features (#6996)

* k054539.cpp: Allow side effects, Add imperfect_features related to unverified/unemulated effects and some registers.
This commit is contained in:
cam900 2020-07-28 03:12:44 +09:00 committed by GitHub
parent 943fc34f39
commit 2b95c80567
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 3 deletions

View File

@ -483,9 +483,12 @@ u8 k054539_device::read(offs_t offset)
case 0x22d:
if(regs[0x22f] & 0x10) {
uint8_t res = (rom_addr == 0x80) ? ram[cur_ptr] : read_byte((0x20000*rom_addr)+cur_ptr);
cur_ptr++;
if(cur_ptr == cur_limit)
cur_ptr = 0;
if (!machine().side_effects_disabled())
{
cur_ptr++;
if(cur_ptr == cur_limit)
cur_ptr = 0;
}
return res;
} else
return 0;

View File

@ -20,6 +20,8 @@ class k054539_device : public device_t,
public device_rom_interface<24>
{
public:
static constexpr feature_type imperfect_features() { return feature::SOUND; } // effector and/or some registers aren't verified/emulated
// control flags, may be set at DRIVER_INIT().
enum {
RESET_FLAGS = 0,