Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding two new 8008 homebrew computers #13208

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

Conversation

jeng
Copy link

@jeng jeng commented Jan 10, 2025

The first driver is for the 8008-SBC written by Jim Loos.

The second one is for the 8008-Super written by Dr. Scott Baker.

I have uploaded the ROMS to https://github.com/jeng/homebrew-8008-mame-roms

A writeup and demos of the drivers are at Mame Master Blaster

Copy link
Member

@cuavas cuavas left a comment

Choose a reason for hiding this comment

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

Please rework the code to take advantage of MAME’s framework, e.g. the memory system.

Comment on lines 19936 to 19941
@source:homebrew/sbc8008.cpp
sbc8008 // Jim Loos - 8008-SBC

@source:homebrew/super8008.cpp
super8008 // Dr. Scott M. Baker - 8008-Super

Copy link
Member

Choose a reason for hiding this comment

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

Please keep this file sorted. “S” does not come after “Z”.

Comment on lines 314 to 337
<group ref="b1_leds">
<bounds x="0" y="345" width="10" height="47" />
</group>
<group ref="b2_leds">
<bounds x="7" y="345" width="10" height="47" />
</group>
<group ref="b3_leds">
<bounds x="14" y="345" width="10" height="47" />
</group>
<group ref="b4_leds">
<bounds x="21" y="345" width="10" height="47" />
</group>
<group ref="b5_leds">
<bounds x="28" y="345" width="10" height="47" />
</group>
<group ref="b6_leds">
<bounds x="35" y="345" width="10" height="47" />
</group>
<group ref="b7_leds">
<bounds x="42" y="345" width="10" height="47" />
</group>
<group ref="b8_leds">
<bounds x="49" y="345" width="10" height="47" />
</group>
Copy link
Member

Choose a reason for hiding this comment

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

You could use a <repeat> to make this more terse.

You should be able to use a <repeat> to generate the groups and label elements themselves to reduce copy/paste as well.

Comment on lines 52 to 75
<element name="led0" ref="orange_led">
<bounds x="32" y="2.5" width="5" height="5" />
</element>
<element name="led1" ref="orange_led">
<bounds x="37" y="2.5" width="5" height="5" />
</element>
<element name="led2" ref="orange_led">
<bounds x="42" y="2.5" width="5" height="5" />
</element>
<element name="led3" ref="orange_led">
<bounds x="47" y="2.5" width="5" height="5" />
</element>
<element name="led4" ref="orange_led">
<bounds x="52" y="2.5" width="5" height="5" />
</element>
<element name="led5" ref="orange_led">
<bounds x="57" y="2.5" width="5" height="5" />
</element>
<element name="led6" ref="orange_led">
<bounds x="62" y="2.5" width="5" height="5" />
</element>
<element name="led7" ref="orange_led">
<bounds x="67" y="2.5" width="5" height="5" />
</element>
Copy link
Member

Choose a reason for hiding this comment

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

You can use a <repeat> to place these LEDs.

Comment on lines 28 to 33
#include "cpu/i8008/i8008.h"
#include "machine/clock.h"
#include "machine/i8251.h"
#include "machine/ram.h"
#include "bus/rs232/rs232.h"
#include "bus/super8008/super8008.h"
Copy link
Member

Choose a reason for hiding this comment

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

Please keep these sorted so they’re easier to keep track of as the list grows.

Comment on lines 77 to 85
// This function sets up the machine configuration
void super8008(machine_config &config);

protected:
//TODO(jhe): Do we have another way to get the S0, S1 and S2 so we know when the PC has been halted?

// address maps for program memory and io memory
void super8008_mem(address_map &map);
void super8008_io(address_map &map);
Copy link
Member

Choose a reason for hiding this comment

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

Please add ATTR_COLD for cold lifecycle functions.

Comment on lines 117 to 120
void super8008_blaster_device::device_start()
{
m_leds.resolve();
}
Copy link
Member

Choose a reason for hiding this comment

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

Remember to save data members.

Comment on lines 192 to 193

RAM(config, m_ram).set_default_size("32K");
Copy link
Member

Choose a reason for hiding this comment

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

You shouldn’t be using ram_device for this – use a memory_share_creator or something.

Comment on lines 171 to 176
void super8008_blaster_device::blaster_mem(address_map &map)
{
map(0x0000, 0x3fff).rw(
FUNC(super8008_blaster_device::blaster_memory_read),
FUNC(super8008_blaster_device::blaster_memory_write));
}
Copy link
Member

Choose a reason for hiding this comment

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

Please use a memory_view to deal with swapping the RAM in and out rather than the trampoline functions. You can attach a callback to the jumper input so the view entry can be updated when it changes.

Comment on lines 135 to 137
virtual void device_start() override;
virtual void device_reset() override;
virtual void device_post_load() override;
Copy link
Member

Choose a reason for hiding this comment

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

Please use ATTR_COLD for cold lifecycle members.

Comment on lines 98 to 104
void super8008_bus_device::device_reset()
{
}

void super8008_bus_device::device_post_load()
{
}
Copy link
Member

Choose a reason for hiding this comment

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

You don’t need to override these if you aren’t doing anything special.

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