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

Screen sizes issue PART2 #101

Closed
mithrendal opened this issue Jun 5, 2022 · 43 comments
Closed

Screen sizes issue PART2 #101

mithrendal opened this issue Jun 5, 2022 · 43 comments

Comments

@mithrendal
Copy link
Contributor

mithrendal commented Jun 5, 2022

this issue is to continue the journey from #79

@Vweber73

1.My snapshots don't work anymore (the Amiga resets) but I guess this is normal. Saving new snapshots and restoring them seems to work.
2.Settlers now seems to work fine, but while viewport uses all the width of the screen, overscan mode keeps a small margin left and right. Normal ?
3.Settlers has no intro music in NTSC mode when hot-swapping. Hot-swapping back to PAL restores the sound...
4.Most importantly, Interceptor is screwed up because super slow in 7mhz mode, be it in PAL or NTSC mode. I first thought it was a sound problem like Settlers since I didn't hear the music, but then I realize how slow the text was, and the music started... during the flight demo mode ! Complete desynch...

  1. yes due to internal changes in the core
  2. yes ... if you choose wider then it should match exactly the size ... don't know maybe there is still something more overscan then "the settlers" out there and therefore I defined the overscan a bit larger ... see your image from settlers in PUAE/Retroarch, it had also borders left and right ...
  3. and 4. I think this does have the same reason ... a bug in uat version ... when you drive NTSC for a longer period of time and switch back to PAL then it is way ahead of time ... and sleeps unitil it catches up again ... I will fix this ... thanks for reporting
@Vweber73
Copy link

Vweber73 commented Jun 5, 2022

Many thanks ! Cheers

@mithrendal
Copy link
Contributor Author

pushed new version on uat environment

latest core + bugfix when NTSC drove the executed frames so much into future that when switching back to PAL it would wait some seconds in order to reach PAL speed again...

@Vweber73 the best demo to see whether NTSC/PAL is working I found was juggler.ADF

image

@Vweber73
Copy link

Vweber73 commented Jun 5, 2022

Many thanks !

I've tested it and PAL/NTSC switching seems fine now !

Only thing is that Settlers freezes when switched to NTSC (no sound, no mouse moving) and is back to normal when switched back to PAL. If you boot in NTSC, then it is ok. However, if you trigger the keyboard, then the screen is cut at the bottom in NTSC mode, no matter what graphic mode is used. Is it intended ?

Note that PUAE/RetroArch does not like the PAL/NTSC hot switch either, the freeze is worth than vAmiga (color clash).

I was thinking, maybe it would be good to separate NTSC machine and pixel ratio. One may want a NTSC machine with PAL ratio :)

Cheers

@Vweber73
Copy link

Vweber73 commented Jun 5, 2022

Funny thing is like if you boot in PAL, switching to NTSC freezes the Settlers. But if you boot in NTSC, hot switching between the 2 modes is no problem !

@mithrendal
Copy link
Contributor Author

Do you think it is a game problem? Can you boot into winuae and switch there and see how it behaves there?

@Vweber73
Copy link

Vweber73 commented Jun 5, 2022

I don't have WinUAE handy but I have PUE, which doesn't seem to want to boot at all Settlers in NTSC: black screen after launch !

@Vweber73
Copy link

Vweber73 commented Jun 5, 2022

See attached, switching from a new settlers snapshot to a new interceptor snapshot is... funny. Kind of a Frankenstein monster :) also, the music is very slow. Seems to return to normal when chosing an option from the menu...
Screenshot_20220606-000942_Chrome

@mithrendal
Copy link
Contributor Author

thank you very much, you are really good !! How do you find all those bugs 😎!

I will try to reproduce this... Just played a bit with it but did not succeed how you did it ... will try more systematically ...

@Vweber73
Copy link

Vweber73 commented Jun 6, 2022

I like to try things to make them perfect ;)
I used to know an IT security consultant, who was once told that the system was fail safe with full redundancy, who said : "Really? so I can unplug the thing, the system will still work ?" So he did, the system failed miserably, and he said: "well, keep working. See you later" ;)

@Vweber73
Copy link

Vweber73 commented Jun 6, 2022

I could just access my PC and try with WinUAE. I confiirm the behaviour observed with PUAE on Android:

  • Settlers would not even start in NTSC mode - black screen;
  • It does start fine in PAL;
  • Once loaded in PAL, switching to NTSC freezes the screen;
  • Once swiched back to PAL, it works again fine.

Seems like the Germans don't like NTSC :)

@mithrendal
Copy link
Contributor Author

ok,finally I am successful in reproducing the Frankenstein monster issue

1.freshly reloading vAmigaWeb app, NTSC was already selected

  1. load a PAL snapshot
    ->it will be displayed as NTSC, which is still highlighted in the settings

  2. switch the NTSC setting to off
    ->it displays PAL now, looking good

  3. now load a NTSC snapshot
    -> it is still displaying PAL and running the snapshot with 50Hz

