-
Notifications
You must be signed in to change notification settings - Fork 2.2k
H8 improvements: H8/3437, I2C master and Sun Fire V120 stub #13016
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
Draft
lkundrak
wants to merge
4
commits into
mamedev:master
Choose a base branch
from
lkundrak:lr/lomlite-for-upstream
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.
Draft
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,57 @@ | ||
// license:BSD-3-Clause | ||
// copyright-holders:Olivier Galibert | ||
// copyright-holders:Lubomir Rintel | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Multiple copyright-holders should be comma-separated. |
||
/*************************************************************************** | ||
|
||
h83437.cpp | ||
|
||
H8-3437 family emulation | ||
|
||
***************************************************************************/ | ||
|
||
#include "emu.h" | ||
#include "h83437.h" | ||
|
||
DEFINE_DEVICE_TYPE(H83434, h83434_device, "h83434", "Hitachi H8/3434") | ||
DEFINE_DEVICE_TYPE(H83436, h83436_device, "h83436", "Hitachi H8/3436") | ||
DEFINE_DEVICE_TYPE(H83437, h83437_device, "h83437", "Hitachi H8/3437") | ||
|
||
|
||
h83437_device::h83437_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u32 start) : | ||
h83337_device(mconfig, type, tag, owner, clock, address_map_constructor(FUNC(h83437_device::map), this), start), | ||
m_porta(*this, "porta"), | ||
m_portb(*this, "portb") | ||
{ | ||
} | ||
|
||
h83437_device::h83437_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : | ||
h83437_device(mconfig, H83437, tag, owner, clock, 0xf780) | ||
{ | ||
} | ||
|
||
h83434_device::h83434_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : | ||
h83437_device(mconfig, H83434, tag, owner, clock, 0xfb80) | ||
{ | ||
} | ||
|
||
h83436_device::h83436_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : | ||
h83437_device(mconfig, H83436, tag, owner, clock, 0xf780) | ||
{ | ||
} | ||
|
||
void h83437_device::map(address_map &map) | ||
{ | ||
h83337_device::map(map); | ||
map(0xffaa, 0xffaa).rw(m_porta, FUNC(h8_port_device::dr_r), FUNC(h8_port_device::dr_w)); | ||
map(0xffab, 0xffab).rw(m_porta, FUNC(h8_port_device::port_r), FUNC(h8_port_device::ddr_w)); | ||
map(0xffbc, 0xffbc).rw(m_portb, FUNC(h8_port_device::dr_r), FUNC(h8_port_device::dr_w)); | ||
map(0xffbd, 0xffbd).r(m_portb, FUNC(h8_port_device::port_r)); | ||
map(0xffbe, 0xffbe).w(m_portb, FUNC(h8_port_device::ddr_w)); | ||
} | ||
|
||
void h83437_device::device_add_mconfig(machine_config &config) | ||
{ | ||
h83337_device::device_add_mconfig(config); | ||
H8_PORT(config, m_porta, *this, h8_device::PORT_A, 0x00, 0x00); | ||
H8_PORT(config, m_portb, *this, h8_device::PORT_B, 0x00, 0x00); | ||
} |
This file contains hidden or 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,60 @@ | ||
// license:BSD-3-Clause | ||
// copyright-holders:Olivier Galibert | ||
// copyright-holders:Lubomir Rintel | ||
/*************************************************************************** | ||
|
||
h83437.h | ||
|
||
H8-3437 family emulation | ||
|
||
H8-300-based mcus. | ||
|
||
Variant ROM RAM | ||
H8/3434 32K 1K | ||
H8/3436 48K 2K | ||
H8/3437 60K 2K | ||
|
||
***************************************************************************/ | ||
|
||
#ifndef MAME_CPU_H8_H83437_H | ||
#define MAME_CPU_H8_H83437_H | ||
|
||
#pragma once | ||
|
||
#include "h83337.h" | ||
#include "h8_port.h" | ||
|
||
class h83437_device : public h83337_device { | ||
public: | ||
h83437_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); | ||
|
||
auto read_porta() { return m_read_port [PORT_A].bind(); } | ||
auto write_porta() { return m_write_port[PORT_A].bind(); } | ||
auto read_portb() { return m_read_port [PORT_B].bind(); } | ||
auto write_portb() { return m_write_port[PORT_B].bind(); } | ||
|
||
protected: | ||
h83437_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u32 start); | ||
|
||
required_device<h8_port_device> m_porta; | ||
required_device<h8_port_device> m_portb; | ||
|
||
virtual void device_add_mconfig(machine_config &config) override ATTR_COLD; | ||
void map(address_map &map) ATTR_COLD; | ||
}; | ||
|
||
class h83434_device : public h83437_device { | ||
public: | ||
h83434_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); | ||
}; | ||
|
||
class h83436_device : public h83437_device { | ||
public: | ||
h83436_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); | ||
}; | ||
|
||
DECLARE_DEVICE_TYPE(H83434, h83434_device) | ||
DECLARE_DEVICE_TYPE(H83436, h83436_device) | ||
DECLARE_DEVICE_TYPE(H83437, h83437_device) | ||
|
||
#endif // MAME_CPU_H8_H83437_H |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
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.
The H83337 here should be "type". That breaks mame -valid.