Repository navigation
Sharpie Console v0.4
Thank you for downloading the Sharpie fantasy console! No, seriously, your support means everything.
Getting Started
- Windows: Run
Sharpie.exe. - Linux: Run the
Sharpiebinary (you may need tochmod +xit), or use the included.desktopfile. - MacOS: MacOS is currently not supported. Stick around!
All necessary assets are included either in the package you just downloaded or embedded into the executable itself, so no need to worry about dependencies!
Controls (Keyboard/Joypad)
Currently, the keyboard controls Player 1, and the first detected controller controls Player 2. The second detected controller also controls player 1.
- D-pad: Arrow Keys / Left Joystick or Controller D-pad
- A: Z / Xbox B / PlayStation Circle / Nintendo A
- B: X / Xbox A / PlayStation X / Nintendo B
- Start: Left Shift / Start / Options / +
- Option: Tab / Back / Select / -
- Reset: Currently no reset button.
Loading ROMs
To load a ROM, you can either drag the .shr file onto the Sharpie executable or start the program and drag the ROM into the window.
Alternatively, you can pass in a file path through the command line like so: Sharpie path/to/your/cartridge.shr
However, to load a different cartridge, you must restart the console.
Developing ROMs (The Sharpie CLI)
As of v0.4, the legacy SDK and the C compiler have been unified into a single tool: sharpie.
Using the CLI
The sharpie tool handles C compilation, assembly, and ROM exporting in one go. It decides what to do based on your file extensions.
Basic C Compilation:
sharpie main.c -o game.shrAssembling raw ASM files:
sharpie bios.asm -f -o bios.binConverting PNG images to sprite data:
You may also use the CLI tool to convert a PNG image to Sharpie sprite data either for use with C or assembly:
sharpie image.png -o sprites/sprite_0.c # you can also pass in multiple PNG files
# or, for assembly:
#sharpie image.png -o sprites/sprite_0.asm-
CLI Flags:
Inputs: You can pass multiple .c files at once to compile them into a single ROM, or a single .asm file.
-
-o : Specifies the output path.
-
-O: Enables C optimizations. Defaults to off.
-
-S: Stops after compiling C and emits an assembly file.
-
-f: Firmware mode. Assembles a raw binary without the standard .shr headers.
-
-t <title>: Sets the internal ROM title (visible in the header).
-
-a <author>: Sets the internal ROM author name.
-
Support
If you encounter any issues with the Runner or the CLI, please open an issue over at the GitHub repository.
Happy playing and developing!
What's Changed
- Fix deterministic struct-return codegen and stack-safe aggregate writes in Sharpie C emitter by @Copilot in #30
- Fix array-of-struct initializer codegen for globals and locals in Sharpie.CCompiler by @Copilot in #31
Full Changelog: v0.3...v0.4