image

see here debug console
time[ms]=1016, audio_samples=39936, frames [executed=51, rendered=61] avg_fps=52

the core thinks it runs with 60Hz but vAmigaWeb apparently only executes it 50 times a second -> therefore of course the core produces to few sound samples and the sound is slow and sluggish with distortions ...

SOLUTION: after loading a snapshot I have to reset to the loaded mode PAL or NTSC of the snapshot

@Vweber73
Copy link

Vweber73 commented Jun 6, 2022

Fabulous, many thanks !

@mithrendal
Copy link
Contributor Author

mithrendal commented Jun 6, 2022

Settlers would not even start in NTSC mode - black screen;
It does start fine in PAL;
Once loaded in PAL, switching to NTSC freezes the screen;
Once swiched back to PAL, it works again fine.
Seems like the Germans don't like NTSC :)

not necessarily, it could also be, that WinUAE is wrong and vAmiga is correct... @dirkwhoffmann can you test settlers on a real NTSC Amiga machine, whether it boots up?

@Vweber73
Copy link

Vweber73 commented Jun 6, 2022

Yes, it could well be ! :) On vAmigaWeb Settlers doesn't like hot switching (which was never meant to be on a real machine anyway), but seems to accept booting in NTSC once for all fine...

@dirkwhoffmann
Copy link

I've tested with the disk version (3 ADFs, German edition).

Neither the intro (disk 1) nor the game (disk 3) do boot in NTSC mode on my A500+ACA500plus.

BTW, this is how the game looks like on my TFT in PAL mode (part of the right overscan area is cropped):

IMG_2853

@mithrendal
Copy link
Contributor Author

just pushed a new version to the UAT environment ...

it has been upgraded todays vAmigaCoreLib ... which has changed a lot of things in viewport stuff as well ... so expect some new errors ... but the frankenstein issue should be gone ...

One thing that I already discovered is that when in borderless and loading another snapshot then borderless stops working ... must click again ... have to solve this in the coming days ...

@Vweber73
Copy link

Vweber73 commented Jun 6, 2022

Thanks !
This one seems to have fixed the sound cuts issue I described in the sound volume topic, any clue why ?
It seems that the snapshot format has changed again ? I'm unable to load my existing ones...
Cheers

@Vweber73
Copy link

Vweber73 commented Jun 6, 2022

Launching a Settlers snapshot after an interceptor one in NTSC and switching to PAL gives a centering problem... Switching back and forth again solved it !
Screenshot_20220607-000155_Chrome

@Vweber73
Copy link

Vweber73 commented Jun 6, 2022

And a switch between the 2 snapshots triggered a java exception. Then the UI wouldn't react until I restart...
Screenshot_20220607-001316_Chrome

@Vweber73
Copy link

Vweber73 commented Jun 6, 2022

Also, switching from portrait to landscape then back to portrait seems to screw up the narrow mode:
Screenshot_20220607-002421_Chrome

@mithrendal
Copy link
Contributor Author

hi @Vweber73

And a switch between the 2 snapshots triggered a java exception. Then the UI wouldn't react until I restart...

found the problem ... every switch creates a snapshot on heap memory (when a hd is involved then snapshots become bigger)... the problem was I never deleted them ... so after switching 10 times or so ... it went out of memory... 🙈

the other issues are due to massive refactoring in the core and that I must rework my code for it to be compatible... 😬
see here
dirkwhoffmann/vAmiga#706

This one seems to have fixed the sound cuts issue I described in the sound volume topic, any clue why ?

don't know ... maybe some changes in the core itself ?

I will not push a new version to UAT until I sorted the problems out a bit more ... the version currently is a bit to rough ... probably in the coming days ... stay tuned..

@Vweber73
Copy link

Vweber73 commented Jun 7, 2022

Ok, many thanks !

@mithrendal
Copy link
Contributor Author

just pushed a new version to uat ... fixing the memory leak with snapshots and screen dimension problems during restoration of snapshots...

@Vweber73
Copy link

Vweber73 commented Jun 7, 2022

Thanks !
Just tried switching with my 2 snapshots. Settlers is fine. Interceptor, graphics are fine but sound is complete garbage !??
Cheers

@mithrendal
Copy link
Contributor Author

mithrendal commented Jun 7, 2022

Uh yes ... just repushed it ... I destroyed the sound again ... corrected version should be online in some seconds

EDIT: online

@Vweber73
Copy link

Vweber73 commented Jun 7, 2022

Thanks ! Much better now.
But one strange things, when switching to settlers snapshot, the loading didn't occur, instead, Interceptor froze (still image). When I tried again it works (switched to Settlers). Strange !

@Vweber73
Copy link

Vweber73 commented Jun 8, 2022

