Repository navigation
v0.1.1: second game loads fine, multitap option, clean OSD - #8
Merged
Merged
Conversation
The one-shot vreset re-armed only when the active height changed. Loading a second game resets the core, so the source frame restarts at a new phase with the same height: nothing re-armed and the picture stayed wrapped until power-off (1943, then Parodius). The first-drawn-line event now re-fires the raster reset whenever it lands away from cy == 0, with one line of slack. sim/hdmi_exact/tb_exact.cpp reproduces it: a reload-style source stall in vblank leaves every later frame wrapped on the old code (0 good / 8 bad) and recovers within 3 frames with this change, over 20 stall lengths and both active heights, with no extra resets in a 60-frame steady-state run.
Ports 3-5 of the tap returned all ones, which on this active-high bus is every button held: with the multitap on, Bomberman saw Select/Up stuck. MiSTer's 16'h0FFF default is the same idle state on its inverted bus.
iosys's textdisp draws a fixed 256 x 224 grid and returns a pixel two clocks after its x/y. The overlay coordinates were the game's source-sample index and line count (up to 512 x 242), so the menu and the loading text wrapped and tore. Walk the grid across the displayed window instead, the way TangCore's frame buffer does, with x two pixels early for the latency. tb_exact.cpp checks x runs 0..255 across the window and y 0..223 down the screen.
Two more reasons the menu text was corrupt under the 480p exact lock: - textdisp.v picks the font bit on the third clock after x changes, using the current x. At 480p x advances every 2-3 clocks (256 across 720), so it was often already the next pixel. Use x_r, the pixel that was fetched; at 720p x_r == x at that point, so nothing changes there. - the OSD window starts two pixels early, at the end of the previous line when the picture starts at x = 0, but y only stepped at cx = 0, so those first pixels used the previous row. y now steps with the lead-in, and is forced to 0 at cy = 0 so a raster reset cannot leave it at the bottom. sim/osd/tb_osd.cpp runs the wrapper with the real textdisp.v and a font pattern that depends on both coordinates: the old textdisp draws 3.4% of OSD pixels wrong, this one 0.13% (the last column, where the window ends); x and y match the 256 x 224 grid exactly.
The menu memory still held the NESTang logo from the iosys this core was started from. Redraw it as PCETang in the same letter style; only the logo rows ($380-$3FF) change, the font is untouched.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tested on Console 60K: 1943 → Parodius → Bomberman '94 without power-cycle, Bomberman '93 with Multitap Off and On, option kept across power-off, OSD and loading screen clean, logo. Primer 25K and Nano 20K build and meet timing.