Skip to content

Commit

Permalink
add simple opcode debugger
Browse files Browse the repository at this point in the history
  • Loading branch information
TheRainbowPhoenix committed Aug 18, 2024
1 parent b71dea5 commit 9336ec1
Show file tree
Hide file tree
Showing 11 changed files with 766 additions and 649 deletions.
26 changes: 24 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,32 @@
# casio-emu
<h1 align="center">
<img src="ruk-ui/docs/res/RuK.png#gh-light-mode-only" width="288px"/><br/>
<img src="ruk-ui/docs/res/RuK_dark.png#gh-dark-mode-only" width="288px"/><br/>
</h1>
<p align="center">A work-in-progress <b>ClassPad Emulator</b>.<br/><br/>

A work-in-progress emulator for the ClassPad. It is based on [casio-emu](https://github.com/Heath123/casio-emu) and will bring some of the [RuK](https://github.com/TheRainbowPhoenix/RuK) features.
It is based on [casio-emu](https://github.com/Heath123/casio-emu) and will bring some of the [RuK](https://github.com/TheRainbowPhoenix/RuK) UI and features.

It currently runs many add-ins created with [gint](https://gitea.planet-casio.com/Lephenixnoir/gint) quite well.

## Usage

Grab an addin, like [MyAddin.g3a](ebuild/MyAddin.g3a), and select it from the file picker. Then, click "Run" or "Debug".

## Limitations
- This does not attempt to emulate syscalls or the OS yet, so PrizmSDK add-ins will not work
- Add-ins that use the USB driver will not boot
- The code is quite messy and inaccurate sometimes.

## To be done
- Read offset from bin file and dynamically allocate it. For now it's hard-coded ([0x8CFE6000 in interpreter.c](src/interpreter.c) and [entry_point in memory.c](src/memory/memory.c)).
- Support for SDK functions, maybe by building a "stub" os that only provides mocked-up functions and jump tables at given SDK offsets.

### Later
- Disassemble opcodes on debugger
- Stack view
- Write to memory / "hot patching"
- Add "detours" support on debugger

## Building

### For the web
Expand Down Expand Up @@ -38,5 +56,9 @@ make -C build

## Screenshots

![image](docs/simple.png)
![image](docs/full_beta.png)

(Older version)
![image](https://github.com/user-attachments/assets/e7284885-cf0b-4e70-a952-61d248b514a7)

Binary file added docs/full_beta.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/simple.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ebuild/MyAddin.g3a
Binary file not shown.
Loading

0 comments on commit 9336ec1

Please sign in to comment.