-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
sinclair/chloe.cpp: Chloe 280SE (Timex TS2068 successor)- New WORKING #12337
Conversation
src/mame/sinclair/chloe.cpp
Outdated
#include "spec128.h" | ||
|
||
#include "machine/spi_sdcard.h" | ||
#include "screen.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.
Group includes with a directory prefix together, so machine/ and sound/ then screen and speaker. Other than that this looks clean.
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.
Let me finish something more than that and we can potentially change it to WORKING
Sorry for going back and forth. Let's draft it again as I about to add more things to it. |
Let's do it! |
src/mame/sinclair/chloe.cpp
Outdated
if (divmmc_rom_active) | ||
{ | ||
if (!mapram_mode || conmem) | ||
pg = 24; |
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 rest of this file looks to be in Allman brace style, so this if should also have braces.
pg = 32 + (divmmc_sram_page & 0x0f); | ||
if (!mapram_mode || conmem) | ||
{ | ||
if (!divmmc_sram_page_is_valid) |
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.
Here again, needs braces.
} | ||
else | ||
{ | ||
if ((mapram_mode && (divmmc_sram_page == 3)) || !divmmc_sram_page_is_valid) |
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.
And here with the braces.
src/mame/sinclair/chloe.cpp
Outdated
@@ -193,7 +215,8 @@ void chloe_state::port_1ffd_w(u8 data) | |||
if (m_port_7ffd_data & 0x20) |
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.
Also here for braces.
|
||
void chloe_state::port_e3_w(u8 data) | ||
{ | ||
if (m_divmmc_ctrl & 0x40) |
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.
Here too for braces.
@@ -242,6 +243,14 @@ void chloe_state::port_e3_w(u8 data) | |||
update_memory(); | |||
} | |||
|
|||
void chloe_state::ay_address_w(u8 data) | |||
{ | |||
if ((data & 0xfe) == 0xfe) |
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.
As mentioned in other comments, add braces here for consistency.
{ | ||
u16 line_data = m_io_line[i]->read(); | ||
shifts &= line_data; | ||
if ((oi & 1) == 0) |
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.
More missing braces.
shifts >>= 8; | ||
} | ||
|
||
if (((offset & 0x0100) == 0) && BIT(~shifts, 6)) |
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.
Missing braces here and the next one.
data ^= 0x40; | ||
|
||
/* cassette input from wav */ | ||
if (m_cassette->input() > 0.0038 ) |
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.
Missing braces.
@@ -417,6 +419,12 @@ void chloe_state::raster_irq_adjust() | |||
m_irq_raster_on_timer->reset(); | |||
} | |||
|
|||
INPUT_CHANGED_MEMBER(chloe_state::on_divmmc_nmi) | |||
{ | |||
if ((newval & 1) && (~m_io_line[0]->read() & 0x8000)) |
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.
Missing braces.
m_irq_raster_on_timer->adjust(m_screen->time_until_pos((SCR_256x192.top() + line) % m_screen->height())); | ||
} | ||
else | ||
m_irq_raster_on_timer->reset(); |
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.
This else clause should have braces.
Ok. A little cleanup and I think you're good. I'd do it myself and save you the trouble, but editing PRs on other people's branches is a little beyond my Github skills at the moment. |
I hope all done now |
@rb6502 shall we? |
Sorry. Let's do this :-) |
Credits: Andrew Owen
Chloe 280SE
Some aspect can be improved in the future.
ULA is generalization based on implementation in The Next branch - when any of it merged, I'll update the other one.