Minimig (Amiga) core discussion

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

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

ijor
Hardware Guru
Hardware Guru
Posts: 3854
Joined: Sat May 29, 2004 7:52 pm
Contact:

Re: Minimig (Amiga) core discussion

Postby ijor » Tue Nov 12, 2019 1:13 pm

Sorgelig wrote:Just tried UNLK A7 in HRTMon and didn't find the problem. Also tried it in 68020 mode and got the same result. Can it be a bug of cputest? Unfortunately your report file doesn't include the dump from SP memory, so there is not enough input/output info to judge.


I can't run cputester on real hardware. But I confirmed that the FX68K UNLK A7 behavior is correct. Might be a cputest bug, or might be the data file is corrupt (or a bug on the data test generator)?

Can somebody run cputester UNLK on real hardware just in case?
Fx Cast: Atari St cycle accurate fpga core

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5377
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Minimig (Amiga) core discussion

Postby Sorgelig » Tue Nov 12, 2019 1:43 pm

ijor wrote:The Z flag on division overflow was fixed recently. Previously it might be correct or not depending on the compilation build.

race condition? Can it be fixed for determined build?

ijor
Hardware Guru
Hardware Guru
Posts: 3854
Joined: Sat May 29, 2004 7:52 pm
Contact:

Re: Minimig (Amiga) core discussion

Postby ijor » Tue Nov 12, 2019 3:14 pm

Sorgelig wrote:
ijor wrote:The Z flag on division overflow was fixed recently. Previously it might be correct or not depending on the compilation build.

race condition? Can it be fixed for determined build?


Yes, of course, it was fixed recently. Now you will (should) always get the correct behavior on every build. Please update your fork.
Fx Cast: Atari St cycle accurate fpga core

User avatar
rsn8887
Atariator
Atariator
Posts: 25
Joined: Mon Nov 11, 2019 7:20 pm

Re: Minimig (Amiga) core discussion

Postby rsn8887 » Tue Nov 12, 2019 5:43 pm

Am I reading the posts here correctly that the most compatible options for A1200 mode would be
Kickstart Cache: On
D-Cache: On
Chipmem Cache: On

I left these off by default, but I guess I should turn all of them on for better A1200 performance?

dBUGBUG
Atarian
Atarian
Posts: 9
Joined: Wed Jan 03, 2018 8:07 am

Re: Minimig (Amiga) core discussion

Postby dBUGBUG » Tue Nov 12, 2019 8:05 pm

slingshot wrote:
dBUGBUG wrote:Any possibility updates to MiSTer comes back to MiST ?

What updates do you think about? Fast RAM in DDR3, or what?


No I guess thats not possible, more like compatibility fixes like Diggers AGA crashes with a white screen etc, plus the new 68K CPU core.

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5377
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Minimig (Amiga) core discussion

Postby Sorgelig » Wed Nov 13, 2019 12:17 am

rsn8887 wrote:Am I reading the posts here correctly that the most compatible options for A1200 mode would be
Kickstart Cache: On
D-Cache: On
Chipmem Cache: On

I left these off by default, but I guess I should turn all of them on for better A1200 performance?

For 68020 at least cache for Kickstart and Chipmem must be enabled. D-Cache gives more boost but more like 68030 match.

Actually, with current version, cache option is redundant. It must be disabled for 68000 mode (already done) and always enabled in 68020 mode. So basically it should follow the CPU option.

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5377
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Minimig (Amiga) core discussion

Postby Sorgelig » Wed Nov 13, 2019 12:30 am

ijor wrote:
Sorgelig wrote:
ijor wrote:The Z flag on division overflow was fixed recently. Previously it might be correct or not depending on the compilation build.

race condition? Can it be fixed for determined build?


Yes, of course, it was fixed recently. Now you will (should) always get the correct behavior on every build. Please update your fork.

Somehow i've missed this update.

apolkosnik
Atari freak
Atari freak
Posts: 69
Joined: Sat May 18, 2019 3:20 pm

Re: Minimig (Amiga) core discussion

