Giter VIP home page Giter VIP logo

vamigaweb's Introduction

vamigaweb's People

Contributors

mithrendal avatar mras0 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

vamigaweb's Issues

migrating from make to cmake build toolchain

we got now a separate branch https://github.com/vAmigaWeb/vAmigaWeb/tree/cmake to evaluate cmake

in order to build the main program just as usual we type

make 

this creates the mainsdl.o object file

next we cmake the vAmigaCoreLib in a separate build folder

mkdir build 
emcmake cmake -S Emulator -B build
cd build 
make
cd ..

now we have the libvAmigaCore.a in the build folder

to link that together and generate the wasm we type as usual

make bin

as a result we get the wasm file for the browser, in particular we get this three files

index.html
vAmiga.js
vAmiga.wasm

we start with
./start.sh

upon start we get this 😬
image

this is misleading and hides the real error because it is a highly optimized build, emscripten leaves out code checks and those stuff

lets enable debug symbols and assertions with -g -s ASSERTIONS=2

when started in the browser it generates this message
image

if we now additionally add the linker parameter -s SAFE_HEAP=1
we get this picture
image

when we switch over to pure handwritten makefiles and completely leave out cmake and manually generate a emulator_lib.a file on the very same code with

emar rcs emulator.a Emulator/*.o Emulator/*/*.o Emulator/*/*/*.o  

and link that manually build archive .a file to the mainsdl.o file and run it in a browser everything works like a charm

does anyone have an idea what is wrong here ?

@mras0 do you maybe have an idea why the cmake build segfaults at runtime ?

Agnus emulation

Hi,

Something funny regarding compatibility.

See this interesting post from Toni, Burning Spear demo is supposed to have a corrupt sprite in the middle of the screen only on OCS Amiga. But vAmigaWeb shows this corrupt sprite even when ECS Agnus is selected !

http://eab.abime.net/showthread.php?t=11295&page=2

Is sprite's vertical range increased as it should be (but not working) or is this a missing feature ?

Cheers

Fire power

Fire power has shaky, flickering graphics and a bit blurry too, comparer to RetroArch/PUE...

Running the emulator code locally, still runs it from github.

I downloaded the whole repo. Then editted the run.html file a bit. Started off with this:

<script src="js/vAmigaWeb_player.js"></script>

And added my adf file into the same folder.

I then start a local webserver via python.

then whatever I do (local file, or the url in the config) the game won't start. And if I look in the network developer menu thingy, I see a lot of connections from (to?) https://vamigaweb.github.io.

I think that makes it not work because with all that cross domain stuff I get into the corrs stuff you warn about.

Strangely enough, after a lot of trial and error and finally just using a real server on the internet, stuff started to work. And then if I go back to the local way it also works (I think it may have to do that the files are in cache already).

Disk switching

Hi Dirk,

I tried the Settlers.
Starting booting disk 3 (disk 1 is just the intro), so far so good, it asks for disk 2, I switch and press the mouse button, it keeps asking for disk 2. Is something wrong ? RetroArch/PUE has no problem with the same files...

Btw how does multiple drives work ? Put all disks in the same zip file, they are assigned to drive numbers in alphabetical order ?

Thanks and cheers

Sound glitches

Creating a separate issue to avoid clutter.

In #3 I mentioned "General sound glitches. I'm pretty tone deaf, but there's something off. Sorry I can't be more specific, maybe it's replaying the same buffer twice? (I could maybe record it if you don't notice it). CPU usage isn't noticeably different when it happens."

I've now built it locally with AUDBUF_DEBUG set to 1 (in config.h). When sound glitches occur the following is now printed:

Muxer:448 OVERFLOW (r: 8192 w: 7435) localhost:8000:814:19
Muxer:466 Changing sample rate to 43997.000000

