News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu

Autorun function in basic

Started by Lone, 10:02, 16 February 16

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Lone

Hello,


As an emulator author, I planned recently to add an "autorun" feature, when inserting a disk (as it would be easier to test those gazillion of dump).
As know, I'm able to compute the command I would like to run, but I'm stuck on two particular points :


1/ I want only to use that command on the basic prompt (as I don't want to mess thing if i'm in the middle of a game). As now, i don't have any clue about what I can check to be sure I'm not in a middle of a program execution... I though about some AMSDOS variables, or maybe watching the stack pointer....


2/ I want to run it efficiently : I'm able to use an "autotype" method, but I find it not so smart. So, I planned to patch the memory with a basic line and run it.
I found I can copy my command line at the &AC8A address ( &ACA4 for Basic 1.0), and write a carriage return in the &b62a area, but it seems to have really strange beahaviours. Also, I though that I can just set the Program counter to the |CPM address, but it seems to be not that simple...


Any idea ?


TotO

#1
I thing that is wasting your time to support something that is not related to a CPC feature.
And, peoples love to type "CAT/RUN"... It is part of fun. :D

By the way, on a real CPC, it is possible to autoboot on a CP/M floppy disc by setting properly a jumper.
Do you support this feature ?

I think that should be extended to a RUN"DISC" (or something else) patching the firmware.
Understand, the CPC need a reset to autoboot, so you don't have to check if a program is running or not.
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

arnoldemu

Quote from: Lone on 10:02, 16 February 16
Hello,


As an emulator author, I planned recently to add an "autorun" feature, when inserting a disk (as it would be easier to test those gazillion of dump).
As know, I'm able to compute the command I would like to run, but I'm stuck on two particular points :


1/ I want only to use that command on the basic prompt (as I don't want to mess thing if i'm in the middle of a game). As now, i don't have any clue about what I can check to be sure I'm not in a middle of a program execution... I though about some AMSDOS variables, or maybe watching the stack pointer....


2/ I want to run it efficiently : I'm able to use an "autotype" method, but I find it not so smart. So, I planned to patch the memory with a basic line and run it.
I found I can copy my command line at the &AC8A address ( &ACA4 for Basic 1.0), and write a carriage return in the &b62a area, but it seems to have really strange beahaviours. Also, I though that I can just set the Program counter to the |CPM address, but it seems to be not that simple...


Any idea ?
With Arnold, I poke into ram and force a double reset. Double reset to get to basic on Plus with it's menu.

I then watch for the keyboard to be read and start to output chars. This works most of the time.


arnoldemu

Quote from: TotO on 10:16, 16 February 16
I thing that is wasting your time to support something that is not related to a CPC feature.
And, peoples love to type "CAT/RUN"... It is part of fun. :D

By the way, on a real CPC, it is possible to autoboot on a CP/M floppy disc by setting properly a jumper.
Do you support this feature ?

I think that should be extended to a RUN"DISC" (or something else) patching the firmware.
Understand, the CPC need a reset to autoboot, so you don't have to check if a program is running or not.
Arnold supports the autoboot. It forces the disc rom to be 0. The disc rom detects this and then forces a cpm boot.

Lone

Thanks for these replies !


But I have more questions :