Postby apolkosnik » Wed Nov 13, 2019 1:27 am

dBUGBUG wrote:
slingshot wrote:
dBUGBUG wrote:Any possibility updates to MiSTer comes back to MiST ?

What updates do you think about? Fast RAM in DDR3, or what?


No I guess thats not possible, more like compatibility fixes like Diggers AGA crashes with a white screen etc, plus the new 68K CPU core.

Diggers AGA seems to crash on the unimplemented CMP2.W (A5),D2 instruction in the Introduction part.
Last edited by apolkosnik on Wed Nov 13, 2019 1:36 am, edited 1 time in total.

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5377
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Minimig (Amiga) core discussion

Postby Sorgelig » Wed Nov 13, 2019 1:31 am

apolkosnik wrote:Diggers AGA seems to crash on the unimplemented CMP2.W instruction in the Introduction part.

you can play with M68K implementation in Minimig. it has cmp2 implemented but also has other bugs you can try to fix.

apolkosnik
Atari freak
Atari freak
Posts: 69
Joined: Sat May 18, 2019 3:20 pm

Re: Minimig (Amiga) core discussion

Postby apolkosnik » Wed Nov 13, 2019 1:42 am

Sorgelig wrote:
apolkosnik wrote:Diggers AGA seems to crash on the unimplemented CMP2.W instruction in the Introduction part.

you can play with M68K implementation in Minimig. it has cmp2 implemented but also has other bugs you can try to fix.

Do I just need to uncomment the define in cpu_wrapper to build with M68K for the 68020 mode?

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5377
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Minimig (Amiga) core discussion

Postby Sorgelig » Wed Nov 13, 2019 2:32 am

apolkosnik wrote:
Sorgelig wrote:
apolkosnik wrote:Diggers AGA seems to crash on the unimplemented CMP2.W instruction in the Introduction part.

you can play with M68K implementation in Minimig. it has cmp2 implemented but also has other bugs you can try to fix.

Do I just need to uncomment the define in cpu_wrapper to build with M68K for the 68020 mode?

yep.

apolkosnik
Atari freak
Atari freak
Posts: 69
Joined: Sat May 18, 2019 3:20 pm

Re: Minimig (Amiga) core discussion

Postby apolkosnik » Wed Nov 13, 2019 2:40 am

dBUGBUG wrote:
slingshot wrote:
dBUGBUG wrote:Any possibility updates to MiSTer comes back to MiST ?

What updates do you think about? Fast RAM in DDR3, or what?


No I guess thats not possible, more like compatibility fixes like Diggers AGA crashes with a white screen etc, plus the new 68K CPU core.

This one is using the M68K core. I've tried Diggers, and it goes through Introduction part. First thing that jumped on cputester was addx.b -(a1),-(a1). It looks like that A1 only got predecremented once, and a0 received unexpected value. Now I'm running the full cputester cycle to log the broken parts, and will report back later.

cputester result attached.
You do not have the required permissions to view the files attached to this post.

User avatar
the80scomputers
Atariator
Atariator
Posts: 20
Joined: Sun Oct 06, 2019 8:29 am

Re: Minimig (Amiga) core discussion

Postby the80scomputers » Wed Nov 13, 2019 12:35 pm

This small problem is being consulted in the MiSTer (Main Core) thread but by the latest tests it seems that it is a exclusive bug carriered by Minimig from some earlier version.

The issue is that in version 20190923 and earlier, the mouse arrow moved correctly with the characteristic softness of Amiga systems. Subsequently, the arrow of the cursor stops when it is moved. In the following videos you see the problem:

https://youtu.be/_JGArSbMUF8
Minimig_20190923

https://youtu.be/sNeYu8Kao3E
Minimig_20191103

I think it looks good in the last video as the arrow when moving makes small leaps as a result of being braked for some reason.

It is not a serious problem but it is something shocking when you are used to the smoothness of Amiga's cursor.

I take this opportunity to thank you for your selfless dedication in this great project.

Thank you.

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5377
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Minimig (Amiga) core discussion