(Sample rate change doesn't happen every time).

So it probably happens due to sudden spikes in CPU usage or rendering/emulation taking longer time.

I don't know the best way to fix it, but probably increasing some buffers somewhere could work around the issue most of the time (at a cost in latency).

Processor speed

Hi,
Without going into 68030/40/60 emulation, would it be possible to have an optional accelerated clock ? (X2 X3...)
-Somes games can benefit from it (e.g. Interceptor flies on a A3000).
-A "fast forward" mode à la Retroarch could allow to reduce the time of some less interesting part like booting...

Thanks and cheers

emscripten_set_main_loop_timing: Cannot set timing mode ...

... for main loop since a main loop does not exist! Call emscripten_set_main_loop first to set one up.

this one has been found (in console output) and reported by @mras0

I now reproduced it.. it happens only when webGL renderer is being created. No such message when only software renderer is used.

basically what happens is this ... we have to

1.create renderer
2.start mainloop which uses the created renderer

the thing is that the following SDL code

renderer = SDL_CreateRenderer(window,-1,           SDL_RENDERER_PRESENTVSYNC|SDL_RENDERER_ACCELERATED);

wants to set the timing, possible because we flagged the vsync flag? SDL wiki says for this flag present is synchronized with the refresh rate

I have found various posts in the net which claim that we could just ignore it ... it is just a warning ... another post said that we could turn off assertions and the message will vanish and that is true ... I tested it and with linker flags for no assertions it is no longer in the log...

so the problem is the order ...

I thought maybe we can change the order ... first it looked to me that it is a hen and egg problem because task 1 and 2 both need each other ... but possibly it is not.

we could try sort of lazy instantiation ...

first set mainloop without having created the renderer ... in the first call to the set mainloop we check whether we have a renderer ... if not we create one and remember it ...

borderless: do post calculation for constant aspect ratio

when using bordeless it does not care on the correct aspect ratio but tries to eliminate the borders instead (the extend of border elimination is constrained only to the max screen borders it already discovered while executing the game)

the proposal from @Vweber73 is that some correction should happen after the determination of the boundaries out of the amiga texture screen buffer

follow up from #122

isolate mainloop into a webworker

all devices have at least two computing cores so why not separate the computing of the emulation into a separate worker thread and keep the main ui thread idle and therefore responsive?

since web workers and shared array buffers are supported by all major browsers as of today (shared array buffers can be used in safari 15.2 which is availabe since 9 months now).

See

https://caniuse.com/webworkers
https://caniuse.com/sharedarraybuffer

let us evaluate to use it for vAmigaWeb

two things are needed for this...

  1. enable COOP and COEP

how to do this I found this article which describes how to set these headers without touching the server which we can not because we host vAmigaWeb on github.io

http://stefnotch.github.io/web/COOP%20and%20COEP%20Service%20Worker/

  1. compiling vAmigaWeb with emsdk with use of web workers

https://emscripten.org/docs/api_reference/wasm_workers.html

and when we are done we can compare it performance wise with the current implementation...

Support extended ADF files

Supporting extended ADF files (already supported in vAmiga via the EXTFile class) might be necessary for Hoi (dirkwhoffmann/vAmiga#762). It looks like it's not currently possible to mount these files in vAmigaWeb.

On the code front I think it should be enough to add another if block to load_disk in mainsdl.cpp (Note: EXTFile::isCompatible(string) always returns true, so probably easiest to just place it last), but maybe the GUI also needs to be updated.

Tried to add it myself, but I can't get a locally built version to work.

Snapshot Browser failing after too many snapshots

Hi team, not sure if this is the right place, or if this is a known issue...

History: I am an Amiga user from way back (still own an Amiga 1000!), and discovered this project a few weeks ago - IT'S AWESOME! I just want to play with an Amiga on my iPhone 13 and iPad Pro - so far so good.

I have already played a LOT of Populous 2 on my iPhone (many hours in fact!), and it works surprisingly well.

However, after i have stored a lot of snapshots, the next time i open the snapshot browser, i get an error:

Value NaN is outside the range [-2147483648, 2147483647] (I am not sure if the numbers change).

Once this happens, the snapshot browser is useless, and i can't access my snapshots. I have to create a new Home Screen icon from Safari, and start afresh.

Not so much of a problem for Populous 2, because that one shows character codes, and level codes, which i just screenshot when i complete a level. Just a bit of a pain on this one.

However, i just tried starting with Ultima III on my iPad Pro, and discovered the same error - this one's a show-stopper, because it doesn't seem to save the game to the ADF, so i am back to square one when I lose access to the snapshots.

So, i think i have identified 2 issues here:

  • Too many snapshots seems to break the snapshot system, requiring a complete start from scratch.
  • The emulator doesn't "save" progress to the game ADF.

Oh, and ONE more (should i have started a separate post?):

  • Is there any possibility of using the touchpad on the Magic Keyboard on the iPad Pro as the Amigas mouse? That would make this project perfect (well, for me anyway!).

Absolutely LOVING this emulator - for many years i have dreamed of having an Amiga on my phone, this is SO close to reality!

Keep up the amazing work people!

When game starts, it doesnt capture the keyboard. Even when one clicks on the screen.

I embedded my old game on the web (Amazing that this works btw)
However it doesn't capture the keyboard. Even tapping the gamescreen, it still doesn't do it.
ONLY when the bottom gray bar is tapped does the game accept keyboard input.

My suggestion:

  1. Capture the keyboard right from the start
  2. If nr1 doesn't work at least make it so that when the screen is tapped, the keyboard is captured.

thanks!

p.s. My embedded game to show that keyboard is not captured

Snapshot options restoration

Upon restoring a snapshot, the options it was created with (memory types and amount, clock speed, rendering,...,) are properly restored, but are not reflected in the option list. It is confusing since you don't know the options you are running. The list should be restored upon restoration of snapshot; however, the default options should be kept when restarting the app, they should not be overriden with the snapshot values permanently.

UI Suggestions

Got an iPhone some time ago, and got around to checking out vAmigaWeb on it (as a PWA). Overall seems to work nicely, so great job there. A few suggestions/notes:

  • It currently defaults to ECS_2MB + 2MB chip + 2MB fast. Probably better to have it start with a more classic configuration (OCS + 512K Chip + 512K slow == WinUAE "most common"). I think this will match what most users that don't twiddle with the settings expect.
  • Might be an idea to have some kind of one-click way to select a few useful defaults (A500 expanded, A500 plain, A600, Monster (28MHz + 8MB fast)) - Don't go overboard, just a few well chosen options. Ideally this should also choose the correct KS ROM if installed (maybe warn if it isn't).
  • Add (more clear) sections to the settings dialog and move the non-advanced ones to the top (e.g. I think compatability settings should be basically hidden)
  • In firefox (on my windows PC) I get a lot of popups saying "error while open db: InvalidStateError: A mutation operation was attempted on a database that did not allow mutations." if I run vAmigaWeb in private mode (to test it without my usual settings).
  • Light/dark mode is OK, but neither seems to match my preference. In light mode the blanked area is completely white, while the area outside the app seems to be more cream colored. In dark mode the blanked area is gray while I'd prefer it to be completely black. This is just my preference, so maybe it'd be an idea to allow choosing the color if it can't be read from the system. (See screenshot below).

Screenshot 2022-06-03 at 18 30 30

Finally, I managed to insert a disk and watch part one of desert dream, but now I can't seem to figure out how to insert another disk. Maybe I'm just bad at iPhone, but when I click on the file slot it gives the popup menu with no way to insert another disk, and if I press on the popup it brings me to the camera or photos app seemingly at random?

Again, great job, and just some feedback. Feel free to create new sub-issues and close this one so you don't have a single, major issue open :)

borderless draws checker board on reset

@Vweber73 noticed it...

my findings: on reset the core sends me as viewport trackuing coordinates 0 0 0 0. I don't know yet what this should mean... but when I ignore the 0 0 0 0 message then everything seems fine

prevent auto-off, screen off or dimming during emulation

The app follows Android settings (which don't have a "never" anymore) to auto-off.
You can bypass this with a third-party app (like Wakey) but this is cumbersome.
Some apps manage to stay always on by themselves, e.g. Netflix, thanks God, does not off the phone every 30 seconds while watching a video :)
So there is certainly a way to prevent this... All the more that the Cpcemu Amstrad CPC emulator managed to do it after I made the same remark to him :)
Cheers

No eject?

It seems that it is not possible to eject an adf or hdf other than by restarting the app, unless I'm missing something?

PAL/NTSC switch issues

Hi,
I could observe the following while playing the ECS Denise (I think we need beta5 of the core to fix some issues btw) :

  1. Screenmodes in workbench preferences only shows PAL modes. I think with ECS chips and WB 3.0 + KS 3.1 both PAL and NTSC modes should be available under screenmodes, hotswapping between the two?

  2. When you select "NTSC machine and display" while in Workbench, it does work as expected, but Screenmodes still only shows PAL modes and Showconfig still reports a PAL Agnus. So I thought that maybe you need to reset for the changes to be affective in WB, after all WB has no reason to check this in real-time, but...

  3. If you reset the amiga while the NTSC option is selected , it takes a while to reboot, then the NTSC setting toggles itself to Off and the Amiga reverts to PAL. It seems that the setting is not saved?

support for 680x0 CPUs

@Vweber73 you wanted a 68020 CPU ? for the settlers ?

image

at least sysinfo reports now with the above setting an 68EC020

image

pushed an early preview to uat

be aware the 68020 CPU implementation is still under heavy construction but already working somehow...

also follow progress on dirkwhoffmann/vAmiga#728

Sound volume

The volume is pretty low compared to PUE for instance... Let's pump it up ! :)

