-
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
Open
jeng
wants to merge
5
commits into
mamedev:master
Choose a base branch
from
jeng:homebrew8008
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+2,001
−1
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
7368ad2
Initial check in of the super8008 and sbc8008
jeng a0dcc95
Added range checks and fixed rom checksums
jeng f26eac3
Added define for the rom size and range check
jeng 0250a75
Merge remote-tracking branch 'origin/master' into homebrew8008
jeng d8fe7f4
I fixed a type error gcc on windows found
jeng File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,196 @@ | ||
// license:BSD-3-Clause | ||
// copyright-holders:Jeremy English | ||
/********************************************************************** | ||
|
||
8008-Super Bus Device aka ThunderDome | ||
|
||
Scott's 8008 Supercomputer a.k.a. Master Blaster | ||
by Dr. Scott M. Baker | ||
|
||
**********************************************************************/ | ||
|
||
#include "emu.h" | ||
#include "super8008.h" | ||
|
||
|
||
//************************************************************************** | ||
// DEVICE DEFINITIONS | ||
//************************************************************************** | ||
|
||
DEFINE_DEVICE_TYPE(SUPER8008_BUS, super8008_bus_device, "super8008_bus", "super8008 bus") | ||
DEFINE_DEVICE_TYPE(SUPER8008_SLOT, super8008_slot_device, "super8008_slot", "super8008 slot") | ||
|
||
|
||
|
||
//************************************************************************** | ||
// LIVE DEVICE | ||
//************************************************************************** | ||
|
||
//------------------------------------------------- | ||
// device_super8008_card_interface - constructor | ||
//------------------------------------------------- | ||
|
||
device_super8008_card_interface::device_super8008_card_interface(const machine_config &mconfig, device_t &device) : | ||
device_interface(device, "super8008bus"), | ||
m_bus(nullptr) | ||
{ | ||
} | ||
|
||
void device_super8008_card_interface::interface_pre_start() | ||
{ | ||
if (!m_bus) | ||
throw device_missing_dependencies(); | ||
} | ||
|
||
|
||
//------------------------------------------------- | ||
// super8008_slot_device - constructor | ||
//------------------------------------------------- | ||
super8008_slot_device::super8008_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : | ||
device_t(mconfig, SUPER8008_SLOT, tag, owner, clock), | ||
device_single_card_slot_interface<device_super8008_card_interface>(mconfig, *this), | ||
m_bus(*this, DEVICE_SELF_OWNER) | ||
{ | ||
} | ||
|
||
|
||
//------------------------------------------------- | ||
// device_start - device-specific startup | ||
//------------------------------------------------- | ||
|
||
void super8008_slot_device::device_start() | ||
{ | ||
device_super8008_card_interface *const dev = get_card_device(); | ||
if (dev) | ||
m_bus->add_card(*dev); | ||
|
||
} | ||
|
||
|
||
//------------------------------------------------- | ||
// super8008_bus_device - constructor | ||
//------------------------------------------------- | ||
|
||
super8008_bus_device::super8008_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : | ||
device_t(mconfig, SUPER8008_BUS, tag, owner, clock) | ||
{ | ||
m_ext_take = 0; | ||
} | ||
|
||
super8008_bus_device::~super8008_bus_device() | ||
{ | ||
} | ||
|
||
|
||
//------------------------------------------------- | ||
// device_start - device-specific startup | ||
//------------------------------------------------- | ||
|
||
void super8008_bus_device::device_start() | ||
{ | ||
} | ||
|
||
|
||
//------------------------------------------------- | ||
// device_reset - device-specific reset | ||
//------------------------------------------------- | ||
|
||
void super8008_bus_device::device_reset() | ||
{ | ||
} | ||
|
||
void super8008_bus_device::device_post_load() | ||
{ | ||
} | ||
|
||
//------------------------------------------------- | ||
// add_card - add card | ||
//------------------------------------------------- | ||
|
||
void super8008_bus_device::add_card(device_super8008_card_interface &card) | ||
{ | ||
card.m_bus = this; | ||
m_device_list.emplace_back(card); | ||
} | ||
|
||
void super8008_bus_device::ext_write(offs_t offset, uint8_t data) | ||
{ | ||
//ext_cs is pulled high through a 10k resistor and is active low | ||
if (m_ext_cs) | ||
{ | ||
return; | ||
} | ||
|
||
for (device_super8008_card_interface &entry : m_device_list) | ||
{ | ||
entry.ext_write(offset, data); | ||
} | ||
} | ||
|
||
uint8_t super8008_bus_device::ext_read(offs_t offset) | ||
{ | ||
uint8_t data = 0; | ||
|
||
if (m_ext_cs) | ||
{ | ||
return data; | ||
} | ||
|
||
for (device_super8008_card_interface &entry : m_device_list) | ||
{ | ||
data |= entry.ext_read(offset); | ||
} | ||
|
||
return data; | ||
} | ||
|
||
void super8008_bus_device::ext_take(int state) | ||
{ | ||
for (device_super8008_card_interface &entry : m_device_list) | ||
{ | ||
entry.ext_take(state); | ||
} | ||
m_ext_take = state; | ||
} | ||
|
||
void super8008_bus_device::ext_int() | ||
{ | ||
for (device_super8008_card_interface &entry : m_device_list) | ||
{ | ||
entry.ext_int(); | ||
} | ||
} | ||
|
||
void super8008_bus_device::ext_reset() | ||
{ | ||
for (device_super8008_card_interface &entry : m_device_list) | ||
{ | ||
entry.ext_reset(); | ||
} | ||
} | ||
|
||
void super8008_bus_device::ext_req() | ||
{ | ||
for (device_super8008_card_interface &entry : m_device_list) | ||
{ | ||
entry.ext_req(); | ||
} | ||
} | ||
|
||
uint8_t super8008_bus_device::ext_run() | ||
{ | ||
uint8_t run_status = 0; | ||
for (device_super8008_card_interface &entry : m_device_list) | ||
{ | ||
run_status |= entry.ext_run(); | ||
} | ||
return run_status; | ||
} | ||
|
||
|
||
//Cards | ||
#include "super8008_blaster.h" | ||
void super8008_bus_devices(device_slot_interface &device) | ||
{ | ||
device.option_add("super8008_blaster", SUPER8008_BLASTER); | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.