Postby Sorgelig » Wed Nov 13, 2019 2:57 pm

the80scomputers wrote:The issue is that in version 20190923 and earlier, the mouse arrow moved correctly with the characteristic softness of Amiga systems. Subsequently, the arrow of the cursor stops when it is moved. In the following videos you see the problem:

i've posted fix here: viewtopic.php?p=386516#p386516

User avatar
the80scomputers
Atariator
Atariator
Posts: 20
Joined: Sun Oct 06, 2019 8:29 am

Re: Minimig (Amiga) core discussion

Postby the80scomputers » Wed Nov 13, 2019 3:25 pm

Sorgelig wrote:
the80scomputers wrote:The issue is that in version 20190923 and earlier, the mouse arrow moved correctly with the characteristic softness of Amiga systems. Subsequently, the arrow of the cursor stops when it is moved. In the following videos you see the problem:

i've posted fix here: http://www.atari-forum.com/viewtopic.ph ... 16#p386516


The mouse pointer behaves correctly again. Thank you!

User avatar
rsn8887
Atariator
Atariator
Posts: 25
Joined: Mon Nov 11, 2019 7:20 pm

Re: Minimig (Amiga) core discussion

Postby rsn8887 » Wed Nov 13, 2019 6:37 pm

I love this core, thank you.

On my 16:9 HDMI monitor, the Workbench looks perfect, but many games appear quite small because games often don't use the full screen. There's nothing really wrong with that, after all the original Amiga also displayed these large borders in games.

But modern 16:9 screens have so much screen real estate. And we have these great HDMI filters like "bilinear_sharp.txt" now in Mister. Maybe a zoom mode for Amiga, similar to what we have in the C64 core, would be possible?

Since different games use different vertical screen areas, a zoom mode percentage and vertical offset option would be best. So things are a bit more involved than the fixed zoom on C64.

Here are the vertical lines for zoom modes I have used before in the UAE4All2 Switch and Vita emulator:

Code: Select all

192
200
216
224
240
256
270
286


For vertical offset, e.g. first displayed line, I used 0, 18 or 30. That covered most games. To cover all games, a quick option to move the screen up and down to center it with the dpad or cursor keys would be even better.

The vertical lines displayed should be zoomed to cover the vertical screen size (1080p on my monitor). The horizontal size is then determined by forcing the pixel aspect ratio to be correct (1:1 on Amiga?).

I have no clue how difficult this would be to implement into the current core. But since the C64 core already has a perfect zoom mode (I love it!), maybe a zoom mode for Amiga is also feasible?

In latest Retroarch PUAE core, the GitHub user Sonninnos managed to even implement an autozoom. It looks for first and last non-black raster line, and zooms and centers accordingly. This seems a bit involved though, and would probably harm performance.

ijor
Hardware Guru
Hardware Guru
Posts: 3854
Joined: Sat May 29, 2004 7:52 pm
Contact:

Re: Minimig (Amiga) core discussion

Postby ijor » Wed Nov 13, 2019 6:59 pm

ijor wrote:But I confirmed that the FX68K UNLK A7 behavior is correct. Might be a cputest bug, or might be the data file is corrupt (or a bug on the data test generator)?


Toni Wilen (cputest author) confirmed that he has seen the error himself sometimes, and that UNLK might issue a false error report. According to him it should work correctly if a test for UNLK alone is generated.

Anyway, I'm quite confident that the FX68K behavior when running UNLK SP is correct and it is quite easy to test. According to the official Motorola manual, UNLK is supposed to perform this sequence:

Code: Select all

An->SP,(SP)->An,SP+4->SP


So when An is also SP, the test should verify if the SP is incremented before or after getting the previous content of the stack. As it happens, the 68000 gets the old content of the stack and the increment is discarded (I can elaborate exactly why this happens if somebody is interested).

And this can be verified with the following code sequence:

Code: Select all

    1 T  00000000                      ; SP should be $4FFAFFFE after this sequence
    2 T  00000000                      start
    3 T  00000000 4FFAFFFE              lea start(pc),sp
    4 T  00000004 4E5F                  unlk sp


As commented on the code, SP should get the machine code of the first instruction.
Fx Cast: Atari St cycle accurate fpga core

apolkosnik
Atari freak
Atari freak
Posts: 69
Joined: Sat May 18, 2019 3:20 pm

Re: Minimig (Amiga) core discussion

Postby apolkosnik » Wed Nov 13, 2019 7:17 pm

ijor wrote:
ijor wrote:But I confirmed that the FX68K UNLK A7 behavior is correct. Might be a cputest bug, or might be the data file is corrupt (or a bug on the data test generator)?


Toni Wilen (cputest author) confirmed that he has seen the error himself sometimes, and that UNLK might issue a false error report. According to him it should work correctly if a test for UNLK alone is generated.

Anyway, I'm quite confident that the FX68K behavior when running UNLK SP is correct and it is quite easy to test. According to the official Motorola manual, UNLK is supposed to perform this sequence:

Code: Select all

An->SP,(SP)->An,SP+4->SP


So when An is also SP, the test should verify if the SP is incremented before or after getting the previous content of the stack. As it happens, the 68000 gets the old content of the stack and the increment is discarded (I can elaborate exactly why this happens if somebody is interested).

And this can be verified with the following code sequence:

Code: Select all

    1 T  00000000                      ; SP should be $4FFAFFFE after this sequence
    2 T  00000000                      start
    3 T  00000000 4FFAFFFE              lea start(pc),sp
    4 T  00000004 4E5F                  unlk sp


As commented on the code, SP should get the machine code of the first instruction.

Sounds good. Thank you for sharing an excellent CPU core! I merely wanted to get these bits verified. I was able to run a few demos that were not liking accelerated amiga, such as Hardwired.
I've noticed some little glitches, but knowing that the CPU core is solid will allow to switch focus to other areas.
Once more, thank you for your hard work!

ijor
Hardware Guru
Hardware Guru
Posts: 3854
Joined: Sat May 29, 2004 7:52 pm
Contact:

Re: Minimig (Amiga) core discussion

Postby ijor » Wed Nov 13, 2019 7:49 pm

apolkosnik wrote:
ijor wrote: ... As it happens, the 68000 gets the old content of the stack and the increment is discarded (I can elaborate exactly why this happens if somebody is interested).

Sounds good. Thank you for sharing an excellent CPU core! I merely wanted to get these bits verified. I was able to run a few demos that were not liking accelerated amiga, such as Hardwired.


Thanks to you for the testing!

And because somebody asked abut the internal implementation of UNLK SP, I elaborated on a different thread (we are getting off topic here) for those interested: viewtopic.php?f=28&t=34730&p=386544#p386544
Fx Cast: Atari St cycle accurate fpga core

l0g4n
Atarian
Atarian
Posts: 5
Joined: Wed Nov 13, 2019 10:43 pm

Re: Minimig (Amiga) core discussion

Postby l0g4n » Wed Nov 13, 2019 11:12 pm

Hi!

First of all, thank you very much for this awesome core!

I don't know if this behavior is correct but when I siwtch on Cache ChipRAM in Shadow of the Beast the graphics become corrupted and messed up. If I switch off Chip Cache everything goes back to normal.

--

Turning to another issue, ¿is there any way to fix the tearing in the scroll games when using HDMI? I've got a 50Hz cappable TV and use the following settings in the MiSTer.ini:

Code: Select all

vscale_mode=2
video_mode=8      ;8 - 1920x1080@60
vsync_adjust=1    ;To sync at 50Hz


Thank you again.

User avatar
rsn8887
Atariator
Atariator
Posts: 25
Joined: Mon Nov 11, 2019 7:20 pm

Re: Minimig (Amiga) core discussion

Postby rsn8887 » Thu Nov 14, 2019 2:19 am

For me, using HDMI, the scrolling in Shadow of the Beast is perfectly smooth without tearing. But I use
video_mode=8
vsync_adjust=2
and everything else at default. My monitor says "51 Hz" when I run the Amiga core, and Mister tells me "50.5 Hz", when I enable the video info display in mister.ini.

