ppeccin / WebMSX

WebMSX - Online MSX Emulator
https://webmsx.org
396 stars 70 forks source link

Can we load a disk and start some program (not autoexec) #9

Closed digitalica closed 7 years ago

digitalica commented 7 years ago

We are building a site with a database of all listings published in MSX Compute Magazine (late 80's). You have been in touch with Hayo before I think.

For most programs it works fine, we create a URL like:

http://webmsx.org/?MACHINE=MSX2E&DISKA_FILES_URL=http://www.msxcomputermagazine.nl/archief/listings/mcmd56.di1/sneeuw&BASIC_RUN=sneeuw

And the emulator starts and runs the file. Nice.

But, some software needs more files, or loads pictures for instance. So we would like to load multiple files and/or the full disk image, and then start the specific program. I've tried:

http://webmsx.org/?DISKA_URL=http://www.msxcomputermagazine.nl/archief/disks/mcmd15.di1&BASIC_RUN=sneeuw

but that starts autoexec, not 'sneeuw'.

Is there any way to do this currently?

digitalica commented 7 years ago

just realized: we could create zip file bundles i suppose? I tried creating a zip file for 'DISKA_FILES_URL', but then the files command in the MSX returned the zipfile itself, not the contents?

That was a file error. Checked your code, zip detection looks solid. correct working URL http://webmsx.org/?MACHINE=MSX2E&DISKA_FILES_URL=http://www.msxcomputermagazine.nl/archief/listings/mcmd15.di1/carrou.zip&BASIC_RUN=carrou

Ok. If we could do something similar with a disk image, we don't have to create zips. Or we could create zips with all files (except autoexec) for the disks...

I think I would prefer an option to stop AUTOEXEC execution, so we could use BASIC_RUN on the full disk image (with autoexec).

ppeccin commented 7 years ago

If you want to load multiple disk images, bundle them in a ZIP file, but keep using the DISKA_URL argument. The DISKA_FILES_URL is intended to load the files inside the ZIP, not images, just like a "dir as disk" would do. It creates an image automatically for the files inside the ZIP. Very handy if you want to load some files but don't have an image pre-created.

But if you load several disk images at once, the user will be responsible for changing the disks when needed, using the menus or hotkeys. Right?

About the AUTOEXEC file, it behaves just like a real MSX. If you insert a disk that has an AUTOEXEC, it will run automatically... To have a disk with multiple BASIC programs that you want to run arbitrarily, please remove the AUTOEXEC file.

Currently, there is no way of stopping AUTOEXEC programatically

On Wed, Feb 1, 2017 at 7:38 AM, Robbert Wethmar notifications@github.com wrote:

just realized: we could create zip file bundles i suppose? I tried creating a zip file for 'DISKA_FILES_URL', but then the files command in the MSX returned the zipfile itself, not the contents?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ppeccin/WebMSX/issues/9#issuecomment-276613158, or mute the thread https://github.com/notifications/unsubscribe-auth/AArloI4ULFbsOEjbMnPboLquT7suPG1_ks5rYFKzgaJpZM4LzpHp .

digitalica commented 7 years ago

The project we are doing is making the original software & disks accessible as they were published in the past. Thats why i would prefer to leave the autoexec on there. I think we'll do zip bundling for some groups of files. that will work.

But in real life i would start the MSX, insert the disk (with autoexec, but it wont execute) and then just load the program i want to show. I'd like to be able to that in the emulator: start first / then insert disk. Maybe with a separate option, but it could be inferred from the combination of a disk image and the BASIC_RUN option i think...

ppeccin commented 7 years ago

Yes, nice ideas! I will come up with something to address this. Thanks!

On Wed, Feb 1, 2017 at 11:59 AM, Robbert Wethmar notifications@github.com wrote:

The project we are doing is making the original software & disks accessible as they were published in the past. Thats why i would prefer to leave the autoexec on there. I think we'll do zip bundling for some groups of files. that will work.

But in real life i would start the MSX, insert the disk (with autoexec, but it wont execute) and then just load the program i want to show. I'd like to be able to that in the emulator: start first / then insert disk. Maybe with a separate option, but it could be inferred from the combination of a disk image and the BASIC_RUN option i think...

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ppeccin/WebMSX/issues/9#issuecomment-276663544, or mute the thread https://github.com/notifications/unsubscribe-auth/AArloNO3qqzIy0Iu4kwVU-6xutE7gAMQks5rYI_KgaJpZM4LzpHp .

digitalica commented 7 years ago

for now i think we'll create a zip for every disk without the autoexec. That will make everything work nicely, and also fix the name issues ;-)

digitalica commented 7 years ago

hayo suggested an option to have shift pressed during startup, just like hardware msx ;-)

ppeccin commented 7 years ago

Yes, that is one path I'm considering!

digitalica commented 7 years ago

just got a hint Shift would probably disable loading of the diskrom, and block access to the disk... Thats too much.

For now, i've created a zip for every disk, with the AUTOEXEC.BAS renamed to AUTOEXEC.BAZ. That works fine.

ppeccin commented 7 years ago

You said you want to keep the experience as close as possible to the original experience back then. I wonder why the original disks had AUTOEXECs and now you need to bypass them?

Its strange... The disks had AUTOEXECs, but the users HAD to first power on the machine and then insert the disk only to bypass the AUTOEXEC?

On Wed, Feb 1, 2017 at 7:33 PM, Robbert Wethmar notifications@github.com wrote:

just got a hint Shift would probably disable loading of the diskrom, and block access to the disk... Thats too much.

For now, i've created a zip for every disk, with the AUTOEXEC.BAS renamed to AUTOEXEC.BAZ. That works fine.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ppeccin/WebMSX/issues/9#issuecomment-276789245, or mute the thread https://github.com/notifications/unsubscribe-auth/AArloNOvluVFlWSlnNpKczcLrC5kkjxtks5rYPoqgaJpZM4LzpHp .

digitalica commented 7 years ago

Fair question. The magazine had typically had several unrelated listings in it. This software would be on the disk and sometimes some extra's. The disk had an autoexec.bas 'menu' system, that showed several screens, and then allowed users to choose what to start.

We would like to allow visitors of the site to be able to start a program directly, skipping the slow menu. (just as would be possible in real live).

Of course we'll offer a link to the full disk - starting the menu system - as well.

For example, for number 1 (1985): The pdf: http://www.msxcomputermagazine.nl/archief/bladen/msx_computer_magazine_01.pdf The disk (with menu): http://webmsx.org/?DISKA_URL=http://www.msxcomputermagazine.nl/archief/disks/mcmd01.di1 A puzzle game of page 46: http://webmsx.org/?MACHINE=MSX1E&DISKA_FILES_URL=http://www.msxcomputermagazine.nl/archief/diskzips/mcmd01.zip&BASIC_RUN=blue%26pin

The last link uses a zipfile containing the same files as the diskimage used in the first link, except autoexec.bas has been renamed to baz to prevent it to run.

We do want to stay as close as possible to original experience. In the past people could insert the disk, reset, and use the menu. But most of the time they would insert the disk in a running machine and just load the software they just read about and were interested in. So we want to offer both options.

ppeccin commented 7 years ago

Ok, I see... Nevertheless, having a way to bypass it is a good idea. I'll think of something. Regards

On Thu, Feb 2, 2017 at 5:21 AM, Robbert Wethmar notifications@github.com wrote:

Fair question. The magazine had typically had several unrelated listings in it. This software would be on the disk and sometimes some extra's. The disk had an autoexec.bas 'menu' system, that showed several screens, and then allowed users to choose what to start.

We would like to allow visitors of the site to be able to start a program directly, skipping the slow menu. (just as would be possible in real live).

Of course we'll offer a link to the full disk - starting the menu system - as well.

For example, for number 1 (1985): The pdf: http://www.msxcomputermagazine.nl/archief/bladen/msx_computer_ magazine_01.pdf The disk (with menu): http://webmsx.org/?DISKA_URL=http://www. msxcomputermagazine.nl/archief/disks/mcmd01.di1 A puzzle game of page 46: http://webmsx.org/?MACHINE= MSX1E&DISKA_FILES_URL=http://www.msxcomputermagazine.nl/ archief/diskzips/mcmd01.zip&BASIC_RUN=blue%26pin

The last link uses a zipfile containing the same files as the diskimage used in the first link, except autoexec.bas has been renamed to baz to prevent it to run.

We do want to stay as close as possible to original experience. In the past people could insert the disk, reset, and use the menu. But most of the time they would insert the disk in a running machine and just load the software they just read about and were interested in. So we want to offer both options.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ppeccin/WebMSX/issues/9#issuecomment-276885884, or mute the thread https://github.com/notifications/unsubscribe-auth/AArloMTwPtGstPH6aq2tMbDSXc7MKCH_ks5rYYPggaJpZM4LzpHp .

oh-ren commented 7 years ago

Perhaps an AUTOEXEC parameter? (default = true|1, do not autoexec = false|0), or even give the name of an arbitrary BASIC file to autoexec (instead of using BASIC_RUN, and that wil overrule an autoexec.bas).

(I also see new proposals for BASIC_BLOAD & BASIC_BRUN (#11). Another possibility is to combine AUTOEXEC param with e.g. a new AUTOEXEC_TYPE param. Perhaps neater in a way?)

Another thing is DOS. Perhaps it'd cool to have some kind of unified way to feed both BASIC as DOS commands (and controlling the autoexec). Can WebMSX figure out it's executing DOS / running in a DOS environment (and know when DOS is ready to accept input)? So then the params could e.g. be named RUN instead of BASIC_RUN and CMD instead of BASIC_ENTER.

Btw: all these (new?) options to invoke WebMSX are pretty cool ;)