-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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.
src/mame/mame.lst
Outdated
@source:homebrew/sbc8008.cpp | ||
sbc8008 // Jim Loos - 8008-SBC | ||
|
||
@source:homebrew/super8008.cpp | ||
super8008 // Dr. Scott M. Baker - 8008-Super | ||
|
There was a problem hiding this comment.
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”.
src/mame/layout/super8008.lay
Outdated
<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> |
There was a problem hiding this comment.
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.
src/mame/layout/sbc8008.lay
Outdated
<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> |
There was a problem hiding this comment.
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.
src/mame/homebrew/super8008.cpp
Outdated
#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" |
There was a problem hiding this comment.
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.
src/mame/homebrew/super8008.cpp
Outdated
// 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); |
There was a problem hiding this comment.
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.
void super8008_blaster_device::device_start() | ||
{ | ||
m_leds.resolve(); | ||
} |
There was a problem hiding this comment.
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.
|
||
RAM(config, m_ram).set_default_size("32K"); |
There was a problem hiding this comment.
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.
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)); | ||
} |
There was a problem hiding this comment.
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.
virtual void device_start() override; | ||
virtual void device_reset() override; | ||
virtual void device_post_load() override; |
There was a problem hiding this comment.
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.
void super8008_bus_device::device_reset() | ||
{ | ||
} | ||
|
||
void super8008_bus_device::device_post_load() | ||
{ | ||
} |
There was a problem hiding this comment.
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.
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