Offline install issue

On my iOS devices the pwa can be started when offline. 😎

But @Vweber73 on a fold Z3 android device it seems not to work …🙈

see here

Screenshot_20220525-000728_Chrome

Screen sizes issues

Hi,
All but Borderless screen modes don't have the correct ratio, they are too compressed vertically.
"Narrow" comes close, but the top is cut (status line in Workbench, title in Interceptor for instance).
"Borderless" is nice, but the screen zoom is not fixed, varies with what is on screen, disturbing for demos and even for the welcome "hand disk".
I think zooming should not be at the expense of screen ratio... My 2 cents.

Cheers

santa rocks on some windows machines with choppy gfx and sound

reported by an author of https://amiga-news.de website

SantaRocks is having difficulties on vAmigaWeb on some Windows machine, which otherwise do more demanding games just fine.

direct start link to SantaRocks

for physical keyboard (directions with cursor keys, fire with space key)
https://vamigaweb.github.io/#{"AROS":true,"warpto":4600,"port2":true,"url":"/doc/media/SantaRocks.adf.zip"}

for touch devices (directions left half of the screen, fire right half of the screen)
https://vamigaweb.github.io/#{"AROS":true,"touch":true,"port2":true,"url":"/doc/media/SantaRocks.adf.zip"}

direct start links with parameter AROS=true means that it will start directly into the boot process of the media specified by parameter url , vAmigaWeb does not ask for rom configuration or anything else ...

(it just loads a bit slowly from floppy ... you must be patient 🤓)

Control settings not saved

When rebooting or loading a snapshot, the choices of control (mouse, joystick,...) are not saved, they need to be reconfigured every time.

Keyboard auto repeat and other issues

Hi,

Very nice web-based C64 and Amiga emulators, congrats ! They work quite well on my Samsung Z 3 fold (Android).

One major issue is that on both emulators, the virtual keyboard does not allow key auto repeat when pressed long. This is a show stopper, for instance for flight simulators, like Fighter Pilot on C64 and F/A 18 Interceptor on Amiga...

Also, none of the proposed screen sizes for the Amiga is satisfying (the C64 is fine): narrow has good proportions but cut the top line and some space on left and right. The others are too compressed vertically...

Finally, the joystick also does not seem to auto repeat the up direction (useful for firing in Gravity Force).

Any plan to add status bar for disk activity, and disk noise sound ? Support for ECS Denise, 68030 emulation, AGA would also be nice (but low priority, the keyboard is way more important !).

Many thanks and cheers,

Vincent

store images of snapshots into separated from the complete file

currently a snapshot is saved as a complete file ... particulary the image is inside this file

when browsing through all taken snapshots this leads to performance issues because all snapshots must be loaded as a complete file to display them

we have to store the images into a separated table inside the indexdb

removing all vc64 related stuff

I have to do a cleanup of all vc64web related stuff... as it served as a template for vAmigaWeb, it has many of things in it that were commodore c64 related ...

Superhires mode a bit blur

Hi,
Superhires mode (laced) is a bit blur compared to Retroarch, see attached pictures and the 73% indicator on top of the window, the % sign is quite unreadable.

I wonder if beta 5 fixes that with ECS denise bug?
Screenshot_20220801-123858_Chrome
Screenshot_20220801-124153_RetroArch (AArch64)

Cheers

Status bar and floppy sound

A status bar showing disk(s) activity with track number and sound, like in UAE, would be quite useful to know what's going on...

Screen sizes issue PART2

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

GPU shader render precision

The rendered output shows scaling precision issues which aren’t there when using software rendering…

the following picture shows the problem

Screenshot_20220524-001356_Chrome

export hd to filesystem

like with floppy disk we want to export the current state of the hd0 as an .hdf file...

Refactor existing save dialog

save snaphot to browser local storage

export snapshot
export df0
export dh0

Small glitches with overclocking

If you overclock to 35Mhz and play Interceptor demo, towards the end (just before landing), you'll see the HDG text (in the information windows) corrupted with an horizontal bar across the text.

This does not happen at normal speed, and it does not happen in Retroarch/PUAE at any speed, with comparable settings (ECS Amiga with 68000, only overlocked to 35Mhz).

Desert Dream Issues

Hi,

First: Great job on the webport! 👍 This is just random feedback after trying it out quickly, so take it for what it's worth and close at your convenience.

I used what it identifies as Kickstart 1.3 rev 34.005 in Firefox 93.0 and Edge 94.0.992.50 on Windows 10 (Intel i7-8665U, 48G RAM, Intel UHD Graphics 620/Nvida Geforce MX250 laptop). Didn't change any settings.

I tested with Disk 1 of Desert Dream and noticed:

  • If I changed tabs it just looped the current sound buffer (this maybe impacted the further tests. Emulation seems to be otherwise paused.
  • General sound glitches. I'm pretty tone deaf, but there's something off. Sorry I can't be more specific, maybe it's replaying the same buffer twice? (I could maybe record it if you don't notice it). CPU usage isn't noticeably different when it happens.
  • The emulation speed is off (missiles go through the space ship). I guess this is because it's based on an older vAmiga version (don't know how old, but dirkwhoffmann/vAmiga#466 is still present :))
  • The screen is cut short in the morphing dot sphere part before (1..2..3..4..12000 dots) (could be vpos $100)
  • Wireframe tunnel after "Revolution" is missing (blank screen)

The last three are possibly because an old version of vAmiga was used, so just ignore that if it matches the desktop version.

Sluggish and slow Settlers with last version

Hi,
Something that didn't happen before. I'm using the uat version.
Loading my Settlers snapshot, I noticed the sound was a bit crappy at times.
Then it became even worse at 28mhz, very slow and sluggish. I tried to put the debug console, see attached.
This may (or not) be linked to the fact that I played with slow ram parameters before. I removed slow ram completely to make sure that the processor was not slowed down, but the problem persists...
Cheers
Screenshot_20220618-201417_Chrome
Screenshot_20220618-201249_Chrome

Slow Ram and Chip ram options

Hi,

I was just thinking that there were slow ram expansions larger that 512K: 1Mb, 1.5Mb and even 1.8Mb.

Also, 1.5Mb was a possible chip ram configuration (like A500+/A600 + A501 -not A501+- in trapdoor).

For the sake of completeness, would it be possible to have these options ?

Many tanks and best regards

Floppy detection problem

Hi,
I was in workbench 3.0 with ecs superhires (lace selected).
I introduced the Interceptor floppy several times, nothing happened, no detection on workbench.
When I reset, both the workbench hdf and the Interceptor adf were properly detected...
Cheers

Can´t load the pwa

Hi, first congratz for this amazing pwa, i have an iphone 12 and started to have problem in the moment i tried to update the pwa for the new version, when i tried to open the pwa its freezes in the booting into vAmiga WebEdition... can you help me? Even on safari it doesn´t work, tried deleting but the issue still persist.
thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.