Got a freeze of interceptor when switching it from NTSC to PAL.
Doing it again back and forth solved the problem which was not reproduced. Strange...

@mithrendal
Copy link
Contributor Author

mithrendal commented Jun 8, 2022

Doing it again back and forth solved the problem

what do mean with doing it again ? do you mean clicking the switch ? Or restarted the app and doing all over again?

EDIT: I just pushed a small fix ... maybe it was related

@Vweber73
Copy link

Vweber73 commented Jun 8, 2022

Sorry I was not clear. I meant switching back from PAL to NTSC then to PAL again, not restarting the app.

@mithrendal
Copy link
Contributor Author

did you do it with your own action button?

@Vweber73
Copy link

Vweber73 commented Jun 8, 2022

No, just with the GUI

@mithrendal
Copy link
Contributor Author

for better testing, please create two extra action buttons... with javascript

one that triggers wasm_set_display("ntsc"); and a second which triggers wasm_set_display("pal");

be sure to hit global checkmark so that the two action buttons are always in every game visible ...

@Vweber73
Copy link

Vweber73 commented Jun 8, 2022

I created a NTSC button with this command in JavaScript, button created fine, but I have no effect when clicking on it ?

@mithrendal
Copy link
Contributor Author

mithrendal commented Jun 8, 2022

add alert("going ntsc");

wasm_set_display("ntsc");
alert("going ntsc");

when you hit the button an alert should popup

you can also create some buttons for wasm_set_display("standard"); or wasm_set_display("overscan");

@Vweber73
Copy link

Vweber73 commented Jun 8, 2022

The alert is popping up fine. But no NTSC switch...

@mithrendal
Copy link
Contributor Author

mithrendal commented Jun 8, 2022

works here on iPhone...
804BEEF0-A497-4DE2-8E4B-C1BEB6673026

0F783C56-47A6-4C24-921C-4EDC8EC6637E

  1. be sure you also make the second "pal" button... because maybe you are already on NTSC and there you see no difference ... forget the values in the settings it displays not the actual settings of the snapshot (we still have to do this)
  2. switch to overscan when testing ... because the change to ntsc is most visible then
  3. open live debug and see the executed= values ... when ntsc it should be 60 when pal 50

@Vweber73
Copy link

Vweber73 commented Jun 8, 2022

I swear I can tell the difference between PAL and NTSC on Interceptor on my Z3, we debated the proportion of the circle, it is very visible :)
Unless you mean than the button command does not change the pixel ratio, just the frame rate and the hardware emulation ?

@mithrendal
Copy link
Contributor Author

I see … wait I will look into it

@mithrendal
Copy link
Contributor Author

mithrendal commented Jun 8, 2022

you were right

use_ntsc_pixel=true;
wasm_set_display("ntsc");
alert("going ntsc");
use_ntsc_pixel=false;
wasm_set_display("pal");
alert("going pal");

the use_ntsc_pixel ratio was missing in the script ...

@Vweber73
Copy link

Vweber73 commented Jun 8, 2022

Excellent thanks !
Btw I think it would be good to decorellate NTSC mode and NTSC pixel ratio in the GUI too, one may want to use NTSC in normal PAL pixel ratio...

@Vweber73
Copy link

I'm not sure if there is still a small bug or not, but Burning Spear demo in Viewport mode (and even at times in overscan mode) seems a bit shifted to the left, with some unused space on the right, see attached.

Also, in Viewport mode at the begining when it's quite hi-res (the oval spinning with the star inside), the view windows is quite narrow, the background color (black) can be seen only on a very narrow portion of the screen, the rest is grey, I guess this is normal given the high resolution ?
Screenshot_20220610-232128_Chrome
Screenshot_20220610-232111_Chrome
Screenshot_20220610-233009_Chrome

@mithrendal
Copy link
Contributor Author

I have tested this and it seems to me that the demo opens in the first picture a too wide viewport on the amiga ... this is then reported by the viewport tracking to vAmigaWeb which exactly sets the dimensions of its emulaion viewport to the amiga viewport reported by the demo... the demo maker did not know about this feature of viewport tracking because normally the background was entirely black and thus the not used space to the right of the viewport was also black ... and therefore without viewport tracking you could not distinguish between black viewport space and black border space because both is just black...I think it is demo which is not so clean here ... viewport width should be requested -32 pixel in width by the demo code

the last picture ... yes same game here ... I think in order to save DMA cycles for the CPU they did make the viewport height very small which is reported by viewport tracking and vAmigaWeb reduces its display height too then ...

concerning the overscan ... have you a picrture ? We could shift it a bit ... but see settlers was fine, no ? ... the viewport start position is also adjusted by the games itself ... so there is no single truth ...

@Vweber73
Copy link

Many thanks for this ! Indeed burning spear is a complex demo, good test case..
Re overscan I tried again and didn't see anything wrong, maybe not every screen was 100% centered, but anyway it can be seen fine...
Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants