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

sinclair/chloe.cpp: Chloe 280SE (Timex TS2068 successor)- New WORKING #12337

Merged
merged 8 commits into from
Jun 7, 2024

Conversation

holub
Copy link
Contributor

@holub holub commented May 3, 2024

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.

#include "spec128.h"

#include "machine/spi_sdcard.h"
#include "screen.h"
Copy link
Contributor

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.

Copy link
Contributor Author

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

@holub holub marked this pull request as draft May 5, 2024 00:19
@holub holub changed the title sinclair/chloe.cpp: Chloe 280SE - New NOT_WORKING sinclair/chloe.cpp: Chloe 280SE - New WORKING May 5, 2024
@holub holub marked this pull request as ready for review May 5, 2024 17:33
@holub
Copy link
Contributor Author

holub commented May 7, 2024

Sorry for going back and forth. Let's draft it again as I about to add more things to it.

@holub holub marked this pull request as draft May 7, 2024 14:51
@holub holub marked this pull request as ready for review May 10, 2024 16:30
@holub
Copy link
Contributor Author

holub commented May 10, 2024

Let's do it!

@holub holub changed the title sinclair/chloe.cpp: Chloe 280SE - New WORKING sinclair/chloe.cpp: Chloe 280SE (Timex TS2068 successor)- New WORKING May 11, 2024
@holub holub requested a review from rb6502 May 23, 2024 18:07
if (divmmc_rom_active)
{
if (!mapram_mode || conmem)
pg = 24;
Copy link
Contributor

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)
Copy link
Contributor

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)
Copy link
Contributor

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.

@@ -193,7 +215,8 @@ void chloe_state::port_1ffd_w(u8 data)
if (m_port_7ffd_data & 0x20)
Copy link
Contributor

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)
Copy link
Contributor

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)
Copy link
Contributor

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)
Copy link
Contributor

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))
Copy link
Contributor

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 )
Copy link
Contributor

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))
Copy link
Contributor

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();
Copy link
Contributor

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.

@rb6502
Copy link
Contributor

rb6502 commented May 25, 2024

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.

@holub
Copy link
Contributor Author

holub commented May 26, 2024

I hope all done now

@holub holub requested a review from rb6502 May 26, 2024 21:14
@holub
Copy link
Contributor Author

holub commented Jun 6, 2024

@rb6502 shall we?

@rb6502
Copy link
Contributor

rb6502 commented Jun 7, 2024

Sorry. Let's do this :-)

@rb6502 rb6502 merged commit dc96d36 into mamedev:master Jun 7, 2024
5 checks passed
@holub holub deleted the chloe branch June 8, 2024 00:54
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.

None yet

2 participants