Git Product home page Git Product logo

ardens's Introduction

Ardens

Ardens is an Arduboy simulator that is useful for profiling and debugging.

screenshot

Try out the full debugger here. Drag and drop an Arduboy game (.hex/.elf/.arduboy) and any FX data (.bin) onto the page.

Try the minimal player with one of the game URLs below:

Features

  • Profiler
    • Identify performance hotspots at the instruction level
    • View inclusive CPU load or raw cycle counts per instruction, hotspot, or symbol
  • Live CPU Usage Graph
  • Disassembly View
    • Source lines, symbols, and labels intermixed with instructions
    • Addresses of jumps, branches, and calls expanded to label/offset
    • Click on jump addresses to scroll to their destination
    • Hover over RAM addresses to see their symbol, data type, and value
    • Jump to any symbol from sorted list
  • Source View
  • Call Stack
  • RAM/Registers View
    • Edit any register or RAM value live
    • Show RAM consumption from global variables
    • Track current and maximum stack usage
    • Set read/write breakpoints on RAM address
    • View a portion of RAM as a display buffer
  • Simulation Control
    • Slow down or speed up simulation speed
    • Pause, continue, step into, step over, step out
  • Serial Monitor
  • LEDs
  • EEPROM (editable)
  • External flash (editable)
  • Display (SSD1306) Internals
  • Display View
    • Customize palette and filters
    • Optionally model row driver current limiting
    • Temporal filtering for grayscale games
  • Sound Waveform (Time and Frequency)
  • Global and Local Variables
    • Show all accessible locals and their data types and values
    • User-defined list of globals to watch
  • Screenshots
    • Record PNG or GIF
    • Optionally record sound as WAV
    • Customize palettes and filters for recording
  • Snapshots
    • Save/restore snapshot of entire device state

Keyboard Bindings

Key Purpose
Arrows Arduboy: directional buttons
A/Z Arduboy: A button
S/X/B Arduboy: B button
F1 (Desktop Debugger Only) Save screenshot of entire window
F2 Save screenshot
F3 Toggle GIF recording
F4 (Debugger only) Save snapshot
F5 (Debugger only) Pause/Continue
F8 Reset
F11 Toggle fullscreen
O (Debugger only) Settings window
P (Debugger only) Toggle player mode
R Rotate display

Command Line Usage

To invoke from the command line with specific options and game file(s), use the syntax /path/to/Ardens param=value file=game.hex, where the parameters are the same as in the URL parameters below.

For example:

Ardens palette=highcontrast grid=normal current=true file=game.hex file=fxdata.bin

Creating a link to a playable Arduboy game

There is a web build hosted on GitHub pages: to create a link to a playable Arduboy game using Ardens Player, you can follow these patterns:

https://tiberiusbrown.github.io/Ardens/player.html?file=https://example.com/game.arduboy https://tiberiusbrown.github.io/Ardens/player.html?file=https://example.com/game.hex&file=https://example.com/game.bin

The web builds of the debugger and player accept the following additional URL parameters (e.g., add &param1=value1&param2=value2 to the URL).

g or grid

Overlays the display with a grid to allow easier disambiguation of adjacent pixels. Values: none, normal, red, green, blue, cyan, magenta, yellow, white

p or palette

Adjusts the color palette of the display. Values: default, retro, lowcontrast, highcontrast

af or autofilter

If enabled, applies temporal filtering to the display to help properly render grayscale games. Values: 0, 1

f or filter

(Debugger only) Conditionally applies an upscaling filter. Values: none, scale2x, scale3x, scale4x, hq2x, hq3x, hq4x

ds or downsample

(Debugger only) Downsamples by an integer ratio after applying an upsample filter. Values: 0, 1, 2, 3

ori or orientation

Rotates the display in 90 degree increments (directional button mapping is also rotated as if playing on a rotated Arduboy). Values:

  • 0 or normal
  • 90 or cw or cw90
  • 180 or flip
  • 270 or ccw or ccw90

v or volume

Sets the emulated audio gain. Value may be in the range 0 to 200, with 100 being the default.

size (Desktop only)

Sets the initial size of the application window. Value should be in the format <width>x<height> (for example, size=800x400).

i or intscale

Restricts the display scaling to an integral scaling factor. Defaults to false for the web player, and true for all other platforms.

