-
-
Notifications
You must be signed in to change notification settings - Fork 37
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
karnov/cps1/cps15: blank screen #324
Comments
public working version is 46ba76a |
Fixed in 1e5a491. The problem was that the SDRAM was doing a write access with the write mask at 'b11 (disabled). That happened as the ram_cs was active when AS was asserted and the access was registered there but UDS/LDS are asserted later. |
is there a way to try this commit yet? |
Karnov public version is 46ba76a. At that time the repository used JTFRAME as a submodule, so it is hard to switch between the current commit (JTFRAME as a folder) and the old one. |
|
Sometimes comparing with the working version is an easy way to find the problem. You can save the waveforms in the two versions and compare. If you convert a few critical waveforms to VCD, you can use These M68000 games are very sensitive to how the DTACK signal is generated. Even though the generation should be straight forward, I've found all sort of odd sensitivites over the years. I think we broke this game when we fixed Cotton in System 16B, by modifying the DTACK generation. Dynamite Dux also had a weird DTACK sensitivity #279 and so did Shinobi. So it is always scary to touch that module. Yet, the same module should work for all games. There is no technical justification for requiring two different versions of it. |
I'm a bit lost in the SDRAM controller, there are so many components... I followed the data to jtframe_ram_rq:u_slot0: Also there's a case when dout reflects wrdata during write, and another case it's not. So I guess I have to understand the logic first. |
Also there's 'we' and 'wrin' inputs, but what's the difference? I see we arrives later then wrin, then the module acts on wrin. |
This core is a bit unusual in the sense that it writes to SDRAM bank 3, rather than 0. There is a macro to enable that JTFRAME_BA3_WEN But it might be failing. You can easily move it to bank 0 by dragging those lines in mem.yaml up to the bank 0 part, where the main CPU ROM is. I think I tried that the last time I looked at this. But I don't remember well. Maybe it's written in this issue log. That's the only funny thing I can think of related to the SDRAM as writes to banks other than the zero have not been used elsewhere as far as I remember. |
I noticed that macro. As now I went up to the top with the jtframe_ramx_xslot signals, the next step is to move into the real sdram controller. |
BTW, CPU ROM and RAM logically should be put to the same bank, as there can be no overlapped access between the two. |
Looks like objram_cs for writes goes to BRAM? Then why obj_cs goes to jtframe_ram1_2slots? |
BTW, the game has music, and it seems to run...just without any graphics. |
I just died three times, I got endgame tune :D Now it's in demo mode...with a full black screen. |
Ah, obj_cs is for tilemap data...then probably it's not written into bank3 during programming. |
Here's the diff which makes the CPU RAM OK (also makes Verilator/FPGA behavior match):
Meanwhile obj_cs is never asserted during the running game, obj_addr is always 0. Maybe VRAM/Sprite RAM writes are bad (but they're in BRAM). |
Very good progress! If look at the log:
And if you compare those two commits, the sdram controller was not touched. Indeed the only common file was the DTACK generation. Maybe the new DTACK unveiled a weakness in the controller? Did you check that Verilator sims still work after the change? Do you get video in the sims? |
I got this with f6995e3: I didn't check anything with simulator yet. |
Recompile jtframe each time you change to an old (or new) commit. Just type |
It's surely something with the address decoder, as CPU write to 80000 doesn't trigger objram_we at all. |
Well, if dsn is low active, then this:
won't work. |
This one does the job well:
Now Karnov kills! |
What I noticed in the game that sprites are 'dancing' during horizontal scroll. I saw similar thing in Sega System1, where the sprite X position had to be rounded: |
Excellent news! The *_we assignments were wrong indeed. Looking at the git log, I think the write signals had been merged in the mem template before and when I consolidated all repos into one, this mismatch between the mem template and the core occured and this regression error appeared. That's why I've been trying to have regression tests for a year! Thanks a lot for finding this. DTACK had nothing to do in the end. The sprite dancing should be related to when the object table buffer is updated. I think that rounded the X position is the wrong solution. Games normally write the sprite data to a table that needs to be copied into the rendering stage at a specific time. What controls that is system dependent. Also, some games in some systems do it wrong due to bad software, not bad hardware. Once we close this issue, I think it's worth it opening a different one to review the sprite DMA. |
Simulation is not working for me for karnov/chelnov. Can you double check on your end please? |
It still works with current master:
|
Did you check the output in the frames folder? I only get a blank first frame. |
I got two files, frame_00001 and frame_00027, the first is blank, the second is good (high scores on it). |
By default, you only get a new image file when it is different from the previous one in order not to flood the folder and your eyes with irrelevant information. I am stuck at frame_00001. Can you please try going through the load process: |
BTW, I copied the .rom file by hand to jtcores/rom, as it wrote 'cannot produce chelnov.rom' |
Things to check:
|
Thank you. I'll check it further on my end. |
Just a question: what macro adds core_mod[2] to the MRA? I think it's missing in 1943, even the OSD is rotated in the wrong direction with current master (and old MRA). Comparing with 1942 (which has 5) I don't see any obvious macro to affect this. ..but probably rotation things could belong a new issue. |
core_mod
Most core_mod bits are derived from MAME. Some games produce a flip bit that means the opposite as in MAME. In that case If there's something to fix, let's move it to a different issue. |
it looks like after the recent change to jtframe_68kdtack, jtkarnov does not boot correctly (both Karnov and Chelnov). Seen in c874ac4 and probably started with the jtframe_68kdtack change.
It affects
The text was updated successfully, but these errors were encountered: