Skip to content

SH-2E CPU implementation#104

Open
MatusJurcak wants to merge 51 commits intod-iii-s:masterfrom
MatusJurcak:master
Open

SH-2E CPU implementation#104
MatusJurcak wants to merge 51 commits intod-iii-s:masterfrom
MatusJurcak:master

Conversation

@MatusJurcak
Copy link
Copy Markdown
Contributor

@MatusJurcak MatusJurcak commented Mar 14, 2026

This pull request adds support for the SH-2E CPU to MSIM.

Main changes include:

  • Implementation of the SH-2E CPU
  • Addition of a new INTC device required for the SH-2E implementation
  • Updates to byte and word physical memory write handling
  • Option for the printer device to operate in big-endian mode
  • Tests covering all SH-2E instructions and exception handling
  • Clang format changes
  • Updated documentation for the CPU, INTC and printer

lbulej and others added 30 commits February 16, 2026 22:04
The array goes into BSS and will be zeroed anyway.
No need to worry about updating DEVICE_TYPE_COUNT when adding new
devices.
…g, add checks for alignment and add basic accounting
This commit makes the INTC as its own independent device and also changes the SH-2E CPU step behaviour.
Now the CPU step mimicks one step in the CPU state automaton instead of executing one instruction per step.
Added reference between SH-2E cpu and interrupt controller.
Changed the resets behaviour to be similiar to interrupt sources.
Also added some example configuration to the msim.conf file.
@vhotspur
Copy link
Copy Markdown
Member

Hello, I would leave the technical review to @lbulej but I have two (formal) objections.

There is no documentation update in doc/ describing the new CPU and, probably more importantly, the interrupt controller.

Also, it would be really nice if the whole source code was formatted in the same style. I think that reformatting everything is an option too but I do not see any really strong reason for it at the moment.

Apart from that, I really like the amount of tests that you have added. That is really nice.

Thank you.

@MatusJurcak
Copy link
Copy Markdown
Contributor Author

Hello,

I added documentation for the CPU and INTC, and updated the documentation for the printer device. I also introduced additional debugging features for both the CPU and INTC.

Lastly, I removed the separate formatting for the SuperH files and I would leave the updated formatting for another discussion.

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