- @TotO : Do you have any information about this jumper (I don't support it.. In fact until this morning, I didn't know it's existence !) ? A little search on the wiki give lot's of indormations about lots of jumper, but maybe too much ( and none about this one). Maybe it has something to do with setting the disk rom to '0' ?


- @arnoldemu : Do you have a feature for disabling this autoboot automaticaly (since it should not be used if a game ask about inserting the 'B' side of a disk - A reboot should not be the solution here !)


I'm trying to set up the best solution for lazy user (like me !) : Inserting a disk and launching it, but with no need to disable the feature for multi-disk games...
I have too much dump to test, and my emulator begin to be a bit too fast for my computer or my fingers : typing 'run"disc' often end with something like '"rruuunnnnnn"dissccccc'...


By the way, expect a big speed improvement for next release of sugarbox !



TotO

#5
In the DDI-1, LK1 connects both to the Expansion Port /EXP pin (which goes to PPI Port B, Bit5) and to the AMSDOS ROM bank number selection logic. The latter one allow to map AMSDOS to bank 7 (default), or bank 0. If AMSDOS sees itself mapped to bank 0, then it does automatically load & start the boot sector from drive A (equivalent as when typing |CPM after power-up).

On 6128, /EXP is linked but AMSDOS is always ROM7...  :-\

In all cases (this method or others), I think that you have to reset the CPC to autoboot with your emulator to not handle special cases.
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

Kris

The RoDOS Rom us the autoboot feature (RUN"DISC by default); why don't you try to modify-improve this rom ?


Lone


@TotO : Thanks, I'll have a look and put it configurable (as soon as I will rewrite the whole configuration thing !)

@Kris : In fact, I wanted to be the less intrusive possible, without any ROM change... But that's an idea !


TotO

Your welcome. Here, some interesting informations: LK Links - CPCWiki
(my post edit was done while you have answered)
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

arnoldemu

Quote from: Lone on 11:02, 16 February 16
- @arnoldemu : Do you have a feature for disabling this autoboot automaticaly (since it should not be used if a game ask about inserting the 'B' side of a disk - A reboot should not be the solution here !)
I have a autostart media menu item for the autoboot. (it autostarts discs and tapes and binary files with headers and discovers the best command to type which is not always possible because there may be too many to make a good decision).

If user wants to insert side B then they need to use insert disk menu item in my emulator.

Gryzor

Quote from: TotO on 10:16, 16 February 16
I thing that is wasting your time to support something that is not related to a CPC feature.
And, peoples love to type "CAT/RUN"... It is part of fun. :D


Well, true, but the beauty of it is that you can build single exe's including the emu and game, like what thecompany.pl does with Amiga. It's very handy, especially for people outside the particular scene. Why, just yesterday I discovered a (younger) colleague didn't know about Lemmings. Instead of him trying to figure out what an Amiga is,  just handed him the package containing all Lemmings games to run.

ZbyniuR

Years ago, I had a few wires from keyboard to drive and connected in such a way as to insert disk without touching keyboard caused RUN"0
Nearly all my floppys was started from file "0". Some of them has menu to choose program by digit, and (0) started "0" again, so change disk caused run new menu or new disk still without touching keyboard. Commodore holders was impressed and jealous. :)
In STARS, TREK is better than WARS.

Gryzor

Quote from: ZbyniuR on 13:21, 26 February 16
Years ago, I had a few wires from keyboard to drive and connected in such a way as to insert disk without touching keyboard caused RUN"0


.....but how??

ZbyniuR

#13
I'm Polish, we can do such a stuff. ;)

I stick cables from keys Ctrl, Enter, F0 and left arrow close together on piece of wood in right order, and some piece of metal stick on moving part with disk inside, and in moment when it move down to head, just stick those cables together for part of second. Voila. :)

It could be easier if same keys have it RUN"0 on one key, for example on Fire3, then only 2 cables is enough to do this, but it's need modify ROM too. Thats one of reason why I looking for how to do this.
In STARS, TREK is better than WARS.

Gryzor


OCT

Quote from: ZbyniuR on 22:16, 26 February 16
I'm Polish, we can do such a stuff. ;)

I stick cables from keys Ctrl, Enter, F0 and left arrow close together on piece of wood in right order, and some piece of metal stick on moving part with disk inside, and in moment when it move down to head, just stick those cables together for part of second. Voila. :)
I hope you weren't the one who had installed a similar (wooden!) contraption in the Control Room of a Soviet-style pressurized-water nuclear reactor.  ;D (Not in Poland, but nearly blew neighbouring nations' collective minds when it was discovered after lifting the Iron Curtain  :o ).

Gryzor


Powered by SMFPacks Menu Editor Mod