vamigaweb / vamigaweb Goto Github PK
View Code? Open in Web Editor NEWvAmigaWeb - Amiga Emulator for iPad iPhone Android and the web.
Home Page: https://vamigaweb.github.io/doc/about.html
License: GNU General Public License v3.0
vAmigaWeb - Amiga Emulator for iPad iPhone Android and the web.
Home Page: https://vamigaweb.github.io/doc/about.html
License: GNU General Public License v3.0
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
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
if we now additionally add the linker parameter -s SAFE_HEAP=1
we get this picture
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 ?
@chris70c suggested this... and we should really evaluate this
what is the impact to performance and what to clean code ...
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 has shaky, flickering graphics and a bit blurry too, comparer to RetroArch/PUE...
@chris70c has reported this... we should disable it as a default measurement and implement a setting to be able to enable debug output in case it is needed
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).
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
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).
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
we should do what we have done with csdb.dk in https://vc64web.github.io 😎
adding a scene browser to vAmigaWeb interface
candidates
for example in gods from bitmap brothers in the first 20 seconds ...
... 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 ...
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
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...
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/
https://emscripten.org/docs/api_reference/wasm_workers.html
and when we are done we can compare it performance wise with the current implementation...
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.
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:
Oh, and ONE more (should i have started a separate post?):
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!
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:
thanks!
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.
I found something how to remove the navbar
https://eolsen.dev/posts/how-to-hide-the-navigation-bar-in-a-pwa/
I changed the display setting in the PWA manifest.json file from standalone
to fullscreen
.
Can you again save the PWA to your homescreen and see whether the bottom bar is removed ? I will check iOS ... The reason to install the app again is that the manifest file will be evaluated only on installation ... it does not update an existing PWA
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:
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 :)
@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
I just embedded my old game on the web (amazing!)
but the speed is very true to the Amiga speed. For the game this is great, however for the 'drive speed' I would rather have that it just goes as fast as possible. The modern crowds are just not used to waiting.
Is there an option, (Or can you add an option) where the drive speed is just sped up?
Thanks!
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
It seems that it is not possible to eject an adf or hdf other than by restarting the app, unless I'm missing something?
Hi,
I could observe the following while playing the ECS Denise (I think we need beta5 of the core to fix some issues btw) :
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?
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...
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?
@Vweber73 you wanted a 68020 CPU ? for the settlers ?
at least sysinfo reports now with the above setting an 68EC020
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
The volume is pretty low compared to PUE for instance... Let's pump it up ! :)
Trying to load the following workbench hdf (and some others) gives the "offset is out of bounds" error. Then any attempt to load a working hdf or adf gives the same error until the app is restarted. It seems the app is in a currupt state until restart...
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
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
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 🤓)
When rebooting or loading a snapshot, the choices of control (mouse, joystick,...) are not saved, they need to be reconfigured every time.
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
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
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 ...
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...
this issue is to continue the journey from #79
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...
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 ...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
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).
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:
The last three are possibly because an old version of vAmiga was used, so just ignore that if it matches the desktop 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
I can't seem to get any sound after using the latest build (core 2.2b1 / ui 2022_11_12)
Am I missing a setting or is this an issue?
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
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
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.