Tests for ACE speedruns that rely on PPU's internal open bus

Discuss emulation of the Nintendo Entertainment System and Famicom.
Post Reply
lidnariq
Site Admin
Posts: 11957
Joined: Sun Apr 13, 2008 11:12 am

Tests for ACE speedruns that rely on PPU's internal open bus

Post by lidnariq »

We've had a few instances of speedruns that try to rely on the PPU's internal data bus to hold a single byte, and those are failing hardware validation.

So I wrote a test ROM that will measure how long the value placed on PPU open bus stays before it changes.
ppudecay.zip
(4.34 KiB) Downloaded 112 times
To convert the numbers into time, take the hexadecimal numbers on screen and multiply by 15. Then divide by the CPU speed of the specific console you're measuring on (1.789773MHz for NTSC, 1.662607MHz for PAL, 1.773447 for PAL famiclone, other values happen too)

Results are astoundingly variable. My NTSC NES starts with fastest raw counts around 0xA00 (21ms) and as it warms up speeds up to 0x900 (19ms). Other people testing see fastest decays initially around 0x600 (12ms) and as theirs warms up it speeds up to around 0x200 (4ms).
User avatar
Eugene.S
Posts: 317
Joined: Sat Apr 18, 2009 4:36 am
Location: UTC+3
Contact:

Re: Tests for ACE speedruns that rely on PPU's internal open bus

Post by Eugene.S »

The "slowest" line may have a different line length (number of values) depending on reset.
The "fastest" line changes it's values depending on the duration of the test (PPU warm-up)

!! The freezes at the beginning of the some videos was caused by the late activation of virtualdub recording !!

Chip type: Ricoh RP2C02G-0 (PPU)
PCB type: Custom
Timing: NTSC
https://youtu.be/BaW338tYbPM

Chip type: Ricoh RP2C02H-0 (PPU)
PCB type: Famicom AV
Timing: NTSC
https://youtu.be/Om9YPw62xI8

Chip type: Ricoh RP2C07-0 (PPU)
PCB type: NES PAL
Timing: PAL
https://youtu.be/BMxuNS1xNo0

Chip type: UMC UA6538 (PPU)
PCB type: Custom
Timing: Dendy
https://youtu.be/j76-vU5m20k

Chip type: TA-02NP 6538 (PPU)
PCB type: Custom
Timing: Dendy
https://youtu.be/rqfTjC9-DQM

Chip type: T1818P (NoAC) with external UM6516 RAM
PCB type: Custom
Timing: Dendy
https://youtu.be/l43bGdDz7_0

Chip type: T1818P (NoAC) with external IDT6116SA 15ns RAM
PCB type: Custom
Timing: Dendy
https://youtu.be/3E-KfLelXhM

Chip type: UMC UM6561F-2 (complete NoAC)
PCB type: Custom
Timing: Dendy
https://youtu.be/ebgjxmA5wJU

Chip type: UMC UM6561F-2 (complete NoAC)
PCB type: Dendy Junior MG-02
Timing: Dendy
https://youtu.be/dl_SCeE7bZM
User avatar
feos
Posts: 108
Joined: Tue Apr 19, 2011 11:26 am
Location: RU

Re: Tests for ACE speedruns that rely on PPU's internal open bus

Post by feos »

Reposting from TASVideos
Bigbass wrote:https://youtu.be/Lep1Jhlvbqg
Wasn't sure how long was sufficient. After around 10 minutes the results were:

Code: Select all

Fastest:
7F-025B 3F-025A 7F-0259 7F-0255
3F-0253 7F-0267 7F-0266 FF-0262

Slowest:
01-065E 10-0736 40-0B0D 40-0B2B
40-0B31 40-0B37
Alyosha wrote:https://www.youtube.com/watch?v=kd50wwM0mBQ

V2 test. Same basic results as V1. Seems to be a couple orders of magnitude faster than what NESHawk has now (but shouldn't really matter since in this case the reads seem to be happening during rendering, so even quicker decay should still be ok.)
feos wrote:SBDWolf kindly provided entire 20 minutes of footage, on 2 consoles each!

US Frontloader NES
https://www.youtube.com/watch?v=8SxNZRYrvqE

AV Famicom
https://www.youtube.com/watch?v=o4rpuAE6Gjk
Fiskbit
Site Admin
Posts: 1645
Joined: Sat Nov 18, 2017 9:15 pm

Re: Tests for ACE speedruns that rely on PPU's internal open bus

Post by Fiskbit »

feos wrote: Thu May 11, 2023 11:18 am
Alyosha wrote:https://www.youtube.com/watch?v=kd50wwM0mBQ

V2 test. Same basic results as V1. Seems to be a couple orders of magnitude faster than what NESHawk has now (but shouldn't really matter since in this case the reads seem to be happening during rendering, so even quicker decay should still be ok.)
Rendering shouldn't matter at all in this case. The PPU open bus we're talking about here is open bus for the PPU's CPU interface and is only affected by register access - that is, values driven onto this specific bus when the CPU writes or when bits are driven to respond to a CPU read. This is separate from the PPU bus used for CHR and nametables, which is what is used for rendering.

Indeed, consider lidnariq's test ROM above that is measuring this decay. It has rendering enabled at all times and would not function properly if rendering affected it.
Post Reply