Skip to content

Commit

Permalink
rollingc: fix moonbase claiming "you are too strong"
Browse files Browse the repository at this point in the history
  • Loading branch information
happppp committed Apr 16, 2024
1 parent e370f54 commit 578b5db
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
9 changes: 5 additions & 4 deletions src/mame/midw8080/8080bw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ static INPUT_PORTS_START( sicv_base )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) // sicv has a DIP switch connected here
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) // tied high via 1k resistor on schematic
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) // tied high via 1k resistor on schematic
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) // tied high via 1k resistor on schematic (shard with IN1 bit 3)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) // tied high via 1k resistor on schematic (shared with IN1 bit 3)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) // tied high via 1k resistor on schematic
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) // not connected (floating) on schematic)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) // tied high via 1k resistor on schematic
Expand Down Expand Up @@ -1555,6 +1555,7 @@ static INPUT_PORTS_START( rollingc )
PORT_INCLUDE( sicv_base )

PORT_MODIFY("IN0")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x06, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(rollingc_state, game_select_r)

PORT_MODIFY("IN1")
Expand Down Expand Up @@ -4111,7 +4112,7 @@ void cane_state::cane(machine_config &config)
CANE_AUDIO(config, "soundboard");
}

void cane_state::cane_unknown_port0_w(u8 data)
void cane_state::cane_unknown_port0_w(uint8_t data)
{
logerror("Unmapped io memory write to 00 = 00 %u\n", data);
}
Expand Down Expand Up @@ -4140,13 +4141,13 @@ void cane_state::cane_unknown_port0_w(u8 data)
***********************************************************************************************************************************/

u8 orbite_state::orbite_scattered_colorram_r(address_space &space, offs_t offset, u8 mem_mask)
uint8_t orbite_state::orbite_scattered_colorram_r(address_space &space, offs_t offset, uint8_t mem_mask)
{
return m_scattered_colorram[(offset & 0x1f) | ((offset & 0x1f80) >> 2)];
}


void orbite_state::orbite_scattered_colorram_w(address_space &space, offs_t offset, u8 data, u8 mem_mask)
void orbite_state::orbite_scattered_colorram_w(address_space &space, offs_t offset, uint8_t data, uint8_t mem_mask)
{
m_scattered_colorram[(offset & 0x1f) | ((offset & 0x1f80) >> 2)] = data;
}
Expand Down
17 changes: 9 additions & 8 deletions src/mame/midw8080/8080bw.h
Original file line number Diff line number Diff line change
Expand Up @@ -437,9 +437,10 @@ class rollingc_state : public _8080bw_state // TODO: untangle the invadpt2 sound
class ozmawars_state : public _8080bw_state
{
public:
ozmawars_state(const machine_config &mconfig, device_type type, const char *tag)
: _8080bw_state(mconfig, type, tag)
{ }
ozmawars_state(const machine_config &mconfig, device_type type, const char *tag) :
_8080bw_state(mconfig, type, tag)
{
}

void ozmawars(machine_config &config);
void ozmawars_samples_audio(machine_config &config);
Expand All @@ -449,8 +450,8 @@ class ozmawars_state : public _8080bw_state
void ozmawars_port04_w(uint8_t data);
void ozmawars_port05_w(uint8_t data);
void ozmawars_io_map(address_map &map);
u8 m_port03 = 0;
u8 m_port05 = 0;
uint8_t m_port03 = 0;
uint8_t m_port05 = 0;
bool m_sound_enable = 0;
};

Expand Down Expand Up @@ -578,7 +579,7 @@ class cane_state : public mw8080bw_state
void cane_audio(machine_config &config);

protected:
void cane_unknown_port0_w(u8 data);
void cane_unknown_port0_w(uint8_t data);

private:
void cane_io_map(address_map &map);
Expand Down Expand Up @@ -606,8 +607,8 @@ class orbite_state : public invaders_clone_palette_state
protected:
virtual void machine_start() override;

u8 orbite_scattered_colorram_r(address_space &space, offs_t offset, u8 mem_mask = 0xff);
void orbite_scattered_colorram_w(address_space &space, offs_t offset, u8 data, u8 mem_mask = 0xff);
uint8_t orbite_scattered_colorram_r(address_space &space, offs_t offset, uint8_t mem_mask = 0xff);
void orbite_scattered_colorram_w(address_space &space, offs_t offset, uint8_t data, uint8_t mem_mask = 0xff);

private:
void orbite_io_map(address_map &map);
Expand Down

2 comments on commit 578b5db

@mamehaze
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

worth a comment saying why the port is changed, as it isn't obvious from just looking at the code

@happppp
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, comment added here: 32f6f83

Please sign in to comment.