c or current

Enables modeling the display row driver current limit. This effectively darkens rows that have many lit pixels. Defaults to false.

fxport

Sets the port to be used for the flash select. Values:

  • 0 or d1 or fx (default)
  • 1 or d2 or fxdevkit
  • 2 or e2 or mini

display

Sets the type of emulated display. Values:

  • 0 or ssd1306 (default)
  • 1 or ssd1309
  • 2 or sh1106

Libraries Used

ardens's People

Contributors

tiberiusbrown avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

ardens's Issues

Copy to Clipboard not working on Safari (MacOS 12.7.4)

Link to Arduboy forum post.

Iā€™m on a MAC running Monterey 12.7.4.
The copy to clipboard button (from the Serial Monitor) does not copy when using Safari but it does when I use Chrome, Firefox or Opera.

Probably need to set clipboard from event handler only (note from sokol lib):

NOTE that on the HTML5 platform, sapp_set_clipboard_string() must be
called from inside a 'short-lived event handler', and there are a few
other HTML5-specific caveats to workaround. You'll basically have to
tinker until it works in all browsers :/ (maybe the situation will
improve when all browsers agree on and implement the new
HTML5 navigator.clipboard API).

Add build details to version string

Please add build details to the version string (top right corner), e.g. architecture.
Ideally the text would be selectable to copy & paste.

Possibility of making a libretro core for Android

Firstly thanks for making a libretro core for running Ardens on Windows! I was wondering if it's possible to build a .so libretro core file compatible with Android versions of Retroarch. Thanks in advance!

Flexible button mapping

