Skip to content

Conversation

flama12333
Copy link
Contributor

@flama12333 flama12333 commented Oct 2, 2025

Previous now closed #14252
Sorry for my mistake. instead of solving.

Dumped by my friend.
it is a 8051 roulette Board.
Currently shown error 02. Input was guessed after found ways to bypass the error.

Info and driver cpp in wip.

Layout currently not correctly. was from marywu

Some code are from marywu.cpp

Led controller are different than marywu.

If have anything to ask let me known.
Question:
which name choosen? only to prevent confusion.

@flama12333 flama12333 marked this pull request as ready for review October 3, 2025 00:01
@flama12333 flama12333 marked this pull request as draft October 3, 2025 00:01
@flama12333 flama12333 marked this pull request as ready for review October 3, 2025 00:08
@flama12333
Copy link
Contributor Author

flama12333 commented Oct 3, 2025

I was managed to hook up
currently now shown error 02 after startup.
see also #13002
has the same issues

Comment on lines 96 to 97

{ }
Copy link
Member

Choose a reason for hiding this comment

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

Pretty sure this spacing shouldn't be there by C++ standards.

Comment on lines 175 to 189



PORT_START("DSW1")
PORT_DIPUNKNOWN_DIPLOC(0x01, 0x01, "SW1:1")
PORT_DIPUNKNOWN_DIPLOC(0x02, 0x02, "SW1:2")
PORT_DIPUNKNOWN_DIPLOC(0x04, 0x04, "SW1:3")
PORT_DIPUNKNOWN_DIPLOC(0x08, 0x08, "SW1:4")
PORT_DIPUNKNOWN_DIPLOC(0x10, 0x10, "SW1:5")
PORT_DIPUNKNOWN_DIPLOC(0x20, 0x20, "SW1:6")
PORT_DIPUNKNOWN_DIPLOC(0x40, 0x40, "SW1:7")
PORT_DIPUNKNOWN_DIPLOC(0x80, 0x80, "SW1:8")


PORT_START("DSW2")
Copy link
Member

Choose a reason for hiding this comment

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

More inconsistent spacing/tabs.

PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CODE(KEYCODE_V)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CODE(KEYCODE_B)

PORT_START("Inputs4")
Copy link
Member

Choose a reason for hiding this comment

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

Conventionally input labels are in UPPERCASE.

Comment on lines +217 to +226
switch (m_selected_7seg_module & 0x07)
{
case 0:
case 1:
case 2:
case 3:
return m_inputs[m_selected_7seg_module & 0x07]->read();
default:
return 0x00;
}
Copy link
Member

Choose a reason for hiding this comment

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

What's the point of this switch-case? Is bit 2 just a selection between p1 and p2 sides?

Comment on lines 244 to 252
map(0x8000, 0x87ff).ram().share("nvram");
map(0xc000, 0xc001).w("opll", FUNC(ym2413_device::write));
map(0x9002, 0x9003).rw("ay1", FUNC(ay8910_device::data_r), FUNC(ay8910_device::address_data_w));
map(0xb000, 0xb001).rw("i8279", FUNC(i8279_device::read), FUNC(i8279_device::write));
map(0xb004, 0xb004).rw(m_oki, FUNC(okim6295_device::read), FUNC(okim6295_device::write));
map(0xb008, 0xb00a).rw("ppi1", FUNC(i8255_device::read), FUNC(i8255_device::write)); // ???
// map(0xb00b, 0xb00b).nopw(); // ?? Write = 80
// map(0xb00c, 0xb00c).nopw(); // Led
map(0xb00d, 0xb00f).rw("ppi2", FUNC(i8255_device::read), FUNC(i8255_device::write)); // ???
Copy link
Member

Choose a reason for hiding this comment

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

Again, conventionally we add a tab space in memory map lines.


ROM_REGION( 0x40000, "oki", 0 )
ROM_LOAD( "w27c02.bin", 0x00000, 0x40000, CRC(A8217121) SHA1(a35004f00632b552b587dfa12c1698abada5e300) ) // Voices Rom
ROM_END
Copy link
Member

Choose a reason for hiding this comment

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

This tab shouldn't be there.

Copy link
Member

Choose a reason for hiding this comment

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

i.e.:

ROM_START( romset )
    [content here]
ROM_END

Comment on lines 264 to 267
config.set_default_layout(layout_marywu);

/* basic machine hardware */
i8051_device &maincpu(I8051(config, "maincpu", XTAL(12'000'000)));
Copy link
Member

Choose a reason for hiding this comment

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

Conventionally the machine_config should have following order:

void config_state::config_name(machine_config &config)
{
    [CPU declarations]
    [I/O class devices]
    [video]
    [sound]
}

Put in another way, config.set_default_layout should go before sound, in no case as first declared thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants