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

H8 improvements: H8/3437, I2C master and Sun Fire V120 stub #13016

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

Conversation

lkundrak
Copy link
Contributor

@lkundrak lkundrak commented Nov 25, 2024

Hi,

I found MAME and its H8 emulation very useful in my effort to understand management controller on mid 2000's Sun Fire V120 server. I'm wondering if anything I've done is useful for MAME:

Here's what I got:

  • h8: add H8/3437 emulation
  • thinkpad600: replace H8/3337 with H8/3437
  • h83337: add I2C controller implementation
    These three are probably useful for the Thinkpad 600.
  • sun/v120: add stub of Sun Fire V120 server
    Not sure if useful. Very minimal skeleton, since I've only been interested in the management microcomputer.

The I2C implementation has also been tested with a skeleton of a fan monitor chip using the i2chle interface, but that is certainly not something that's ready: https://github.com/lkundrak/mame/commits/lr/lomlite-dev/

This chip is used as a management controller on some Sun Servers
(Fire V120, Netra 120) and IBM Laptops (ThinkPad 600) and perhaps
elsewhere.

It's very much like a 3337, except it got two extra GPIO ports.
Only master side implemented. Tested against i2cmem and i2chle.

Shares register space with the serial port, with a bit that
arbitrates between the two.
Just the management microcomputer (Lights-Out Management) with its
configuration ROM for now. No main processor.
@lkundrak
Copy link
Contributor Author

image

m_ram_start(start)
{
}

h83337_device::h83337_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u32 start) :
h83337_device(mconfig, H83337, tag, owner, clock, address_map_constructor(FUNC(h83337_device::map), this), 0xf780)
Copy link
Member

@galibert galibert Nov 25, 2024

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.

m_icdr = data;
}

u8 h8_i2c_device::icdr_r()
Copy link
Member

Choose a reason for hiding this comment

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

That method is iffy. I know it's going to work, but it pretends transmission is instantaneous which is very untrue. We can use it as a starting point, but it should respect the real timings.

@@ -0,0 +1,57 @@
// license:BSD-3-Clause
// copyright-holders:Olivier Galibert
// copyright-holders:Lubomir Rintel
Copy link
Member

Choose a reason for hiding this comment

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

Multiple copyright-holders should be comma-separated.

@@ -0,0 +1,159 @@
#include "emu.h"
Copy link
Member

Choose a reason for hiding this comment

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

This file is missing the license and copyright-holders headers. You should also put some basic information about the driver at the top.


namespace {

class v120_state : public driver_device
Copy link
Member

Choose a reason for hiding this comment

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

v120 is relatively generic - maybe it would be better as sunv120?

m_ttya->set_option_device_input_defaults("terminal", DEVICE_INPUT_DEFAULTS_NAME(terminal));

// Debug chatter
m_lom->scl_cb().set([this](int state) { logerror("scl_write %d\n", state); });
Copy link
Member

Choose a reason for hiding this comment

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

The usual convention is to group related device functions. In this case everything handling m_lom might be better put above where the CPU is configured.

* ...
* lom> rw f77e
*
* The configuation EEPROM describes which fans, supplies, etc. are
Copy link
Member

Choose a reason for hiding this comment

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

Typo here.

} // anonymous namespace

// YEAR, NAME, PARENT, COMPAT, MACHINE, INPUT, CLASS, INIT, COMPANY, FULLNAME, FLAGS
COMP( 1996, v120, 0, 0, v120, 0, v120_state, empty_init, "Sun Microsystems", "v120", MACHINE_IS_SKELETON )
Copy link
Member

Choose a reason for hiding this comment

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

The fullname would be Fire V120 or Fire/Netra V120 I suppose?

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.

3 participants