Previous Thread
Next Thread
Print Thread
Page 1 of 3 1 2 3
#109639 05/24/17 02:37 PM
Joined: Jan 2012
Posts: 891
Likes: 17
C
crazyc Offline OP
Senior Member
OP Offline
Senior Member
C
Joined: Jan 2012
Posts: 891
Likes: 17

crazyc #109641 05/24/17 02:58 PM
Joined: Mar 2001
Posts: 17,215
Likes: 234
R
Very Senior Member
Offline
Very Senior Member
R
Joined: Mar 2001
Posts: 17,215
Likes: 234
Stickied, because this stuff is awesome.

crazyc #116750 01/17/20 10:10 PM
Joined: May 1999
Posts: 616
Likes: 1
Senior Member
Offline
Senior Member
Joined: May 1999
Posts: 616
Likes: 1
I just tried this for the first time and got the following error:

Code
[MAME]> r = require "robotron"
error: 	./Plugins/robotron.lua:8: attempt to index a nil value (local 'cpu')

I'm using 0.217 on macOS Catalina.

Edit: Oops, my error, messed ROM path up. It works now, it is really awesome stuff.

Last edited by Carbon; 01/17/20 10:13 PM.
crazyc #117666 08/15/20 12:13 AM
Joined: Jan 2012
Posts: 891
Likes: 17
C
crazyc Offline OP
Senior Member
OP Offline
Senior Member
C
Joined: Jan 2012
Posts: 891
Likes: 17

crazyc #119911 10/24/21 04:54 AM
Joined: Oct 2006
Posts: 1,017
Likes: 21
S
Very Senior Member
Offline
Very Senior Member
S
Joined: Oct 2006
Posts: 1,017
Likes: 21
Some lurking in the /r/MAME logs coughed this one up! https://reddit.com/r/MAME/comments/njc019/defender_directional_movement_plugin/

crazyc #119913 10/24/21 06:29 PM
Joined: Oct 2006
Posts: 1,017
Likes: 21
S
Very Senior Member
Offline
Very Senior Member
S
Joined: Oct 2006
Posts: 1,017
Likes: 21
Decided to reformat this list a bit, and did a bit of searching...

---

Third-Party MAME Lua Plugins/Scripts:

MarI/O MAME - SMW SMB:
Script - https://gist.github.com/cracyc/02cbcac7b869329e7d8b280ef6c77fa5
Video - hxxps://www.youtube.com/watch?v=aGKFs5wJ0CI

SFII RYUNATOR:
Script - https://github.com/Jazpy/RYUNATOR

Robotron-AI - Robotron 2084, Automated Gameplay in MAME
Script - https://github.com/grunt2084/robotron-ai
Video - hxxps://www.youtube.com/watch?v=hPItPwnsjig
Video - hxxps://www.youtube.com/watch?v=7dapV20G3iw

Hitbox Viewer for Warriors of Fate:
http://www.mamecheat.co.uk/forums/viewtopic.php?f=4&t=12830

Street Fighter II hitbox viewer, etc.:
Comes with MAME Cheats: http://www.mamecheat.co.uk/
https://gist.github.com/cracyc/01b6d1c93b3b9937eb500dff157fc832
https://gist.github.com/cracyc/145ae60b9e6ac1d1bd7ce26c60f250c6

Autotron (not published) - a neural network that can competently play Robotron: 2084:
http://www.jeraddunn.com/

Headkaze ShowCP plugin (CPWizard):
http://forum.arcadecontrols.com/index.php?topic=151810.0

Headkaze simple Savestate plugin:
http://headsoft.com.au/download/mame/savestate_plugin.zip
http://forum.arcadecontrols.com/index.php/topic,151810.msg1623419.html#msg1623419

Headkaze auto load save state plugin:
http://forum.arcadecontrols.com/index.php/topic,155063.msg1626548.html#msg1626548

Nibbler bot:
https://github.com/FrankRizzo890/NibblerBot
https://reddit.com/r/MAME/comments/ab4tj6/going_for_the_mame_bot_world_record_on_nibbler/
hxxps://www.youtube.com/watch?v=60gVbJTOUOo

Track & Field bot:
https://github.com/FrankRizzo890/TrackFieldBot
https://reddit.com/r/MAME/comments/bwlh12/my_2nd_bot_plays_track_field_see_it_here/
hxxps://www.youtube.com/watch?v=fs-aIPMlcUo

Space Zap bot:
https://github.com/FrankRizzo890/SpaceZapBot
https://reddit.com/r/MAME/comments/byb0bk/my_3rd_bot_plays_space_zap_see_it_here/
hxxps://www.youtube.com/watch?v=90yBznscFkk

Hyper Sports bot:
https://github.com/FrankRizzo890/HyperSportsBot
https://reddit.com/r/MAME/comments/c7orvd/my_4th_bot_is_posted_it_plays_hyper_sports/
hxxps://www.youtube.com/watch?v=JWOLBkUp6dA

MAME system shutdown plugin for Windows:
https://github.com/michaelshmitty/mame-shutdown
https://reddit.com/r/MAME/comments/7bwhef/simple_mame_plugin_for_shutting_down_your_windows/

Arcademus - MAME plugin that helps to play arcade music on demand:
https://github.com/stengun/arcademus

DKShooter - Donkey Kong Shooter - A Galaga themed plugin/hack for MAME:
https://github.com/10yard/dkshooter
hxxps://www.youtube.com/watch?v=Rk5n4frRmI0

DKCoach - DK Coach - A MAME plugin to assist with Donkey Kong gameplay:
https://github.com/10yard/dkcoach
hxxps://www.youtube.com/watch?v=ax-xDwVr7No

DKLavaPanic - A MAME plugin version of DK Lava Panic:
https://github.com/10yard/dklavapanic
hxxps://www.youtube.com/watch?v=KB_6jqc82Ek

DKWho - A MAME plugin version of DK Who and the Daleks:
https://github.com/10yard/dkwho
hxxps://www.youtube.com/watch?v=BAFvoF_iqCY

DKChorus - A MAME plugin which replaces the DK samples and music with acapella sounds:
https://github.com/10yard/dkchorus
hxxps://www.youtube.com/watch?v=nYCNioYWcO4

DKAFE - Donkey Kong Arcade Front End (uses MAME plugin to interface with MAME):
https://github.com/10yard/dkafe
hxxps://www.youtube.com/watch?v=IOaJTd_O6yY

BletchMAME - MAME Frontend (uses MAME plugin to interface with MAME):
https://www.bletchmame.org/

Defender directional movement plugin:
https://reddit.com/r/MAME/comments/njc019/defender_directional_movement_plugin/
https://drive.google.com/file/d/1kRYwEwyKy_wDicLL9JTlnwOuOlicM5tB/view?usp=sharing

Defender 8-way control plugin:
http://forum.arcadecontrols.com/index.php?topic=163525.0

Game Input Lag Tester (uses Lua to interface with MAME):
http://forum.arcadecontrols.com/index.php/topic,160722.0.html
http://www.gameinputlagtester.com
hxxps://www.youtube.com/watch?v=Whhz5Y4bd9Q

Killer Instinct Attack Info:
https://github.com/CSword123/MAME-LUA-scripts

