Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Graphical bugs on Analogue Pocket #2

Open
Atariboy1982 opened this issue Jul 11, 2023 · 24 comments
Open

Graphical bugs on Analogue Pocket #2

Atariboy1982 opened this issue Jul 11, 2023 · 24 comments
Assignees
Labels
bug Something isn't working

Comments

@Atariboy1982
Copy link

Version (or build number)

0.1.0

Steps to reproduce

The first vine looks correct in Jungle King and Pirate Pete, but subsequent vines have graphical glitches. Also noticed that ski lift in Alpine Ski's attract mode had graphic glitches with portions of various sprites displaced to other locations on the screen.

Expected Behavior

A lack of graphical glitches.

Actual Behavior

Here are some examples.
20230710_231722
20230710_231823

Additional Context

No response

Opened Issues and Pull Requests

No response

@Atariboy1982 Atariboy1982 added the bug Something isn't working label Jul 11, 2023
@antongale antongale assigned antongale and unassigned boogermann Jul 12, 2023
@antongale
Copy link
Owner

I cannot reproduce this behavior. Is there something unique with how your pocket is set up. Are you using a dock or is this in handheld mode? I have no way of testing docked behavior at the moment.

@Atariboy1982
Copy link
Author

Atariboy1982 commented Jul 12, 2023 via email

@Atariboy1982
Copy link
Author

Atariboy1982 commented Jul 13, 2023 via email

@antongale
Copy link
Owner