With different keyboard layouts and left / right-handed players, it might be nice to add custom button mapping.
Perhaps at least add a toggle option to support:

  • Right-handed 'default' : cursor arrows + a / s (and z / x).
  • Left-handed : WASD + , / . (this also matches the default mapping for Thumby's emulator).

Any key mapping options should be stored in a cookie, so it can be kept as the user's default and available when using the embedded player.

... I'm actually thinking of getting the 8bitdo Micro... is it possible to support controllers? šŸ™šŸ»

Compilation issue using gcc 13.1.1

Hi,

I tried to compile Libretro core using

mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DARDENS_LLVM=0 -DARDENS_DEBUGGER=0 -DARDENS_PLAYER=0 -DARDENS_LIBRETRO=1 ..

But I am running this compilation issue

Log
[  9%] Building CXX object deps/fmt/CMakeFiles/fmt.dir/src/format.cc.o
[  9%] Building C object deps/miniz/CMakeFiles/miniz.dir/miniz_zip.c.o
[ 18%] Building C object deps/miniz/CMakeFiles/miniz.dir/miniz.c.o
[ 18%] Building C object deps/miniz/CMakeFiles/miniz.dir/miniz_tinfl.c.o
[ 22%] Building C object deps/miniz/CMakeFiles/miniz.dir/miniz_tdef.c.o
[ 27%] Building CXX object deps/fmt/CMakeFiles/fmt.dir/src/os.cc.o
[ 31%] Linking C static library libminiz.a
/usr/bin/ar qc libminiz.a CMakeFiles/miniz.dir/miniz.c.o CMakeFiles/miniz.dir/miniz_zip.c.o CMakeFiles/miniz.dir/miniz_tinfl.c.o CMakeFiles/miniz.dir/miniz_tdef.c.o
/usr/bin/ranlib libminiz.a
[ 31%] Built target miniz
[ 36%] Linking CXX static library libfmt.a
[ 36%] Built target fmt
[ 50%] Building CXX object CMakeFiles/ardens_libretro.dir/src/absim_decode.cpp.o
[ 50%] Building CXX object CMakeFiles/ardens_libretro.dir/src/absim_arduboy.cpp.o
[ 50%] Building CXX object CMakeFiles/ardens_libretro.dir/src/absim_cpu_data.cpp.o
[ 54%] Building CXX object CMakeFiles/ardens_libretro.dir/src/absim_merge_instrs.cpp.o
[ 59%] Building CXX object CMakeFiles/ardens_libretro.dir/src/absim_execute.cpp.o
[ 63%] Building CXX object CMakeFiles/ardens_libretro.dir/src/absim_execute_merged.cpp.o
[ 68%] Building CXX object CMakeFiles/ardens_libretro.dir/src/absim_disassemble.cpp.o
[ 72%] Building CXX object CMakeFiles/ardens_libretro.dir/src/absim_load_file.cpp.o
[ 77%] Building CXX object CMakeFiles/ardens_libretro.dir/src/absim_reset.cpp.o
[ 81%] Building CXX object CMakeFiles/ardens_libretro.dir/src/absim_snapshot.cpp.o
[ 86%] Building CXX object CMakeFiles/ardens_libretro.dir/src/absim_led.cpp.o
[ 90%] Building CXX object CMakeFiles/ardens_libretro.dir/src/absim_usb.cpp.o
[ 95%] Building CXX object CMakeFiles/ardens_libretro.dir/src/libretro_core/libretro_impl.cpp.o
In file included from /usr/include/c++/13.1.1/backward/strstream:50,
                 from /tmp/Ardens/src/libretro_core/libretro_impl.cpp:8:
/usr/include/c++/13.1.1/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header which may be removed without further notice at a future date. Please use a non-deprecated interface with equivalent functionality instead. For a listing of replacement headers and interfaces, consult the file backward_warning.h. To disable this warning use -Wno-deprecated. [-Wcpp]
   32 | #warning \
      |  ^~~~~~~
[100%] Linking CXX shared library ardens_libretro.so
/usr/bin/ld: deps/fmt/libfmt.a(format.cc.o): warning: relocation against `_ZTVN3fmt2v919basic_memory_bufferIiLm500ESaIiEEE' in read-only section `.text._ZNK3fmt2v96detail14digit_groupingIcE5applyINS0_8appenderEcEET_S6_NS0_17basic_string_viewIT0_EE[_ZNK3fmt2v96detail14digit_groupingIcE5applyINS0_8appenderEcEET_S6_NS0_17basic_string_viewIT0_EE]'
/usr/bin/ld: deps/fmt/libfmt.a(format.cc.o): relocation R_X86_64_PC32 against symbol `_ZTVN3fmt2v912format_errorE' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/ardens_libretro.dir/build.make:291: ardens_libretro.so] Error 1
make[1]: *** [CMakeFiles/Makefile2:137: CMakeFiles/ardens_libretro.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

We have to add -fPIC using PROPERTIES POSITION_INDEPENDENT_CODE ON also for libfmt ?

Thank you.

Libretro compilation issue on Linux

Hi,

I tried to compile the core using

git clone --recursive https://github.com/tiberiusbrown/Ardens
cd Ardens
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DARDENS_LLVM=0 -DARDENS_DEBUGGER=0 -DARDENS_PLAYER=0 -DARDENS_LIBRETRO=1 -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE ..
make -j$(nproc)

But I got this error ? Did I miss something ?

Log
-- The C compiler identification is GNU 13.2.1
-- The CXX compiler identification is GNU 13.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- compiling libretro!
-- ARDENS_VERSION: v0.22.6
-- ARDENS_VERSION_SHORT: 0.22.6
-- Module support is disabled.
-- Version: 9.1.0
-- Build type: Release
-- CXX_STANDARD: 17
-- Performing Test has_std_17_flag
-- Performing Test has_std_17_flag - Success
-- Performing Test has_std_1z_flag
-- Performing Test has_std_1z_flag - Success
-- Required features: cxx_variadic_templates
CMake Deprecation Warning at deps/miniz/CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success
CMake Deprecation Warning at deps/bitsery/CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


skip bitsery examples
skip bitsery tests
-- Configuring done (0.8s)
-- Generating done (0.0s)
-- Build files have been written to: /tmp/Ardens/build

make -j$(nproc)
[  4%] Building C object deps/miniz/CMakeFiles/miniz.dir/miniz.c.o
[ 20%] Building CXX object deps/fmt/CMakeFiles/fmt.dir/src/format.cc.o
[ 20%] Building CXX object CMakeFiles/integration_tests.dir/tests/integration_tests.cpp.o
[ 20%] Building C object deps/miniz/CMakeFiles/miniz.dir/miniz_zip.c.o
[ 20%] Building CXX object deps/fmt/CMakeFiles/fmt.dir/src/os.cc.o
[ 25%] Building C object deps/miniz/CMakeFiles/miniz.dir/miniz_tinfl.c.o
[ 29%] Building C object deps/miniz/CMakeFiles/miniz.dir/miniz_tdef.c.o
/tmp/Ardens/tests/integration_tests.cpp:1:10: fatal error: absim.hpp: No such file or directory
    1 | #include <absim.hpp>
      |          ^~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/integration_tests.dir/build.make:76: CMakeFiles/integration_tests.dir/tests/integration_tests.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:138: CMakeFiles/integration_tests.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 33%] Linking C static library libminiz.a
/usr/bin/ar qc libminiz.a CMakeFiles/miniz.dir/miniz.c.o CMakeFiles/miniz.dir/miniz_zip.c.o CMakeFiles/miniz.dir/miniz_tinfl.c.o CMakeFiles/miniz.dir/miniz_tdef.c.o
/usr/bin/ranlib libminiz.a
[ 33%] Built target miniz
[ 37%] Linking CXX static library libfmt.a
[ 37%] Built target fmt
make: *** [Makefile:136: all] Error 2

Thank you.

Libretro compilation issue on Windows using msys2

Hi,

I tried to compile the core using msys2

git clone --recursive https://github.com/tiberiusbrown/Ardens
cd Ardens
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DARDENS_LLVM=0 -DARDENS_DEBUGGER=0 -DARDENS_PLAYER=0 -DARDENS_LIBRETRO=1 ..
make -j$(nproc)

But I could not launch the core with error failed to load the core.

According to Dependencies, it seems it does not find :
image

Should not we add -static-libgcc -static-libstdc++ ?

Thank you.

Compiling with preinstalled SDL2

Hi,
I was hoping I could run Ardens or at least ArdensPlayer on Linux system without GUI, without X. To be specific - I would like to use Ardens on Raspberry Pi OS Lite. I have custom compiled SDL2, so other SDL2 based projects are running fine directly on framebuffer.

I don't think that it is possible to use framebuffer in SDL3. So, the question is, is it possible to compile Ardens so that it will use my installed SDL2 instead of SDL3? If it is, how can I do it?

Ardens and ArdensPlayer periodical crash when run them from cli

Hi! I try to run Ardens from the terminal on macos 13.3 with M1, but it crashes sometimes right on the start:

Projects/Arduino ā± ArdensPlayer file=Arcade_3_in_1.hex                                                                                                                                                         
2024-01-09 20:01:17.919 ArdensPlayer[23331:68211338] *** Assertion failure in -[_sapp_macos_window setTitle:], NSWindow.m:2770
2024-01-09 20:01:17.919 ArdensPlayer[23331:68211338] Invalid parameter not satisfying: aString != nil
^C
Projects/Arduino ā± ArdensPlayer file=Arcade_3_in_1.hex                                                                                                                                                         
2024-01-09 20:01:27.225 ArdensPlayer[23622:68212067] *** Assertion failure in -[_sapp_macos_window setTitle:], NSWindow.m:2770
2024-01-09 20:01:27.225 ArdensPlayer[23622:68212067] Invalid parameter not satisfying: aString != nil
^C
Projects/Arduino ā± ArdensPlayer file=Arcade_3_in_1.hex                                                                                                                                                         
2024-01-09 20:01:31.882 ArdensPlayer[23942:68212733] *** Assertion failure in -[_sapp_macos_window setTitle:], NSWindow.m:2770
2024-01-09 20:01:31.882 ArdensPlayer[23942:68212733] Invalid parameter not satisfying: aString != nil

and sometimes not:

Projects/Arduino ā± ArdensPlayer file=Arcade_3_in_1.hex                                                                                                                                                         
Ardens Player v0.21.18 by Peter Brown

It happens with different hex files:

Projects/Arduino ā± ArdensPlayer file=arduboy_hello_world.ino.hex                                                                                                                                               
2024-01-09 20:13:12.586 ArdensPlayer[38492:68257121] *** Assertion failure in -[_sapp_macos_window setTitle:], NSWindow.m:2770
2024-01-09 20:13:12.586 ArdensPlayer[38492:68257121] Invalid parameter not satisfying: aString != nil

I can't catch a condition to run it successfully, but drag-n-drop way always works normally.

Version of the Ardens is: macos arm64 v0.21.18

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. šŸ“ŠšŸ“ˆšŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.