Previous Thread
Next Thread
Print Thread
Page 2 of 3 1 2 3
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,080
Likes: 155
G
Very Senior Member
Offline
Very Senior Member
G
Joined: Feb 2014
Posts: 1,080
Likes: 155
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,080
Likes: 155
G
Very Senior Member
Offline
Very Senior Member
G
Joined: Feb 2014
Posts: 1,080
Likes: 155
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: 615
Likes: 1
Senior Member
Offline
Senior Member
Joined: May 1999
Posts: 615
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,080
Likes: 155
G
Very Senior Member
Offline
Very Senior Member
G
Joined: Feb 2014
Posts: 1,080
Likes: 155
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: 615
Likes: 1
Senior Member
Offline
Senior Member
Joined: May 1999
Posts: 615
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.
Page 2 of 3 1 2 3

Link Copied to Clipboard
Who's Online Now
0 members (), 46 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,310
Posts121,714
Members5,070
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