antongale / arcade-taitosj

Taito System SJ Analogue Pocket Core
GNU General Public License v3.0
8 stars 0 forks source link

Graphical bugs on Analogue Pocket #2

Open Atariboy1982 opened 1 year ago

Atariboy1982 commented 1 year ago

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

antongale commented 1 year ago

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 commented 1 year ago

Hi, thanks for responding to my issue.

It's happening in handheld mode (I don't yet have a dock). The behavior is consistent for me. The only guess people had in the FPGAming Discord is that there's something wrong with the roms that the updater I use was pulling down (RetroDriven). Is there any chance that could be it?

Worth noting as well that I deleted the core and assets folder and reinstalled the night that I reported this, but no change happened.

I do have some odd "quirks" with my Pocket in OpenFPGA (not with original cartridges) that I should note. Some have been cleared by deleting and reinstalling (I was having tons of issues with Neo Geo before doing that) while some other oddities persist. For instance if I fire up the Pocket and go directly into the Eric Lewis core for the Genesis, I'll have glitches or crashes. Yet if I then exit, fire up the semi official Genesis core, and then return back to the alternative Eric Lewis Genesis core, it consistently runs games just fine (makes no sense whatsoever, yet I can reliably reproduce the behavior just the same).

The one thing that I haven't done is to try out an alternative micro SD card. This one was bought brand new for my Pocket direct from Amazon (not a 3rd party or fulfilled by Amazon vendor) and is a name brand 256 gb Sandisk card. I did however do a full reformat and started fresh a few months ago with my installs.

While I'm thinking it's highly unlikely to be your code (it's working for yourself and others, obviously) and I'm skeptical that it's a RetroDriven issue since it's a popular updater and others should be encountering the same issue while I'm seemingly alone, I'd still appreciate it if you had any sort of idea of what the heck might be going on that I could try for some of these issues in certain cores that only seem to be popping up for me?

Most run perfect always for me like the Jotego arcade cores and the Spiritualized cores (and like I said, real GB/GBC/GBA cartridges always work fine), so I don't think it's a faulty Pocket.

On Wed, Jul 12, 2023 at 10:58 AM Anton Gale @.***> wrote:

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.

— Reply to this email directly, view it on GitHub https://github.com/antongale/arcade-taitosj/issues/2#issuecomment-1632700883, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOQUT2WKJJT6VUACR6P27NTXP23STANCNFSM6AAAAAA2FM7PFI . You are receiving this because you authored the thread.Message ID: @.***>

Atariboy1982 commented 1 year ago

I tried a different micro SD card. Same issue.

I'll try a different updater later and see what happens.

On Wed, Jul 12, 2023 at 1:57 PM Leo @.***> wrote:

Hi, thanks for responding to my issue.

It's happening in handheld mode (I don't yet have a dock). The behavior is consistent for me. The only guess people had in the FPGAming Discord is that there's something wrong with the roms that the updater I use was pulling down (RetroDriven). Is there any chance that could be it?

Worth noting as well that I deleted the core and assets folder and reinstalled the night that I reported this, but no change happened.

I do have some odd "quirks" with my Pocket in OpenFPGA (not with original cartridges) that I should note. Some have been cleared by deleting and reinstalling (I was having tons of issues with Neo Geo before doing that) while some other oddities persist. For instance if I fire up the Pocket and go directly into the Eric Lewis core for the Genesis, I'll have glitches or crashes. Yet if I then exit, fire up the semi official Genesis core, and then return back to the alternative Eric Lewis Genesis core, it consistently runs games just fine (makes no sense whatsoever, yet I can reliably reproduce the behavior just the same).

The one thing that I haven't done is to try out an alternative micro SD card. This one was bought brand new for my Pocket direct from Amazon (not a 3rd party or fulfilled by Amazon vendor) and is a name brand 256 gb Sandisk card. I did however do a full reformat and started fresh a few months ago with my installs.

While I'm thinking it's highly unlikely to be your code (it's working for yourself and others, obviously) and I'm skeptical that it's a RetroDriven issue since it's a popular updater and others should be encountering the same issue while I'm seemingly alone, I'd still appreciate it if you had any sort of idea of what the heck might be going on that I could try for some of these issues in certain cores that only seem to be popping up for me?

Most run perfect always for me like the Jotego arcade cores and the Spiritualized cores (and like I said, real GB/GBC/GBA cartridges always work fine), so I don't think it's a faulty Pocket.

On Wed, Jul 12, 2023 at 10:58 AM Anton Gale @.***> wrote:

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.

— Reply to this email directly, view it on GitHub https://github.com/antongale/arcade-taitosj/issues/2#issuecomment-1632700883, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOQUT2WKJJT6VUACR6P27NTXP23STANCNFSM6AAAAAA2FM7PFI . You are receiving this because you authored the thread.Message ID: @.***>

antongale commented 1 year ago

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 commented 1 year ago

Thanks

I'm all but convinced that it's got to be an issue with my Pocket. Hopefully Analogue's customer support will be able to assist.

On Thu, Jul 13, 2023 at 4:31 PM Anton Gale @.***> wrote:

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.

— Reply to this email directly, view it on GitHub https://github.com/antongale/arcade-taitosj/issues/2#issuecomment-1634870830, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOQUT2UNOD2MDFQZGATU2PLXQBLLVANCNFSM6AAAAAA2FM7PFI . You are receiving this because you authored the thread.Message ID: @.***>

Atariboy1982 commented 1 year ago

I tried my last hope which was using a different updater. As expected I had no change. So I'm off to Analogue support to request repairs.

Thanks for your help with this issue. I think you can safely consider my problem as closed (it obviously is some internal fault with my system that is causing my issues).

-Leo

On Thu, Jul 13, 2023 at 7:48 PM Leo @.***> wrote:

Thanks

I'm all but convinced that it's got to be an issue with my Pocket. Hopefully Analogue's customer support will be able to assist.

On Thu, Jul 13, 2023 at 4:31 PM Anton Gale @.***> wrote:

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.

— Reply to this email directly, view it on GitHub https://github.com/antongale/arcade-taitosj/issues/2#issuecomment-1634870830, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOQUT2UNOD2MDFQZGATU2PLXQBLLVANCNFSM6AAAAAA2FM7PFI . You are receiving this because you authored the thread.Message ID: @.***>

Human0Target commented 1 year ago

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 commented 1 year ago

@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 commented 1 year ago

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

agg23 commented 1 year ago

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 commented 1 year ago

@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 commented 1 year ago

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 commented 1 year ago

@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 commented 1 year ago

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

agg23 commented 1 year ago

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 commented 1 year ago

@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 commented 1 year ago

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 commented 1 year ago

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

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

antongale commented 1 year ago

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

Atariboy1982 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 10 months ago

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 commented 9 months ago

https://github.com/antongale/arcade-taitosj/issues/2#issuecomment-1704381493 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!