The sprite logic in this core is susceptible to timing issues, but the particular issue you are showing doesn't align with anything I've seen before (unless I'm messing with the core). No one else has mentioned this issue to me, I wish I could replicate it somehow.

@Atariboy1982
Copy link
Author

Atariboy1982 commented Jul 13, 2023 via email

@Atariboy1982
Copy link
Author

Atariboy1982 commented Jul 14, 2023 via email

@Human0Target
Copy link

Human0Target commented Aug 30, 2023

I too am having this issue on Time tunnel and Jungle King. Tried replacing the roms, and reinstalling the core.

my pocket only arrived today, so based on previous comments, maybe the new manufactured devices have slightly different clocks, not sure how tight your synthesis pushes things.

Some quick screen caps to illustrate. Although some are also jungle king. Some from Time tunnel. it should be noted that the carrages are invisible until attached to the train.

20230830_230807
20230830_230837
20230830_230914
20230830_230916
20230830_230922
20230830_230727
20230830_230751

@agg23
Copy link

agg23 commented Aug 31, 2023

@antongale do you have your design properly constrained and are you passing all timing checks? It's possible these Pockets got a slightly lower spec FPGA, and thus run into slack issues more readily.

@antongale
Copy link
Owner

No, I need to read up on timing constraints, that is probably what is going on.

@agg23
Copy link

agg23 commented Sep 3, 2023

At very least you want to set your core_constraints.sdc to properly mark the 48MHz and 6Mhz as synchronous clocks (they are both integer multiples of 6).

set_clock_groups -asynchronous \
 -group { bridge_spiclk } \
 -group { clk_74a } \
 -group { clk_74b } \
 -group { ic|mp1|mf_pllbase_inst|altera_pll_i|general[0].gpll~PLL_OUTPUT_COUNTER|divclk \
          ic|mp1|mf_pllbase_inst|altera_pll_i|general[2].gpll~PLL_OUTPUT_COUNTER|divclk } \
 -group { ic|mp1|mf_pllbase_inst|altera_pll_i|general[1].gpll~PLL_OUTPUT_COUNTER|divclk } \
 -group { ic|mp1|mf_pllbase_inst|altera_pll_i|general[3].gpll~PLL_OUTPUT_COUNTER|divclk } \
 -group { ic|mp1|mf_pllbase_inst|altera_pll_i|general[4].gpll~PLL_OUTPUT_COUNTER|divclk } 

This makes it so Quartus times the relationship between those two clocks. Without it, they're marked as "false paths", and timing is not run.

At a glance I didn't see any unsynchronized domain crossing, so you're probably good there. If your timing report is good after that set_clock_groups change, I'm guessing it's not timing.

@antongale
Copy link
Owner

@Atariboy1982 and @Human0Target try replacing the bitstream.rbf_r file found in \Cores\antongale.taitosj with the file in this repository (https://github.com/antongale/arcade-taitosj/blob/main/beta/bitstream.rbf_r) to see if the above recommendation helped.

@Atariboy1982
Copy link
Author

Atariboy1982 commented Sep 3, 2023

While I've only had the chance to play 30 seconds of Jungle King, I'm happy to report that it went flawlessly. Where as before only the first swinging vine wasn't corrupted, I just swung from vine to vine about 8 times without any visual glitches.

Thanks very much to Anton and Agg for enhancing this core so that these fringe units like myself and HumanTarget got stuck with that have a component that is a bit off-spec but apparently good enough to slip through whatever quality control went on, can now enjoy this core and these classics on our Pocket.

Analogue has been ignoring my request to get this repaired. While I'm not happy that they're ignoring a paying customer with a unit still under warranty, getting this core fully working on my system goes a long ways towards making me feel better about the deal. This nagging issue was a big part of why I wanted Analogue to identify whatever is off-spec or borderline with my system and replace the part.

Out of plain curiosity now that this up and running well for me, I've been wanting to ask why Jungle Hunt is absent? Did Taito perhaps switch to slightly different hardware when they had to rework Jungle King into Jungle Hunt and then switched back to the original hardware configuration with Pirate Pete? Or does Jungle Hunt perhaps just have an issue at the moment with the core? Looking forward to hopefully getting that one on the Pocket eventually, especially now that it's officially unreleasable. Taito slipped up and didn't renew the trademark to the name back around 2010, with Coleco Holdings/River West claim jumping it and trademarking the name in 2013 with I believe it now under the control of Intellivision Productions (The Amico people).

@antongale
Copy link
Owner

@Atariboy1982 To be clear the reason the core didn't work on your pocket was my fault, not one of Analogue's. I do these FPGA projects in my spare time and I still consider myself a novice.

Jungle Hunt will work, I just didn't create the files as I didn't really see the point (as it is virtually identical to Jungle King). I'll do that now.

@Human0Target
Copy link

Thanks @antongale with the constrained timing, everything seems to work perfectly again. Appreciate the effort

@agg23
Copy link

agg23 commented Sep 3, 2023

That's extremely good to hear, and that goes towards confirming my theory that these chips are in spec, they just are less over spec than other chips.

@antongale, did you change anything besides the clock constraints I listed above?

@Human0Target
Copy link

@agg23 yeah, I suspect the new spin of the cyclone V is potentially on a slightly different process, which has messed with the timing(s)

not sure if faster or slower though, definitely different from the old spin.

I’m feeling more inspired to have a go at porting some cores to the AP now though, thanks to yourself and @antongale

@agg23
Copy link

agg23 commented Sep 3, 2023

Off topic, but you should join the FPGAming Discord server. Most of the relevant devs are there, and we're quite happy to answer questions. You might find https://github.com/agg23/analogue-pocket-utils and the corresponding wiki a good place to start.

@antongale
Copy link
Owner

@antongale, did you change anything besides the clock constraints I listed above?

I did not, just changed the SDC and re-compiled.

@antongale
Copy link
Owner

Jungle King & Jungle Hunt have been added to the games list.

@Atariboy1982
Copy link
Author

Atariboy1982 commented Sep 4, 2023

My Pocket actually is one of those that Analogue shipped late 2022 (i.e., the 2nd batch after the Group A preorders had shipped at launch). It wasn't one the new 2023 models that have been shipping recently with apparently some revisions. It might still have the newer Cyclone V inside of it though.

I now wonder if any of my issues are actually due to faulty hardware (albeit hardware that perhaps is closer to the edge of being in-spec than most Pockets are). They're fairly limited issues for the most part, but mostly repeatable like this one was.

One odd one is with the Eric Lewis Genesis core. If I fire that up, games have immediate issues (doesn't matter if I just started my Pocket or enter it an hour after turning the Pocket on). But if I fire up the Spiritualized Genesis core and then switch back, the Lewis core works perfectly (I like his dither filtering so I tend to use it instead of the Spiritualized core).

And your NES and SNES cores will occasionally also do that for me, Agg. Not 100% of the time like the Genesis core, but here and there I'll notice issues soon upon firing one up (My Arwing will start taking damage exiting the hangar during the launch sequence in Star Fox for instance). But if I switch cores and switch back, they'll work perfectly when this happens.

For an isolated issue that I recall that isn't a known bug, I had a weird moment in Q Bert arcade that I've mentioned on the Open FPGA Discord channel. I was just playing NES Zelda (I forget if it was your core or the Spiritualized core) and switched to Q Bert arcade. About level 10 the screen went crazy, NES Zelda appeared for several seconds, and then the core calmed down and I resumed playing Q Bert. Hasn't happened since. This core is a bit of the rough side with known graphical and audio issues, but could it cause a glitch like this?

I solved some problems on my own at least. One night GBA games were having issues via the OpenFPGA core. Hasn't happened since. Neo Geo also had severe issues. I wiped my card, formatted it, and started over which cured these two problems.

@Human0Target
Copy link

Human0Target commented Sep 4, 2023

Hmmm, I don’t suppose anyone knows the part number of the cyclone V in the “older” APs… mine is a 5CEBA4F23C8N manufactured 7 week of 23. I did find a tear down of one from last year on YT, but can’t see the part number of the Cyclone V. After some further googling, I found a hires image of the board, cyclone V is the same model (although 37w 2019 dated) boards appear identical, so I don’t think the issue discovered is due an intentional difference spec part.

although (and I think this is interesting to note) in the tear down video, there is a whacking great thermal pad on the cyclone V, in my AP there isn’t one. I wonder if thermal throttling is the reason that the timing is off. I’m leaning towards either cost reduction removing the thermal pad, or (and more likely) a different process node in the newer cyclone V batches has messed with the timing slightly.

@agg23
Copy link

agg23 commented Sep 4, 2023

Thermal throttling is not something FPGAs do (at least not low level ones such as these) (as an aside, you can get them quite hot if you build the right testbench; I know someone who does this).

The 5CEBA4F23C8N is the correct chip. Analogue did not change anything significant with their hardware, and you have not received devices that were (intentionally) binned or benched poorly.

@MilanPolle
Copy link

I experienced the exact same problems with Jungle King and Pirate Pete, as well as graphics corruption in Wild Western, Time Tunnel, Space Cruiser, High Way Race and Bio Attack. The beta file linked earlier fixes all of this.

@Glorkbot
Copy link

Glorkbot commented Dec 3, 2023

#2 (comment)
I was having the exact same problem. My analogue pocket shipped in mid 2023. Swapping out the file you linked to in the post above fixed my issues. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants