-
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
src/devices/bus/centronics/epson_fx80.cpp : add skeleton for epson fx-80 #13429
base: master
Are you sure you want to change the base?
Conversation
ROM_START( epson_fx80 ) | ||
ROM_REGION(0x4000, "maincpu", 0) // 16K rom for upd7810 FX-80 | ||
// this is from an fx80+ (found with a M20214GA which according to the tech manual goes with an fx80+) | ||
ROM_LOAD("epson_8426k9_m1206ba029_read_as_27c128.bin", 0x0000, 0x4000, CRC(ff5c2b1e) SHA1(e1e38c3e4864e60f701939e23331360b76603a24)) | ||
|
||
ROM_REGION(0x800, "slavecpu", 0) // 2K rom for 8042 | ||
ROM_LOAD("epson_fx_c42040kb_8042ah.bin", 0x0000, 0x800, CRC(3e9d08c1) SHA1(d5074f60497cc75d40996e6cef63231d3a3697f1)) | ||
|
||
ROM_REGION(0x2000, "dots_4a", 0) // 2k rom for dotsperfect upgrade kit for FX-80/JX-80 | ||
ROM_LOAD("dotsperfect_4a_417_as_2764.bin", 0x0000, 0x2000, CRC(4ab92737) SHA1(31ea93cb8aee8622f160d0ac9d3341e6434687cc)) | ||
|
||
ROM_REGION(0x4000, "dots_5a", 0) // 4k rom for dotsperfect upgrade kit for FX-80/JX-80 | ||
ROM_LOAD("dotsperfect_5a_417_as_27128.bin", 0x0000, 0x4000, CRC(97bba4c8) SHA1(16703dbbc80d2ef78e29421817cdee97af53e0a5)) | ||
|
||
ROM_REGION(0x4000, "jx80", 0) // JX-80 rom | ||
ROM_LOAD("jx80_a4_fs5_27128.bin", 0x0000, 0x4000, CRC(2925a47b) SHA1(1864d3561491d7dca78ac2cd13a023460f551184)) | ||
ROM_END |
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.
Why have you go the ROMs mixed up like this? The FX-80 shouldn’t be loading the JX-80 ROM, and vice versa.
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.
ok, I just thought they were extremely similar (jx-80 is just fx-80 with an extra board to handle the ribbon + extra ram).
I have separated the jx80, and removed the dots perfect upgrade kit roms in the interest of simplicity.
// constructor to pass through the device type to device_t | ||
epson_fx80_device::epson_fx80_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : | ||
device_t(mconfig, type, tag, owner, clock), | ||
device_centronics_peripheral_interface(mconfig, *this), | ||
m_maincpu(*this, "maincpu"), | ||
m_slavecpu(*this, "slavecpu") | ||
{ | ||
} | ||
|
||
// constructor that pass device type | ||
epson_jx80_device::epson_jx80_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) | ||
: epson_fx80_device(mconfig, EPSON_JX80, tag, owner, clock) | ||
{ } |
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 pick a style for initialiser lists (delimiters at start or delimiters at end) and stick with it throughout the source file.
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.
ok, understood.
uint8_t epson_fx80_device::slave_r(offs_t offset) | ||
{ | ||
u8 const data = m_slavecpu->upi41_master_r(offset); | ||
return data; | ||
} |
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.
Is this trampoline actually necessary? Can you not use upi41_master_r
directly?
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.
Sorry, I do that to insert printfs. Returning upi41_master_r directly.
if (offset == 0) | ||
machine().scheduler().synchronize( | ||
timer_expired_delegate(FUNC(epson_fx80_device::slave_write_data_sync), this), unsigned(data)); | ||
else if (offset == 1) | ||
machine().scheduler().synchronize( | ||
timer_expired_delegate(FUNC(epson_fx80_device::slave_write_command_sync), this), unsigned(data)); |
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 pack the offset and data into the parameter – you have enough space.
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.
ok, packing the offset and data, I hope I've done it correctly.
uint8_t epson_fx80_device::slave_t0_r() | ||
{ | ||
return home_sensor(); | ||
} |
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.
Why the trampoline? Why not just attach the home_sensor
placeholder function directly?
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.
ok, done.
uint8_t epson_fx80_device::slave_t1_r() | ||
{ | ||
return pts_r(); // print timing sensor | ||
} |
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.
Same here – this seems to be a trampoline that just serves to make it more time-consuming to grok the code.
Skeleton for Epson FX-80 and Epson JX-80