PC Engine core

https://github.com/MiSTer-devel/Main_MiSTer/wiki

Moderators: Mug UK, Zorro 2, spiny, Greenious, Sorgelig, Moderator Team

GreyRogue
Atari freak
Atari freak
Posts: 53
Joined: Thu Mar 22, 2018 3:50 am

Re: PC Engine core

Postby GreyRogue » Wed Sep 12, 2018 12:49 am

Sorgelig wrote:
GreyRogue wrote:Fixed in latest pull request (Reading VDC register 0x1 should always read 0, not 0xFF).

I've also tried to fix it but unsuccessfully since i've tried to understand why INT_MASK reading prevented Aoi game to run.

By the way, i've added Q13 project files to this core. So, you can install Quartus 13 web edition and compile the Lite version twice faster!
I don't know if you use SignalTap or not, but In Q16+ versions it's kind of broken as Storage qualifier doesn't work reliably. So, Q13 version provides better SignalTap experience.

Yeah, the Aoi game was a case of two wrongs making a right. Fixing the INT_MASK made the other error show up.
I haven't been able to download Quartus 13 yet. Actually, I downloaded Quartus 13.0 and then realized I needed 13.1, and I haven't been able to get it to download yet. I guess they decided the first couple GBs was enough for now...

Sorgelig wrote:There are 2 types of R-Type ROMs:
1) R-Type Japan comes as 2 separate parts with 256KB each - looks OK.
2) R-Type USA comes in a single 512KB ROM - it works OK, but sprites are dull.. like with missing bitplanes. Playfield looks OK.

What it can be? Different USA/Japan regions have some differences in HW? Or it's game protection to prevent it play correctly on foreigner HW?

Fixed the Sprite Width setting for "10", which is functionally equivalent to "01". The Japanese version uses "00", which reads the data twice as fast, but as long as the Sync width is long enough to get the data, it shouldn't matter which one is used ("11" is different and only reads two out of four planes, which is what is was doing for "10").

Sorgelig wrote:Scandoubler delays the data by 2 lines. Also, to make sure of correct work of HDMI scaler, one blanking line is required before VSync. Some cores don't provide enough blanking. Hence 3 lines delay.
Can you explain what's wrong with 3 lines delay? Did you try vso[2] instead? Vertical blanking is delayed by 2 lines as well, so delay VSync by 2 lines should make correct sync.

I just tried each of vso[0] through vso[3], and they all have the same issue with my monitor blanking out every couple of seconds. Only vs_in works for me. I'm building Lite builds and displaying through VGA. Using vso[1-3] also chops part of the image off for me (testing with the 240p Test Suite Overscan test). I'm not sure why. The code looks right to me, but I haven't dug into it.

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2380
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: PC Engine core

Postby Sorgelig » Wed Sep 12, 2018 2:00 am

GreyRogue wrote:I just tried each of vso[0] through vso[3], and they all have the same issue with my monitor blanking out every couple of seconds. Only vs_in works for me. I'm building Lite builds and displaying through VGA. Using vso[1-3] also chops part of the image off for me (testing with the 240p Test Suite Overscan test). I'm not sure why. The code looks right to me, but I haven't dug into it.


Change TOP_BL_LINES to 19 (real blanking from 6270 is anyway longer than current 17 lines) and try again vso[2] and vso[3]. It seems your monitor need longer vertical blanking.
By the way, this core has shifted video to much to the left. Actually, it doesn't matter on HDMI output, but on VGA it's not correct. Probably 6270 uses incorrect horizontal offsets.

GreyRogue wrote:Fixed the Sprite Width setting for "10", which is functionally equivalent to "01". The Japanese version uses "00", which reads the data twice as fast, but as long as the Sync width is long enough to get the data, it shouldn't matter which one is used ("11" is different and only reads two out of four planes, which is what is was doing for "10").

Hmm. I didn't notice any change in R-Type. Still the same sprites. Even Animated title "R-TYPE" still has darker "TYPE" letters.

GreyRogue
Atari freak
Atari freak
Posts: 53
Joined: Thu Mar 22, 2018 3:50 am

Re: PC Engine core

Postby GreyRogue » Wed Sep 12, 2018 2:28 am