MAMEToolkit - A Python toolkit used to train reinforcement learning algorithms against arcade games:
(note: requires modified MAME: https://github.com/M-J-Murray/mame )
(uses MAME plugin to to interface with MAME)
https://reposhub.com/python/deep-learning/M-J-Murray-MAMEToolkit.html

BinTracker - "A Chiptune Audio Workstation for the 21st Century" (uses MAME plugin to to interface with MAME):
https://bintracker.org/
https://bintracker.org/documentation/hacking.html

4am's plugin to autocrack dumps with Passport (unpublished):
https://twitter.com/a2_4am/status/1379593106836877318

Last edited by Stiletto; 10/24/21 06:45 PM. Reason: stop YT from auto-embedding
crazyc #119915 10/24/21 07:34 PM
Joined: Feb 2000
Posts: 219
Likes: 1
T
Senior Member
Offline
Senior Member
T
Joined: Feb 2000
Posts: 219
Likes: 1
I'd like to add my Timberbot:


https://gist.github.com/tlindner/0199ee5ee64ab6fb1e3340856bfdece9

Also, CoCo Arkanoid cheat:

https://gist.github.com/tlindner/6e042b295f47a64e4c76eb3eb0d0757a

Which I talk about in this video:


tim lindner
tlindner@macmess.org
1 member likes this: exidyboy
tlindner #119916 10/24/21 10:39 PM
Joined: Dec 2006
Posts: 534
M
Senior Member
Offline
Senior Member
M
Joined: Dec 2006
Posts: 534
Likely outdated by now, but there is MAME Music Scripts for some music display scripts

Last edited by mahlemiut; 10/24/21 10:40 PM.

- Barry Rodewald
crazyc #122609 08/16/23 03:15 AM
Joined: Apr 2006
Posts: 812
Likes: 3
D
Senior Member
Offline
Senior Member
D
Joined: Apr 2006
Posts: 812
Likes: 3
I tried out robotron plugin and I got an error.

Lua 5.4
Copyright (C) Lua.org, PUC-Rio

[MAME]> r = require "robotron"
error: error loading module 'robotron' from file '/home/mitchell/.mame/plugins/robotron/init.lua':
/home/mitchell/.mame/plugins/robotron/init.lua:7: unexpected symbol near '<'
[MAME]>

I guess it out of date for the MAME.


W11 Home 64-bit + Nobara OS / AMD Radeon RX 5700 XT / AMD Ryzen 7 3700X 8-Core 3.59 GHz / RAM 64 GB
Dullaron #122610 08/16/23 05:57 AM
Joined: Feb 2014
Posts: 1,100
Likes: 172
G
Very Senior Member
Offline
Very Senior Member
G
Joined: Feb 2014
Posts: 1,100
Likes: 172
I'm guessing that you're using the scripts from https://github.com/grunt2084/robotron-ai

All you really need to do is to change a couple ways to refer to objects and remove the () calls on machine()

then it seems to work.


from:
local screen = manager:machine().screens[":screen"]
local cpu = manager:machine().devices[":maincpu"]
local mem = cpu.spaces["program"]
local ioport = manager:machine():ioport()



to:
local screen = manager.machine.screens[":screen"]
local cpu = manager.machine.devices[":maincpu"]
local mem = cpu.spaces["program"]
local ioport = manager.machine.ioport

1 member likes this: Dullaron
crazyc #122615 08/16/23 06:17 PM
Joined: Apr 2006
Posts: 812
Likes: 3
D
Senior Member
Offline
Senior Member
D
Joined: Apr 2006
Posts: 812
Likes: 3
Same error as before. I tried those changes. I'm not worry about it. There too many / and some others.


W11 Home 64-bit + Nobara OS / AMD Radeon RX 5700 XT / AMD Ryzen 7 3700X 8-Core 3.59 GHz / RAM 64 GB
Dullaron #122616 08/16/23 07:06 PM
Joined: Feb 2014
Posts: 1,100
Likes: 172
G
Very Senior Member
Offline
Very Senior Member
G
Joined: Feb 2014
Posts: 1,100
Likes: 172
I think you're trying to treat it as a plugin when it's just a regular .lua file. I put robotron.lua directly in the plugins directory.

Then just

r = require "robotron"
r.start(4) -- give it a number from 1 to 4 for algorithm number


Bob-Z's version is basically the same changes.


https://github.com/Bob-Z/RandoMame/blob/main/bots_AI/robotron.lua

1 member likes this: Dullaron
crazyc #122618 08/16/23 09:39 PM
Joined: Apr 2006
Posts: 812
Likes: 3
D
Senior Member
Offline
Senior Member
D
Joined: Apr 2006
Posts: 812
Likes: 3
I fix it. I downloaded it wrong. Put all kind of crap in the file. Even my email for some reason. I downloaded it right this time with me log out of the website. That was so weird on what the website did. I was using the DownThemAll addon for the browser. All I had to do is to look for the download tab on the site. Anyway I solved the issue. smile


W11 Home 64-bit + Nobara OS / AMD Radeon RX 5700 XT / AMD Ryzen 7 3700X 8-Core 3.59 GHz / RAM 64 GB
crazyc #122630 08/17/23 02:43 AM
Joined: Apr 2006
Posts: 812
Likes: 3
D
Senior Member
Offline
Senior Member
D
Joined: Apr 2006
Posts: 812
Likes: 3
I didn't see the vectorkong on the list. https://github.com/10yard/vectorkong

For Ubuntu, Fedora and Nobara. (I tested this on these.)

Right click on the mame folder and then bring up the terminal. Paste this command from below and then hit enter to load it.

./mame dkong -plugin vectorkong -video opengl

For Windows.

mame dkong -plugin vectorkong -video opengl


W11 Home 64-bit + Nobara OS / AMD Radeon RX 5700 XT / AMD Ryzen 7 3700X 8-Core 3.59 GHz / RAM 64 GB
crazyc #122642 08/18/23 07:33 PM
Joined: Apr 2006
Posts: 812
Likes: 3
D
Senior Member
Offline
Senior Member
D
Joined: Apr 2006
Posts: 812
Likes: 3
How I get the Nibbler to work?

I keep getting the Maze1.lua missing error.

[mitchell@nobara-pc mame]$ ./mame -autoboot_script /home/mitchell/.mame/plugins/nibbler/nibbler.lua nibbler -w
Ignoring MAME exception: Error running autoboot script /home/mitchell/.mame/plugins/nibbler/nibbler.lua: runtime error
cannot open Maze1.lua: No such file or directory

Fatal error: Error running autoboot script /home/mitchell/.mame/plugins/nibbler/nibbler.lua: runtime error
cannot open Maze1.lua: No such file or directory

I even tried this.

./mame nibbler -console -window

r = require "nibbler" "Maze1"

=====================Edited

I got the SpaceZap working. I did on what Golden Child told me to do on the robotron. smile

Last edited by Dullaron; 08/18/23 09:05 PM.

W11 Home 64-bit + Nobara OS / AMD Radeon RX 5700 XT / AMD Ryzen 7 3700X 8-Core 3.59 GHz / RAM 64 GB
Dullaron #122644 08/19/23 02:06 AM
Joined: Feb 2014
Posts: 1,100
Likes: 172
G
Very Senior Member
Offline
Very Senior Member
G
Joined: Feb 2014
Posts: 1,100
Likes: 172
Try putting the nibbler.lua and Maze*.lua files in your mame directory,
cd to your mame directory, launch mame

then

dofile("nibbler.lua")


plus you have to make a couple of changes to the nibbler.lua file:

-- Define the hardware interfaces we'll use
local cpu = manager.machine.devices[":maincpu"]
--local cpu = manager:machine().devices[":maincpu"]
local mem = cpu.spaces["program"]
--local ioport = manager:machine():ioport()
local ioport = manager.machine.ioport

1 member likes this: Dullaron
crazyc #122645 08/19/23 02:50 AM
Joined: Apr 2006
Posts: 812
Likes: 3
D
Senior Member
Offline
Senior Member
D
Joined: Apr 2006
Posts: 812
Likes: 3
Thank you. It's working now. smile


W11 Home 64-bit + Nobara OS / AMD Radeon RX 5700 XT / AMD Ryzen 7 3700X 8-Core 3.59 GHz / RAM 64 GB
Joined: May 1999
Posts: 616
Likes: 1
Senior Member
Offline
Senior Member
Joined: May 1999
Posts: 616
Likes: 1
Originally Posted by Golden Child
I'm guessing that you're using the scripts from https://github.com/grunt2084/robotron-ai

All you really need to do is to change a couple ways to refer to objects and remove the () calls on machine()

then it seems to work.


from:
local screen = manager:machine().screens[":screen"]
local cpu = manager:machine().devices[":maincpu"]
local mem = cpu.spaces["program"]
local ioport = manager:machine():ioport()



to:
local screen = manager.machine.screens[":screen"]
local cpu = manager.machine.devices[":maincpu"]
local mem = cpu.spaces["program"]
local ioport = manager.machine.ioport

I applied your changes, but I'm getting the following error when trying to execute do.start()

[code[string "..."]:2: unexpected symbol near '.'[/code]

Carbon #122647 08/19/23 09:49 AM
Joined: Feb 2014
Posts: 1,100
Likes: 172
G
Very Senior Member
Offline
Very Senior Member
G
Joined: Feb 2014
Posts: 1,100
Likes: 172
Can you show the complete console text (commands + result) when you try to run it as well as the edited code?

I'm not quite sure what do.start() would do

The commands for robotron were:

r = require "robotron"
r.start(4)

-- give it a number from 1 to 4 for algorithm number

Last edited by Golden Child; 08/19/23 09:53 AM.
Joined: May 1999
Posts: 616
Likes: 1
Senior Member
Offline
Senior Member
Joined: May 1999
Posts: 616
Likes: 1
Originally Posted by Golden Child
Can you show the complete console text (commands + result) when you try to run it as well as the edited code?

I'm not quite sure what do.start() would do

The commands for robotron were:

r = require "robotron"
r.start(4)

-- give it a number from 1 to 4 for algorithm number

I'm trying to get SpaceZap to work, not Robotron. do.start() is a typo, I meant r.start()

Code
       /|  /|    /|     /|  /|    _______
      / | / |   / |    / | / |   /      /
     /  |/  |  /  |   /  |/  |  /  ____/ 
    /       | /   |  /       | /  /_     
   /        |/    | /        |/  __/     
  /  /|  /|    /| |/  /|  /|    /____    
 /  / | / |   / |    / | / |        /    
/ _/  |/  /  /  |___/  |/  /_______/     
         /  /                            
        / _/                             

mame 0.257	
Copyright (C) Nicola Salmoria and the MAME team

Lua 5.4	
Copyright (C) Lua.org, PUC-Rio

[MAME]> r.start()
error: 	[string "..."]:2: attempt to index a nil value (global 'r')
[MAME]> 


Last edited by Carbon; 08/19/23 04:40 PM.
Carbon #122649 08/19/23 05:05 PM
Joined: Feb 2014
Posts: 1,100
Likes: 172
G
Very Senior Member
Offline
Very Senior Member
G
Joined: Feb 2014
Posts: 1,100
Likes: 172
ok, let's try SpaceZap


download from https://github.com/FrankRizzo890/SpaceZapBot

extract the sz.lua and make a few changes:

--local cpu = manager:machine().devices[":maincpu"]
local cpu = manager.machine.devices[":maincpu"]
local mem = cpu.spaces["program"]
--local ioport = manager:machine():ioport()
local ioport = manager.machine.ioport
local in0 = ioport.ports[":P1HANDLE"]
local in1 = ioport.ports[":P3HANDLE"]


then just put the file in your mame directory and dofile("sz.lua") from the lua console.

[MAME]> dofile("sz.lua")
[MAME]>
[LUA ERROR] in execute_function: sz.lua:194: number (global 'test') has no integer representation
[LUA ERROR] in execute_function: sz.lua:163: number (global 'test') has no integer representation


It shows a bunch of errors, but it seems to work despite them.

It seems to have something to do with reading u64 and then getting a really big number and not being able to convert to an integer possibly?


test = mem:read_u64(0x5ECE + (i * 8))
if test ~= 0 then
if (test & 0xFF) ~= 0 then


just as a test of numerical precision:
[MAME]> a=1e15+1 print(a&0x3)
1
[MAME]> a=1e20+1 print(a&0x3)
error: [string "..."]:2: number (global 'a') has no integer representation
[MAME]> print(a)
1e+20

crazyc #122650 08/19/23 05:12 PM
Joined: May 1999
Posts: 616
Likes: 1
Senior Member
Offline
Senior Member
Joined: May 1999
Posts: 616
Likes: 1
Yeah, working now. Thanks Golden Child.

crazyc #122652 08/19/23 06:01 PM
Joined: Apr 2006
Posts: 812
Likes: 3
D
Senior Member
Offline
Senior Member
D
Joined: Apr 2006
Posts: 812
Likes: 3
I would like some more AI's. smile


W11 Home 64-bit + Nobara OS / AMD Radeon RX 5700 XT / AMD Ryzen 7 3700X 8-Core 3.59 GHz / RAM 64 GB
crazyc #122653 08/19/23 08:37 PM
Joined: May 1999
Posts: 616
Likes: 1
Senior Member
Offline
Senior Member
Joined: May 1999
Posts: 616
Likes: 1
It's mesmerising, especially Robotron.

crazyc #122657 08/20/23 01:03 PM
Joined: Jun 2001
Posts: 520
Likes: 33
O
Senior Member
Offline
Senior Member
O
Joined: Jun 2001
Posts: 520
Likes: 33
You're missing the r = require "robotron"

Joined: May 1999
Posts: 616
Likes: 1
Senior Member
Offline
Senior Member
Joined: May 1999
Posts: 616
Likes: 1
Originally Posted by Olivier Galibert
You're missing the r = require "robotron"

<deNiro>Are you talkin' to me?</deNiro>

I'm asking because like I posted above, everything works now, even SpaceZap that was giving me problems. My error was putting the script into the plugins folder instead of the MAME folder itself.

Last edited by Carbon; 08/20/23 06:04 PM.
Dullaron #122659 08/21/23 02:35 AM
Joined: May 2009
Posts: 2,214
Likes: 382
J
Very Senior Member
Offline
Very Senior Member
J
Joined: May 2009
Posts: 2,214
Likes: 382
Originally Posted by Dullaron
I would like some more AI's. smile

This is not a request thread. It's for people to either post cool scripts, or get help with specific problems.

crazyc #122661 08/21/23 04:27 AM
Joined: Apr 2006
Posts: 812
Likes: 3
D
Senior Member
Offline
Senior Member
D
Joined: Apr 2006
Posts: 812
Likes: 3
Yeah I know this isn't a request thread. Sorry. lol


W11 Home 64-bit + Nobara OS / AMD Radeon RX 5700 XT / AMD Ryzen 7 3700X 8-Core 3.59 GHz / RAM 64 GB
Page 1 of 3 1 2 3

Link Copied to Clipboard
Who's Online Now
1 members (Artiom), 289 guests, and 1 robot.
Key: Admin, Global Mod, Mod
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics9,320
Posts121,929
Members5,074
Most Online1,283
Dec 21st, 2022
Our Sponsor
These forums are sponsored by Superior Solitaire, an ad-free card game collection for macOS and iOS. Download it today!

Superior Solitaire
Forum hosted by www.retrogamesformac.com