emufreak / iAmiga

iAmiga sources
44 stars 17 forks source link

scaled down horizontal screen resolution in medres and hires #27

Closed mithrendal closed 7 years ago

mithrendal commented 8 years ago

Problem: the horizontal screen resolution is always set to lo-res (320px).

Description: Workbench boots typical in med-res = 640x256 (PAL MedRes). But our emulator does scale the bitplane information down to 320x256 (PAL LowRes) (in fact it seems to skip every second pixel). If stretch toggle enabled, iAmiga scales the downscaled 320px horizontal res up to the devices horizontal resolution. Despite the retina display this does not look as crisp as on a real amiga.

Goal: When amiga emu goes to medres or hires, the higher 640 pixel horizontal resolution should be used.

emufreak commented 8 years ago

Worthy goal. I think first thing we need to find out is where the scaling down happens. In iAmiga Code or in the uae4all source. If its in the uae4all part we might find a solution in the latest source.

simontoens commented 8 years ago

Issues are alive! Thanks @emufreak.

+1 on getting the higher resolutions fixed.

mithrendal commented 8 years ago

@emufreak I am at it and will try this one out and do as you proposed. But I need some more time for it. Very busy at the moment.

mdbergmann commented 8 years ago

Is this what I'm seeing in the attached? I'm trying to play text-adventures (Infocom). The text is hardly readable.

How can this be improved?

img_0035

mithrendal commented 8 years ago

Yes thats the Problem. We have to bring the horizontal Resolution to 640 pixel. I want to fix this but had no time recently.

I have found one anomaly in the drawing.cpp

in drawing.cpp in the method void pfield_init_linetoscr (void)

there is a odd thing. In other uae4all editions it has not the 4 following lines if (res_shift) pfield_do_linetoscr=(line_draw_func )pfiled_do_linetoscr_1; else pfield_do_linetoscr=(line_draw_func )pfiled_do_linetoscr_0;

if you out comment them (e.g. remove them) then hires gets displayed very clear. That is all characters/text on workbench resolution 640x256 is displayed fine and clear.

First part of the problem solved.

BUT you will get only half of the now beautiful workbench screen. It is clipped to the half. The resolution is now high but the mapping from amiga coordinates to Emulationview is still not correct...

I see a lot of hard coded lo_res in the code which may be the second problem.

simontoens commented 8 years ago

This is the most anticipated iAmiga fix I think....no pressure @mithrendal :)

mithrendal commented 7 years ago

ok I got some little progress on this one. I can tell that unfortunately its a mix of lines in iAmiga Code AND the uae4all source. Files are BaseEmulationViewController, drawings.cpp custom.h options.h so far. I can see at least some fullscreen hires, but only in the part of the screen where the mouse pointer is (maybe 32 Pixel height). The other part the hires screen is hires but clipped to the half. This still needs more time ...

I think I have to look at custom.cpp why hires is ok only where the vertical mouse position is .

At least I see it is feasible. Best would certainly be to completely change drawings and custom.cpp against some newer versions but I don't dare it.

simontoens commented 7 years ago

Hi @mithrendal nice to hear from you. Happy new year!

I casually also looked at this a few weeks ago and came to the same conclusion as you..I didn't make any significant progress, so I am glad you are still looking at this :)

mithrendal commented 7 years ago

Hi simon, ok, got it running. Its so beautiful. It is all hires now. BTW no changes in custom.h and custom.cpp necessary.

+our old emulator core does the following: destwindow = 320x256 if lores then simply write pixel to destination if hires then skip every second pixel

+newer cores working the other way around: destwindow = 640x256 or more if lores then expand pixels to destination if hires then simply write unchanged to destination

Hires is now already fine, but lores is only half of destination window. I have to do the expanding thing like the newer cores and then i am ready.

simontoens commented 7 years ago

@mithrendal sounds great - looking forward to your changes.

mdbergmann commented 7 years ago

That's great.

mithrendal commented 7 years ago

Here are my changes.

63 should completely fix this issue.

Because I don't want to break the compatibility of the emulator, I always tried to go the least invasive way.

Hope you will be loving it ;-). You can test this puppy out at mithrendal/iAmiga/dev.