Sorgelig wrote:Change TOP_BL_LINES to 19 (real blanking from 6270 is anyway longer than current 17 lines) and try again vso[2] and vso[3]. It seems your monitor need longer vertical blanking.
By the way, this core has shifted video to much to the left. Actually, it doesn't matter on HDMI output, but on VGA it's not correct. Probably 6270 uses incorrect horizontal offsets.
Hmm. I didn't notice any change in R-Type. Still the same sprites. Even Animated title "R-TYPE" still has darker "TYPE" letters.

I just tried R-Type again, and it looks right to me. Before the change the TYPE letters were dark. After the change, they matched the coloring of R. The other sprites look more colorful, too.

Just pushed a timer fix, which fixes Battle Royal. Also adjusted VSW, because it uses a VSW of 0, and subtracting 2 wasn't working right.

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2380
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: PC Engine core

Postby Sorgelig » Wed Sep 12, 2018 2:45 am

GreyRogue wrote:I just tried R-Type again, and it looks right to me. Before the change the TYPE letters were dark. After the change, they matched the coloring of R. The other sprites look more colorful, too.

that was my mistake - loaded wrong SOF file.
R-Type USA looks ok now.

albconde
Atari User
Atari User
Posts: 38
Joined: Thu Nov 30, 2017 8:56 am

Re: PC Engine core

Postby albconde » Wed Sep 12, 2018 2:09 pm

"yo ,bro" vertical center problem is fixed, but now in Ghost Manor flick all the screen.
Almost all the games allow you to start game, some with some graphic errors by badly drawn lines, or some flicker, but the improvements in the last weeks are impressive.

The only games in which I have not been able to start playing:
After Burner : fails after 3 or 4 seconds when load the game
Talespin : fails on the first screen
Populus: fails to start a new game (there should be an options menu)
Puzzle boy : black screen and music sounds very fast.
fighting run: has serious problems with sprites.

In out run some sounds are missing, such as the background effect when selecting music, or the sound of accidents.
Thank for you work

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2380
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: PC Engine core

Postby Sorgelig » Wed Sep 12, 2018 2:29 pm

Populus requires a special mapping with additional 32KB RAM.

GreyRogue
Atari freak
Atari freak
Posts: 53
Joined: Thu Mar 22, 2018 3:50 am

Re: PC Engine core

Postby GreyRogue » Thu Sep 13, 2018 4:07 am

albconde wrote:Talespin : fails on the first screen
Puzzle boy : black screen and music sounds very fast.

Puzzle Boy had an issue with the vertical display calculation underflowing.
Talespin had an issue with the sprite DMA timing, and reading the VDC busy status.

Both are fixed in the latest pull request.

Sorgelig wrote:Last Pull Request improved Blazing Lazers a lot! Before it was often crashed after some bosses. For example first or second boss on level 9 would definitely corrupt the graphics and then crash.
Now it's very seldom. For the whole game from level 1, there was corruption at the end of Level 2, but self-recovered, and at the level 9 it was crashed finally. Before this PR it was lucky to pass just 2 levels without crash. So, the changes you did in last PR are related to Blazing Lazers stability. Probably the same problem affected Robo-Kid garbage.

How often does this still happen in Blazing Lazers? I just played through level 9 and it didn't happen once (the fixes for Talespin might have affected this).

BBond007
Atari User
Atari User
Posts: 41
Joined: Wed Feb 28, 2018 3:23 am

Re: PC Engine core

Postby BBond007 » Thu Sep 13, 2018 4:26 am

Thanks! This is definitely one of my favorite cores.

I read about the Turbografx 16 in various gaming magazines back in the day, but I never encountered anyone who actually owned one.

I remember many reviews saying that it was not a true 16 bit system. If that is true then it has to be the best 8-bit ever :)

The sprites seem huge and the colors really pop. I like it.

Is adding CD support difficult?

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2380
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: PC Engine core

Postby Sorgelig » Thu Sep 13, 2018 10:29 am

I've implemented SuperGrafx mode. Currently it's always enabled. Not sure if OSD option is required to enable/disable. Need to test the games.

Tested "1941 - Counter Attack" and "Aldynes" - both work!

GreyRogue wrote:How often does this still happen in Blazing Lazers? I just played through level 9 and it didn't happen once (the fixes for Talespin might have affected this).

I will test it. Even in cheat mode it still needs a lot of time :)
Btw, "Coryoon - Child of Dragon" game crashes on start with squeezed screen while demo mode works fine.

BBond007 wrote:The sprites seem huge and the colors really pop. I like it.

The first thing i've also noticed are unusual huge sprites on this console. Very impressive.

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2380
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: PC Engine core

Postby Sorgelig » Thu Sep 13, 2018 11:29 am

Played the whole Blazing Lazers and no corruptions encountered.
So, it seems fully fixed for this game.

albconde
Atari User
Atari User
Posts: 38
Joined: Thu Nov 30, 2017 8:56 am

Re: PC Engine core

Postby albconde » Thu Sep 13, 2018 11:34 am

Quick test on supergrafx
Only 6 games for the system
1941 works
Darius plus : works some misplaced lines
Daimakaimura ( Ghouls and Ghost ) : Works
Battle ACe : Works
Aldynes : works
Maduouo Granzort : not work problem with the graphigs

Pcengine:
tested the last changes, some good things and some bad
in general there is less flicker in some sprites, where more is noticeable in the game "donwload".
In gomola, the logo now looks correct
In "rastan saga 2" you do not see some sprites, the same in "drop off"
"Talespin" works perfectly, "puzzle boy" starts now, but does not show some sprites in game
Last edited by albconde on Thu Sep 13, 2018 3:24 pm, edited 2 times in total.

albconde
Atari User
Atari User
Posts: 38
Joined: Thu Nov 30, 2017 8:56 am

Re: PC Engine core

Postby albconde » Thu Sep 13, 2018 12:11 pm

Sorgelig wrote:Btw, "Coryoon - Child of Dragon" game crashes on start with squeezed screen while demo mode works fine.

crash if you pulse run to skip intros in game, if you wait the game works , at least the first level
Last edited by albconde on Thu Sep 13, 2018 2:42 pm, edited 1 time in total.

User avatar
Newsdee
Atari God
Atari God
Posts: 1169
Joined: Fri Sep 19, 2014 8:40 am

Re: PC Engine core

Postby Newsdee » Thu Sep 13, 2018 2:14 pm

Wow! Amazing progress!

The Supergrafx is completely backwards compatible with the older PC Engine. In theory one could get a SuperGrafx with a CD extension to play the entire library of games, but the CD addon is notoriously weak and prone to failure. So people recommend the Duo units instead, giving up those 6 games (and RGB out without hardware mods) but gaining a more reliable drive and console.

I have a real SuperGrafx and Japanese Duo, so let me know if there is anything you'd like me to test.

User avatar
cvenditti
Atari maniac
Atari maniac
Posts: 83
Joined: Sun Nov 19, 2017 12:45 am

Re: PC Engine core

Postby cvenditti » Thu Sep 13, 2018 2:56 pm

Newsdee wrote:, but the CD addon is notoriously weak and prone to failure. So people recommend the Duo units instead, giving up those 6 games (and RGB out without hardware mods) but gaining a more reliable drive and console.


Or you can have Supergrafx + Super SD System 3 (the https://shop.terraonion.com/en/pc-engin ... ngine.html) (just $240 :lol: )
I already have the Supergrafx, just waiting on the Super SD System 3 to go down in price

Newsdee, Did you ever research for a FPGA implementation of the CD add-on? I tried with no luck.

Cyril

User avatar
Newsdee
Atari God
Atari God
Posts: 1169
Joined: Fri Sep 19, 2014 8:40 am

Re: PC Engine core

Postby Newsdee » Thu Sep 13, 2018 4:01 pm

cvenditti wrote:Newsdee, Did you ever research for a FPGA implementation of the CD add-on? I tried with no luck

There is nothing that I know of unfortunately. The closest I could find is this repository for Dreamcast optical media: https://github.com/zeldin/iceGDROM

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2380
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: PC Engine core

Postby Sorgelig » Thu Sep 13, 2018 5:31 pm

1941 has strange graphics bug: white flash (on title and when you throw the bomb) doesn't apply to main screen, but only on border.
I've thought it's HUC6202 implementation bug, but after connecting VDC0 to VCE directly i see the same problem.
So, it's probably bug in VDC code.

User avatar
cvenditti
Atari maniac
Atari maniac
Posts: 83
Joined: Sun Nov 19, 2017 12:45 am

Re: PC Engine core

Postby cvenditti » Fri Sep 14, 2018 1:47 am

Newsdee wrote:There is nothing that I know of unfortunately.
Too bad, here is some info on the Turbo Duo: https://console5.com/wiki/Turbo_Duo

User avatar
Newsdee
Atari God
Atari God
Posts: 1169
Joined: Fri Sep 19, 2014 8:40 am

Re: PC Engine core

Postby Newsdee » Fri Sep 14, 2018 2:00 am

cvenditti wrote:
Newsdee wrote:There is nothing that I know of unfortunately.
Too bad, here is some info on the Turbo Duo: https://console5.com/wiki/Turbo_Duo


I found this page with schematics for various systems, but no info on the CD:
https://gamesx.com/wiki/doku.php?id=sch ... schematics

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2380
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: PC Engine core

Postby Sorgelig » Fri Sep 14, 2018 6:10 am

GreyRogue wrote:Both are fixed in the latest pull request.


there is a strange usage CG member of SP_PREBUF structure in 6270 without assigning the value. Similar variable SP_CG is assigned but not used. Can you check since you are more familiar with VDC if there is some bug in the code or simply the whole code related to SP_PREBUF.CG should be removed.

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2380
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: PC Engine core

Postby Sorgelig » Fri Sep 14, 2018 7:19 am

For Coryoon, as albconde mentioned, just don't press RUN on screens displaying stage number and game will work. I've tested on Level 1 and 2 - both times worked.

GreyRogue
Atari freak
Atari freak
Posts: 53
Joined: Thu Mar 22, 2018 3:50 am

Re: PC Engine core

Postby GreyRogue » Fri Sep 14, 2018 1:03 pm

Sorgelig wrote:
GreyRogue wrote:Both are fixed in the latest pull request.


there is a strange usage CG member of SP_PREBUF structure in 6270 without assigning the value. Similar variable SP_CG is assigned but not used. Can you check since you are more familiar with VDC if there is some bug in the code or simply the whole code related to SP_PREBUF.CG should be removed.

I believe the SP1_LEFT and SP1_RIGHT sections should both have this line:
SP_PREBUF(conv_integer(SP_NB(3 downto 0))).CG <= SP_CG;
Bit 0 of Word 2 for each Sprite in the SAT is the CG bit, which controls which bit planes are read in DW mode 3 (which only reads half the planes). The rest of the logic using this looks correct to me. I don't know if any games use this or not, but the behavior matches pcetech.txt. Setting it in both Left and Right means double width sprites will both use it.

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2380
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: PC Engine core

Postby Sorgelig » Fri Sep 14, 2018 1:32 pm

Ok. I will add it to the code.

albconde
Atari User
Atari User
Posts: 38
Joined: Thu Nov 30, 2017 8:56 am

Re: PC Engine core

Postby albconde » Fri Sep 14, 2018 1:52 pm

tested the last changes, some of the badly drawn lines are correctec now.
The fix of the talespin , fix some things and broke others.
If you undo the change, for example "madoo granzort" of supergraft seems to work with some graphics problems in the lower part of the screen ,and fix some mising sprites in others games, but talespin fail , and there are flicker in download.

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2380
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: PC Engine core

Postby Sorgelig » Fri Sep 14, 2018 2:09 pm

albconde wrote:If you undo the change,

which change?

albconde
Atari User
Atari User
Posts: 38
Joined: Thu Nov 30, 2017 8:56 am

Re: PC Engine core

Postby albconde » Fri Sep 14, 2018 2:30 pm

commit :d8366c39e7aab6fb403922b8725631fbabcda2db
Fix VDC Busy Status Bit and Sprite DMA timing.
All changes


Return to “MiSTer”

Who is online

Users browsing this forum: No registered users and 3 guests