Skip to content

Instantly share code, notes, and snippets.

@pekkavaa
Created May 6, 2025 14:45
Show Gist options
  • Save pekkavaa/2c11f8593c1d0ccef3ca6e5181e4dbd8 to your computer and use it in GitHub Desktop.
Save pekkavaa/2c11f8593c1d0ccef3ca6e5181e4dbd8 to your computer and use it in GitHub Desktop.
ares N64 performance history investigation

ares N64 performance history investigation

May 6th 2025

The ares' emulators N64 core performance in homebrew libdragon ROMs seems to have deteriorated since v132. The goal of this experiment is to gain clarity what caused it.

The emulated frames per second ("VPS") for different builds are below. v132 is a commit in between v132 and 133 that I could get to build.

image

The test ROM is a Tiny3D example t3d_17_culling with added ADPCM music. Tested on a AMD Ryzen 7 5700X Linux system. These are noisy measurements and the speeds fluctuated +/- 1 VPS.

Changes between versions 133 and 134

The two interesting commits seem to be these.

Annotated commit history between v133 and v134: https://pastebin.com/raw/t7AEDKCS

VPS commit    date       message
41  d381bb467 2023-11-22 v134
    339278335 2023-11-22 n64: optimize DD RTC checks (#1300)
    67c6bfa4a 2023-11-21 mia: improve CIC detection algorithm (#1296)
    8cea0b832 2023-11-20 ps1: initialize _active member in peripherals (#1298)
    4f7feeafd 2023-11-20 build: fix level 2 msvc warnings (#1297)
    bcb60a6e1 2023-11-19 n64: fix an oops in rtc init
    af0713858 2023-11-19 n64: initialize rtc to unix epoch (timestamp 0)
    d3b11e433 2023-11-19 ws: Adjust ROM/SRAM bus timings. (#1212)
    7faebad71 2023-11-19 build: fix level 1 msvc warnings (#1295)
    92c1c2ec4 2023-11-18 ruby: queue no more than "latency" samples in wasapi driver (#1292)
    bff273816 2023-11-17 ares: fix copy/past error in i8080 header
    8a4bf9d82 2023-11-15 n64: fix dd rtc skipping december + validity checks to avoid glitchy rtc (#1290)
    4537145d2 2023-11-15 n64: clamp x/y values for n64 mouse (#1289)
    4544e1df6 2023-11-15 desktop-ui: disable color bleed for HD content (#1287)
    30cc370e4 2023-11-15 n64: put dd rtc into a struct + serialize rtc + update serializer version (#1288)
    4a48753ea 2023-11-14 a26: riot timer improvements
    dc385dbe6 2023-11-14 Merge commit '52df41a709917bc8d55a5fe8d9848d15ed3941e4'
    52df41a70 2023-11-14 Squashed 'thirdparty/sljit/' changes from bc844c90a..c1cbaf09e
    df8d5a615 2023-11-14 mia: .rom => rom
    de1c12737 2023-11-13 mia: remove support for loading ".smd" extension
    da9c82956 2023-11-13 mia allow loading .rom files for MSX/MSX2
    4dd837ae4 2023-11-14 mia: implement n64 controller config (Advanced Homebrew ROM Header) (#1286)
    fa0f9a715 2023-11-10 n64: emulate disk change status bit behavior correctly + fix 64dd reset + fix DD debugger IO output (#1283)
    87ae65a09 2023-11-08 n64: add 64dd disk swapping + safety checks + change manufacture timestamp (#1280)
    0ceaf17be 2023-11-08 desktop-ui: emulator::construct must be called *before* settings are loaded
    e7760bfc5 2023-11-07 n64: Add D64 file format support (#1279)
    c27f369e3 2023-11-07 fc: Initial EPSM implementation. (#1274)
    020410ea0 2023-11-07 Add homebrew mode (with a few checks to N64 core) (#1278)
    6fbea44d3 2023-11-07 ci: install setuptools in macos environment
    d2e20f0d0 2023-10-27 mia: use SMS mode when loading .sms roms on gamegear
    e589f8d9c 2023-10-29 wdc65816: fix PLB wrapping in emulation mode (#1277)
    d201d6a54 2023-10-26 N64 Mia Update - Chameleon Twist 2 (#1272)
    7dc11a1c3 2023-10-25 ms: check for TMR-SEGA header
    89e000127 2023-10-25 ares: preliminary Intel 8080 cpu implementation + test harness
    5b744c324 2023-10-25 nall/hiro: shlwapi is a dependancy of nall, not hiro
    a47bbea7a 2023-10-25 desktop-ui: surround sg1000a with CORE_SG ifdef
    414c20525 2023-10-25 desktop-ui: surround sg1000a with CORE_SG ifdef
    f1fb33af8 2023-10-24 ms: add color emulation for non-linear blue
    84e3663e8 2023-10-24 pce: add color emulation (non-linear rgb)
    77bfad91d 2023-10-24 md: refresh & bus timing fixes (#1269)
    cd8d84ed5 2023-10-23 all: create a system for generic arcade boards
    44b0c2c53 2023-10-23 Revert "md: increase synchronizaton between audio related components"
    02dcc6343 2023-10-23 md: remove extra bus arbitration delays
    864bc6e6d 2023-10-23 md: increase bus arbiter delays for z80->m68k communication
    a572a97d1 2023-10-22 build: restore rule for ym2612 (#1267)
    939617aad 2023-10-21 md: increase synchronizaton between audio related components
    ca6ada73a 2023-10-20 ng: use ymfm for ym2610 rather than (badly) hacking together ym2612 with the YM2149
    d8e462035 2023-10-21 Merge commit 'e457e05c8b14079c1d87d96a47cea6c56dea7796' as 'thirdparty/ymfm'
    e457e05c8 2023-10-21 Squashed 'thirdparty/ymfm/' content from commit d641a8063
    da3adb4da 2023-10-21 ym2612: update key state on phase tick
    3ebfb4433 2023-10-21 Revert "ym2612: immediately update key state on keyOn/keyOff"
    0bea9d3a2 2023-10-20 md: add 32x framebuffer mirror (fix SoulStar X)
    785edf60c 2023-10-20 ym2612: immediately update key state on keyOn/keyOff
    62f5c36c1 2023-10-19 desktop-ui: rename SG-1000 (Arcade) to "SG-1000 Arcade System"
    ed35f2249 2023-10-19 desktop-ui: arcade systems have their own category
    3fa22458f 2023-10-19 sg: fix serialization
    708247ab3 2023-07-19 sg: preliminary support for sg1000 based arcade games
    88a14fb5f 2023-10-18 msx: fix conflicts between rom and scc with KonamiSCC mapper
    5f55b6cf2 2023-10-18 md: fix hang in "The Terminator (USA)"
    74e10c45f 2023-10-18 mia: improve system autodetect of cd-rom based games
    5984867fc 2023-10-18 md: pass "CDC REGS" test in mcd-verificator
    dd01cf762 2023-10-18 mia: identify FDS bios by copyright string rather than digest
    bfa1eeafd 2023-10-18 md: fix "After Burner Complete (32x)"
    0661e9858 2023-10-18 md: 32x performance tuning
    7b433f305 2023-10-18 md: fix sh2 thread restart behavior
    1c61fc95e 2023-10-18 md: implement opn2 restart w/out resetting the thread clock (#1260)
    401df969b 2023-10-17 fc: serialize controller state
    5deec7ede 2023-10-10 Revert "fc: allow "ppu direct color" to function, fixes full palette test roms"
    6a7de6267 2023-10-10 fc: allow "ppu direct color" to function, fixes full palette test roms
    b7be6612b 2023-10-07 ares: prevent rebuilding the entire project if only version constants change
    f976cdc3a 2023-10-02 md: set color bleed width per frame
    e369049d0 2023-10-02 nall, libco: add support for risc-v arch (#1249)
    72d8179bf 2023-09-29 Add "Games" app category to bundle .plist on macOS to facilitate Sonoma's Game Mode (#1248)
    8ed4af8b5 2023-09-29 recompiler: avoid overallocation in code buffer (#1247)
    bcddb7a68 2023-09-28 fc: implement ppu open bus
    5c9f5419b 2023-09-28 gdb: disable some debug prints
    4b3b78b77 2023-09-28 recompiler: more robust code cache allocation (#1242)
    07c320e55 2023-09-28 32x: maintain code cache allocation across resets (#1243)
    506820bac 2023-09-27 Modified weave deinterlacing description (#1240)
    46ddcac33 2023-09-27 recompiler: revert "avoid overallocation in code buffer" (#1241)
    1349d45a5 2023-09-26 recompiler: avoid overallocation in code buffer (#1239)
    ff11f77f9 2023-09-26 desktop-ui: revert "enable color bleed by default"
    f9c110cd4 2023-09-26 desktop-ui: enable color bleed by default
    379091bad 2023-09-26 md: fix color bleed
    ba475a7a5 2023-09-26 desktop-ui: expose "color bleed" option to all cores
    06e1ac13e 2023-09-26 sfc: separate black level crush from color emulation
    675026ffd 2023-09-26 fc: remove gamma adjustment in color emulation
    f0449e36f 2023-09-25 md: sync every cycle when 32x is not in use
    0f265028f 2023-09-24 fc: add self-flashing support to UNROM-512, GTROM (#1237)
    0b2544a6c 2023-09-19 gdb/server: implmment NoAckMode (#1230)
    99afcff4c 2023-09-19 fc: Fully utilize NES 2.0 extended PRG/CHR size variables. (#1229)
    51061e16a 2023-09-18 Merge commit 'a652e85069d83d8430730fb66fb96a7f31f72389'
    a652e8506 2023-09-18 Squashed 'thirdparty/libchdr/' changes from 54bfb871c..9108f34a8
    4e66bc0b3 2023-09-18 Squashed 'thirdparty/sljit/' changes from aa71425db..bc844c90a
    0c6784294 2023-09-18 Merge commit '4e66bc0b32f63b6e3ada74f2d85e3dbdc0b3490e'
    2a6454a71 2023-09-18 Merge commit '4f5b5da64f07bd730f37ae842d3404a3189ac13f'
    4f5b5da64 2023-09-18 Squashed 'ares/n64/vulkan/parallel-rdp/' changes from c38ea4c21..37bf2967e
    562bcd7b2 2023-09-18 build: miscellaneous fixes (#1233)
    db5f7d786 2023-09-17 fc: Fix MMC5 program mode 1. (#1228)
    3e9ee7423 2023-09-17 fc: Implement mapper 31, 218. (#1227)
    1215b3744 2023-09-17 GDB Server (#1223)
    85488a740 2023-09-16 fc: Implement Action53 mapper.
    5eccee845 2023-09-16 fc: Implement UNROM-512 mapper.
    671669b20 2023-09-16 v30mz: Fix interrupt return address on division by zero.
    fe9a80b9e 2023-09-16 readme: update windows build instructions to add sdl2
    4216a0c2c 2023-09-14 v30mz: fix ENTER/PREPARE opcode implementation, timing
    8ba3bd634 2023-09-14 ws: Properly load trimmed cartridge ROMs - starting from the end of the address space.
    546aed685 2023-09-02 sfc: report PAL and NTSC support for SGB1, allowing it to run at 50hz if "Europe" is the users preferred region.
    b11ff923b 2023-09-02 ws: fix sound DMA source/length shadowing
    4509471ce 2023-09-01 ws: fix sound DMA readout values when disabled
    72cd3c5a6 2023-08-29 Update master-system.cpp
    929ad4538 2023-08-29 Cleaned up some stuff
    bb6774286 2023-08-29 Added K188in1 Mapper and fixed missleading names
    b439a0d90 2023-08-29 Cleaning up code based on LukeUsher's nits.
    a96395a1c 2023-08-29 Added 2 Hap in 1 - David-2 ~ Moai-ui bomul
    70675c064 2023-08-29 Removed  some leftovers
    950d9a196 2023-08-29 Added Pak4 (4 PAK All Action) and Hicom Mappers to the SMS core.
    2682e929d 2023-09-01 ws: implement sound DMA hold
    cd924569d 2023-08-29 Update README.md: Fixed typo
    0d27a86e0 2023-08-29 ws: fix INT_BASE bit order
    38628f9c8 2023-08-29 ws: properly implement INT_BASE port
    405ac8289 2023-08-28 fc: Lowered saturation
    b29fb9177 2023-08-28 nall: move cdrom loading to separate thread
    9280622d2 2023-08-27 nall: fix relative time in pregap subchannel q
    714ecc132 2023-08-24 ruby: use DwmFlush on Windows rather than OpenGL Swap Interval
    04525a742 2023-08-23 readme: fix missing a26 core
    cc3f4543b 2023-08-23 readme: update core list
    2f65f315e 2023-08-23 desktop-ui: fix build on older compiler versions
    de57072f8 2023-08-23 ci: switch to wpilibsuite mirror of import-signing-certificate
    9225847d4 2023-08-22 build: prefer clang only on win/macos/bsd
    6669e3e84 2023-08-22 mos6502: make it more obvious that SLO is combined ASL and ORA
    703e2ea49 2023-08-22 desktop-ui: add firmware "scan" function
    40a6b8d36 2023-08-22 mia: allow atari 2600 to load .bin format roms
    d5381e47a 2023-08-22 mos6502: implement more undocumented opcodes
    7ea42e320 2023-08-22 Update issue templates
    c7c80d07e 2023-08-22 desktop-ui: restore ability to hide emulation cores from the menu
    5faa14b50 2023-08-21 a26: check for PAL string in addition to Europe
    1647d3f4e 2023-08-21 a26: fix RIOT timer
    62eadd89e 2023-08-20 a26: fix hmove when position < offset
    9fae1a48c 2023-08-20 a26: fix nusiz missile separation
    166856f4d 2023-08-20 a26: better relative object positioning
    48e4ee55c 2023-08-20 a26: fix resmp + implement nusiz for missiles
    e8b85524d 2023-08-19 Add mouse support in GUI for Mega CD
    3854a1d1e 2023-08-18 a26 more timing/debugging tweaks
    090f8765c 2023-08-18 tracer: fix a crash when logging cpu instructions
    8ae96164e 2023-08-17 a26: more timing improvements
    5a647e77a 2023-08-17 a26: improve cpu timing with regards to wsync
    6c7bdf9c1 2023-08-17 ps1: fix timer precision with recompiler
    21a730b03 2023-08-17 n64: add is-viewer log channel rather than forced fputc
    5d38bd374 2023-08-17 ares: allow separate toggling of file/stdout per log channel
    3d3838d8b 2023-08-17 ares: refactor trace/notification logging
    d1ddbd504 2023-08-17 wip: allowing for separate log channels
    c88f26230 2023-08-16 ps1: various timing tweaks; passes more tests!
    ecab4fdca 2023-08-16 ps1: simulate infinite cpu write fifo
    3581be3c4 2023-08-16 ps1: prevent fastload exe hook from running more than once
    2950cef60 2023-08-16 ps1: perform color modulation in rgb555 space
    aab3b447e 2023-08-15 ps1: implement rumble/force feedback for DualShock pads
    ea665be25 2023-08-15 ruby: fix an issue where weak/strong rumble motors were swapped
    e8f4554f2 2023-08-15 ps1: use q-sub channel to prevent playing data as cd-da
    0ba0e5f85 2023-08-15 ps1: update adsr envelopes immediately on write
    7dea8162d 2023-08-15 ps1: support half sample rate xa-adpcm
    d4fd32663 2023-08-15 md: sega cd disc swapping
    cb19cdbf9 2023-08-15 ps1: disc swapping support
    ec12ccc6f 2023-08-14 ps1: fix l3 and r3 on dualshock controllers
    59deec8b4 2023-08-14 ps1: partial dual-shock implementaton
    ef53e87b3 2023-08-14 ps1: log and recover from premature device transmit
    631085f1e 2023-08-14 ps1: separate /ack and transfer delays into two counters
    543dec41b 2023-08-14 ps1: improve controller /ack behavior
    72ab5278b 2023-08-14 ps1: digital pad should deassert /ack on invalid command
    93937e860 2023-08-13 ruby: preliminary SDL2 audio driver
    8476c880b 2023-08-11 ruby: use pkg-config to link SDL2
42  e39efe170 2023-08-11 n64: fix tlb tests
    133044afa 2023-08-10 fix build, oops
    c78f06e20 2023-08-10  n64: fallback to other paks when gb game is not inserted
    f5dc3bbd4 2023-08-10 n64: enable transfer pack for all known supported games
    ea688c772 2023-08-10 n64: preliminary support for the transfer pak; only enabled for Pokemon Stadium for now
    35c8f5f76 2023-08-09 ares: update rumble api to support non-binary vibration
    97aa37f04 2023-08-09 ruby: another udev oversight
    8752695b4 2023-08-09 ruby: fix oversight in udev driver
    cea1adcb4 2023-08-09 ruby: fix typo in udev driver
    91b6c7ac1 2023-08-09 ruby: update rumble api to support setting weak/strong motors independently
    862bfec9e 2023-08-09 ruby: add rumble support to sdl driver
    dad3db549 2023-08-09 ruby: fix keyboard on Windows when using SDL driver
    f396a9cf6 2023-08-09 recompiler: allocate code cache early in main
    beaab1791 2023-08-09 build: include pkg-config for package detection on CI
    cc6b26c8d 2023-08-09 build: attempt to fix aarch64 windows builds
    a5319fdc0 2023-08-09 build: attempt to fix aarch64 windows builds
    c2c3c0f0f 2023-02-07 ruby: enable SDL2 input driver on all platforms
    3c773a90e 2023-08-08 Add audio hotkeys
43  8574a5879 2023-08-07 n64: advance virtual address in recompiler
    3fd03e7a3 2023-08-07 n64: improve idle loop detection
    0130187f8 2023-08-06 n64: detect idle loops using jump instruction
    fde1f55f4 2023-07-30 n64: begin implementing fpu delays
    5337a4bfb 2023-07-25 n64: step one less cycle per mul/div instruction
42  6bf0d1ffc 2023-07-25 n64: step just one cycle per instruction in icache
49  aff351393 2023-08-05 n64: raise vi line interrupt post-increment
    9fb87dc0c 2023-08-05 Add support for system-wide installation of Ares on Linux, this fixes databases and shaders not loading
49  a10b9ce0e 2023-08-05 n64: implement rdp clock counter
    ffcce5823 2023-08-04 n64: track cpu clocks at system rate
    78f439dad 2023-08-04 n64: refactor thread step
50  251ea7c0d 2023-08-04 fix build
    12b4530f3 2023-08-04 desktop-ui: save settings when closing the settings dialogue
    c4a5fcea9 2023-08-01 n64: clamp to octagon edge instead of scale
    ef3d784ae 2023-07-31 n64: update after Granite API change
    14552167a 2023-07-31 Squashed 'thirdparty/sljit/' changes from 51538f102..aa71425db
    8593f3e98 2023-07-31 Merge commit '14552167a2a2b7f73cb7037cd18e81cbd97281db'
    a617f2160 2023-07-31 Squashed 'ares/n64/vulkan/parallel-rdp/' changes from 8da2be35a..c38ea4c21
    a18ad4748 2023-07-31 Merge commit 'a617f2160da0e9806a95fe2ebc59edb108dc62d6'
    e6c0c1511 2023-07-31 n64: prevent segfault when parallel-rdp is unsupported by the host gpu
    2cfb4a98e 2023-07-24 n64: implement dual issue conflicts from "fake" uses
    8a89b5a53 2023-07-24 n64: fix rsp zero register locking
    352f2202e 2023-07-24 ps1: cd-rom setLoc command should not reset reading flag
    7233efbc3 2023-07-24 ps1: implement GTE interrupt quirk
50  dbd779376 2023-07-24 n64: implement rsp dual issue restrictions for cfc2/ctc2
    ecba464a5 2023-07-23 Revert "ws: fix off-by-one in line IRQ handling"
    fb711deb0 2023-07-23 ws: fix off-by-one in line IRQ handling
    d901f4e33 2023-07-22 mia: fix a few n64 serials
51  631b0f645 2023-07-23 n64: implement rsp vu pipeline timings
61  3de3f99ad 2023-07-22 Update MoltenVK dependency to version 1.2.4
    d201c4827 2023-07-21 gb: fix MBC3 RAM bank register width
    2ccd7ba67 2023-07-21 gb: fix MBC3 RTC overflow/register handling
60  8e62cd816 2023-07-21 ares: bump version number to v133
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment