MAMEWorld >> EmuChat
View all threads Index   Threaded Mode Threaded  

Pages: 1

nikolasrozos
MAME Fan
Reged: 02/19/12
Posts: 17
Send PM


lua plugin for typing commands
#373149 - 01/16/18 02:30 PM


Hello to everyone,

I was wondering if it is possible to have a plugin which types a command whenever a system start. For example for Oric Atmos to type the command CLOAD"" so that the cassette should start loading immediately. Other examples could be C64 or Spectrum I guess.

Thanks!



RobbbertModerator
Sir
Reged: 08/21/04
Posts: 3199
Loc: A long way from you
Send PM


Re: lua plugin for typing commands new [Re: nikolasrozos]
#373150 - 01/16/18 04:30 PM


> Hello to everyone,
>
> I was wondering if it is possible to have a plugin which types a command whenever a
> system start. For example for Oric Atmos to type the command CLOAD"" so that the
> cassette should start loading immediately. Other examples could be C64 or Spectrum I
> guess.
>
> Thanks!

Type in

>mame64 -showusage | find "autoboot" (or whatever the unix equivalent is if you're not using windows)



nikolasrozos
MAME Fan
Reged: 02/19/12
Posts: 17
Send PM


Re: lua plugin for typing commands new [Re: Robbbert]
#373156 - 01/16/18 05:45 PM


Thanks a lot!!
Exactly what I was looking for.



nikolasrozos
MAME Fan
Reged: 02/19/12
Posts: 17
Send PM


Re: lua plugin for typing commands new [Re: nikolasrozos]
#373174 - 01/16/18 10:42 PM


OK,
upon experimentation trying various commands I couldn't get it right after all.
So for oric, my guess is, in order to type CLOAD"" the command should be :
./mame64 orica -autoboot_delay 3 -autoboot_command "cload """"""\n"
but it only types CLOAD then space, then enter.
As stated in commandline options documentation "To issue a quote to the emulation, use “”” in the string".
Am I missing something?

By the way I'm using Linux Mint 18, mame 193.



Haze
Reged: 09/23/03
Posts: 5245
Send PM


Re: lua plugin for typing commands new [Re: nikolasrozos]
#373175 - 01/16/18 11:54 PM


> OK,
> upon experimentation trying various commands I couldn't get it right after all.
> So for oric, my guess is, in order to type CLOAD"" the command should be :
> ./mame64 orica -autoboot_delay 3 -autoboot_command "cload """"""\n"
> but it only types CLOAD then space, then enter.
> As stated in commandline options documentation "To issue a quote to the emulation,
> use “”” in the string".
> Am I missing something?
>
> By the way I'm using Linux Mint 18, mame 193.

pretty sure it's \" but it's been a while since I used it.

note, some of the scripting stuff doesn't work on some linux distros with the packages they provide because they decided some library wasn't suitable for their distribution and stripped it out, even if MAME changed to a version of the library that they should be happy with. I think Mint is fine tho.



nikolasrozos
MAME Fan
Reged: 02/19/12
Posts: 17
Send PM


Re: lua plugin for typing commands new [Re: Haze]
#373214 - 01/17/18 04:30 PM


thanks for answering.
well, I tried
./mame64 orica -autoboot_delay 3 -autoboot_command "cload\"\"\n"
or even
./mame64 orica -autoboot_delay 3 -autoboot_command \"

but still it doesn't register a quote.

on win7
mame64 orica -autoboot_delay 3 -autoboot_command "cload """"""\n"
or
mame64 orica -autoboot_delay 3 -autoboot_command "cload\"\"\n"
also no luck.

any suggestion?



nikolasrozos
MAME Fan
Reged: 02/19/12
Posts: 17
Send PM


Re: lua plugin for typing commands new [Re: nikolasrozos]
#373651 - 02/03/18 03:26 PM


Sorry to bring this up again. Is there any way to register a quote via -autoboot_command?



crazyc
MAME Fan
Reged: 06/23/16
Posts: 62
Send PM


Re: lua plugin for typing commands new [Re: nikolasrozos]
#373682 - 02/04/18 05:16 AM


I committed a fix for it at https://github.com/mamedev/mame/commit/b27d8aae2571321e35509a1487175c043239f572 .
You'll have to compile it yourself unless there's a place to get unofficial git head builds.



Bad A Billy
Oop Ack!
Reged: 12/27/07
Posts: 1076
Loc: Outland
Send PM


Re: lua plugin for typing commands new [Re: crazyc]
#373684 - 02/04/18 06:48 AM


You can try here for the nightly build:

http://ashura.mameworld.info/nightlybuilds/builds.html

See if he's got what you want...



Pessimist: Oh, this can't get any worse!
Optimist: Yes, it can!



nikolasrozos
MAME Fan
Reged: 02/19/12
Posts: 17
Send PM


Re: lua plugin for typing commands new [Re: Bad A Billy]
#373696 - 02/04/18 04:28 PM


Downloaded latest nightly for windows as Bad A Billy suggested. Tested the following commands...

mame64.exe c64 -autoboot_delay 6 -autoboot_command "load """$""",8,1\n"

mame64.exe spectrum -autoboot_delay 6 -autoboot_command "load """$""",8,1\n"

mame64.exe orica -autoboot_delay 6 -autoboot_command "load """$""",8,1\n"

Funny thing is the autoboot_command works perfect for c64 and spectrum except for the orica driver!!!!



crazyc
MAME Fan
Reged: 06/23/16
Posts: 62
Send PM


Re: lua plugin for typing commands new [Re: nikolasrozos]
#373697 - 02/04/18 05:29 PM


I made the change yesterday but the newest build on that page is from two days ago. Either compile it yourself or wait for a newer one.



nikolasrozos
MAME Fan
Reged: 02/19/12
Posts: 17
Send PM


Re: lua plugin for typing commands new [Re: crazyc]
#373698 - 02/04/18 07:09 PM


Well as soon as I can compile it on Linux, I'll give it a try. For now the compiler stops giving me

makefile:1247: recipe for target 'linux_x64' failed
make: *** [linux_x64] Error 2

anyway thanks for the fix!



nikolasrozos
MAME Fan
Reged: 02/19/12
Posts: 17
Send PM


Re: lua plugin for typing commands new [Re: nikolasrozos]
#373717 - 02/05/18 12:45 PM


Just built the latest from github. None of the above commands registers a quote. I'm running Linux Mint 18.2. Can anyone else confirm this?



crazyc
MAME Fan
Reged: 06/23/16
Posts: 62
Send PM


Re: lua plugin for typing commands new [Re: nikolasrozos]
#373731 - 02/06/18 02:35 AM


mame64 orica -autoboot_delay 3 -autoboot_command "cload\"\"\n" works fine on linux for me.



RobbbertModerator
Sir
Reged: 08/21/04
Posts: 3199
Loc: A long way from you
Send PM


Re: lua plugin for typing commands new [Re: crazyc]
#373741 - 02/06/18 12:12 PM


>



nikolasrozos
MAME Fan
Reged: 02/19/12
Posts: 17
Send PM


Re: lua plugin for typing commands new [Re: Robbbert]
#373745 - 02/06/18 02:40 PM


Thanks guys that works!! I was typing the wrong command.


Pages: 1

MAMEWorld >> EmuChat
View all threads Index   Threaded Mode Threaded  

Extra information Permissions
Moderator:  Robbbert, Tafoid 
1 registered and 182 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 1380