You could also try
video_mode=8
vsync_adjust=2
video_mode_ntsc=8
video_mode_pal=9
if your monitor cannot do 51 Hz.

I just played the WHDLoad version of Beast yesterday. I used an A1200 config and Chipmem Cache, D-Cache, and Kickstart Cache all set to ON. There were no corrupted gfx. I think the cache settings should all be ON when you use the 68020 CPU for maximum compatibility. I think the cache settings should all be OFF when you use the 68000 CPU.

Please someone with more knowledge correct me if I am wrong.

petarku
Atariator
Atariator
Posts: 20
Joined: Fri Apr 12, 2019 9:20 am

Re: Minimig (Amiga) core discussion

Postby petarku » Thu Nov 14, 2019 4:58 pm

@rsn8887
so if my native resolution on dell u2410 is 1920 x 1200 at 60 Hz
should i use
video mode = 9 and
vsync_adjust = 2

or anything else you recommend ?

I am still trying to get the best settings for picture as i had problem with scrolling in cannon fodder with my current settings (need to review what I have there)

User avatar
rsn8887
Atariator
Atariator
Posts: 25
Joined: Mon Nov 11, 2019 7:20 pm

Re: Minimig (Amiga) core discussion

Postby rsn8887 » Thu Nov 14, 2019 7:20 pm

My settings are for a 1920x1080 HDMI monitor with free sync (supports non-standard refresh rates like 51 Hz).

The native resolution you mention is not one of the standard HDMI resolution that mister supports it seems. So I am not sure what you should put in your .ini file.

You could try
video_mode = 8
vsync_adjust = 2
and see if your monitor works with that. That's what works for me.

If that doesn't work for you, you could add
video_mode_ntsc=8
video_mode_pal=9
and see if that helps.

l0g4n
Atarian
Atarian
Posts: 5
Joined: Wed Nov 13, 2019 10:43 pm

Re: Minimig (Amiga) core discussion

Postby l0g4n » Thu Nov 14, 2019 7:59 pm

rsn8887 wrote:For me, using HDMI, the scrolling in Shadow of the Beast is perfectly smooth without tearing. But I use
video_mode=8
vsync_adjust=2
and everything else at default. My monitor says "51 Hz" when I run the Amiga core, and Mister tells me "50.5 Hz", when I enable the video info display in mister.ini.

You could also try
video_mode=8
vsync_adjust=2
video_mode_ntsc=8
video_mode_pal=9
if your monitor cannot do 51 Hz.

I just played the WHDLoad version of Beast yesterday. I used an A1200 config and Chipmem Cache, D-Cache, and Kickstart Cache all set to ON. There were no corrupted gfx. I think the cache settings should all be ON when you use the 68020 CPU for maximum compatibility. I think the cache settings should all be OFF when you use the 68000 CPU.

Please someone with more knowledge correct me if I am wrong.


You are right. My tv can't handle 50.5 Hz correctly so it produces a bit of tearing every a few frames. I've tested Shadow of the Beast in a Samsung Qled Q60R with freesync and the scroll is totally smooth.

In the other hand, the issue with cache chipRAM is still there. This night I will try to see if there is any problem with my RAM (128MB). I will check with memtest. I don't know what other thing could be.

onaryc29
Atari nerd
Atari nerd
Posts: 48
Joined: Mon Dec 10, 2018 9:47 am

Re: Minimig (Amiga) core discussion

Postby onaryc29 » Thu Nov 14, 2019 8:09 pm

for a 1200p monitor, i use the following custom mode :

Code: Select all

fb_size=2
video_mode=1920,48,32,80,1200,3,6,26,154128


The fb_size shall be 0 (automatic) but there is (were?) a bug not setting it to 2 automatically IIRC.

By the way, i try shadow of the beast 3 (Whdload from smokemonster pack) and after the intro, the game freeze/has garbage graphic. Did someone experience that?


Return to “MiSTer”

Who is online

Users browsing this forum: No registered users and 6 guests