Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Bgoulette

Pages: [1] 2 3 ... 8
I _think_ I successfully patched Mame .198, but I don't know for sure. Maybe it's moot: when I run the make command, a buncha stuff scrolls across the screen, but then errors start appearing, thing like deprecated functions, etc., and after a while, it says it failed and gives another error code. (I don't have a screen shot at the moment: I'll try to get one and update this post.) Sorry for being so annoying, but thanks for any help!

(I also tried with .223 and got the same error when trying to compile.)

Okay, I extracted patch.exe and placed it in the msys64\src folder. When I run the command listed in the first post:

Code: [Select]
patch --binary -p0 -E <C:\msys64\src\hi_XXX.diff

there's a slight pause (almost imperceptible) and then I get the prompt again. Should I see any kind of message if patch was actually successful?

After I run patch, I exit the console, restart the console, and from the [MINGW64] C:\msys64\src> prompt type
Code: [Select]
make and hit Enter, but it says no target specified. As always, thanks for any help!

Thanks, @hermine.potter. I downloaded GnuWin from that link, and it gave me an installer for patch-2.5.9-7-setup.exe. Forgive my noobness, but is this the file I need? I haven't extracted it yet -- not sure if it goes in the msys64 directory or somewhere else. (I did try getting patch through msys64, but got the same failure messages.) I appreciate your help!

EDIT: I extracted GnuWin and Python and attempted to patch msys64\src, but after the cmd prompt opens, and after patch.exe opens, all I get is a blinking cursor in the patch.exe dialog :( I'll keep trying the pacman method. Unless I've overlooked something? Thanks!

EDIT 2: That didn't work, and I'm still getting the same failure message when I try to get patch via pacman :( Any other ideas? Thanks!

EDIT 3: All right, I found, but I'm not sure where I should extract its contents? As you can tell, I have no idea what's going on! Thanks again for any help anyone's able to provide!!!

I'm trying to recompile for .204, but when I try to run the pacman -Syuu patch command, everything fails spectacularly. Is there some other trick to downloading patch? Thanks!

General / Re: How to view enlarged snaps in Attract Mode
« on: February 18, 2019, 06:18:57 PM »
This sounds fairly straight forward -- so long as it's kept fairly rudimentary. Unless someone beats me to it, I'll see if I can knock something out tomorrow or the next day.

Scripting / Re: Aspect Ratio?
« on: February 12, 2019, 02:16:19 PM »
Have you considered the preserve-art module? Using the set_fit_or_fill() method with "fit" should give you the same result in a more predictable manner. I think. Just a suggestion!

Scripting / Re: Easy way of forcing Uppercase text
« on: February 05, 2019, 04:19:20 AM »
split(string, "(/[");

Yeah, that's much better! Now I have some updates to make...

Scripting / Re: Easy way of forcing Uppercase text
« on: February 04, 2019, 03:15:58 PM »
I wrote a function to "re-sanitize" titles when using magic tokens:

Code: [Select]
function getTitle (ioffset = 0) {
    // Working from the raw title, we have to cut away any extra junk:
    local _t = fe.game_info( Info.Title, ioffset );
    // Ignore anything after the first (, [, or /:
    local _i = null;
    _i = _t.find( "(" );
    _t = _i ? _t.slice( 0, _i ) : _t;

    _i = _t.find( "[" );
    _t = _i ? _t.slice( 0, _i ) : _t;

    _i = _t.find( "/" );
    _t = _i ? _t.slice( 0, _i ) : _t;
    return strip(_t).toupper();

Scripting / Re: Diving into squirrel-scripting: some questions
« on: January 31, 2019, 12:11:28 PM »
Code: [Select]
::Displays = {};
for ( local i = 0; i < fe.displays.len(); i++ ) {
    ::Displays["sys" + i] = fe.displays[i];

Access slots like this (these are all equivalent):

::Displays["sys" + 0.tostring()];

That should work (not at home: can't test it), but it just gives you a table-ized version of the already existing fe.displays array. Unless you're passing something else where I've included fe.displays

Scripting / Re: Check if a slot exists?
« on: January 31, 2019, 07:27:38 AM »
Haven't had a chance to try it out yet, but I wrote a convenience function that should allow for cleaner code. I'm posting it here in case anyone else encounters similar circumstances:

Code: [Select]
function exists (t, s) {
// Pass a known table (t) as-is and an unknown slot (s) as a string:
try {
// Perform some non-destructive operation to determine existence:
// (I wonder if just referencing the potential slot would work?)
return true;
catch (e) {
return false;

// Usage example:
myImage.alpha = ( exists(table, "slot") ) ? 255 : 0; // If table["slot"] exists, set myImage to full alpha; otherwise, set it to 0

If I get home and discover this doesn't work, I'll try something else!

Scripting / Re: Check if a slot exists?
« on: January 30, 2019, 02:07:32 PM »
That's what I'd run into, I think. I had it in mind to write an adjunct function that I could pass properties to, but then I realized they'd fail during the initial call (I think), since there's potentially no property to pass? I'll probably give it a try just to see. Unless someone comes up with something better in the meantime! ;-)

Scripting / Re: Diving into squirrel-scripting: some questions
« on: January 30, 2019, 08:46:30 AM »
So long as your "composite" element exists on the main table (fe), you should be able to do what you want. I have a bunch of variables that I've defined like this (for example):

this.rom_1942 <- {
    "btnA": "Fire",
    "btnB": "Loop"

Later, in a function, I want to get the values of btnA, btnB, etc., based on the currently selected game, so I reference it like this, for example:

::print( this["rom_" + fe.game_info(Info.Name)].btnA + "\n" ); // Prints "Fire" (no quotes) to the console

That's off the top of my head. I'm not in front of my "real" code, but I think the above is accurate.

Scripting / Check if a slot exists?
« on: January 30, 2019, 06:52:27 AM »
This is probably a silly question, but I haven't been able to divine an answer through the Squirrel reference docs or googling.

I'm used to Javascript (Actionscript, really), where I could test for the existence of an object property something like this:

Code: [Select]
if (obj.prop) {
    // Property exists: do stuff:
else {
    // Property DOES NOT exist: do something else:

If I try something similar with Squirrel (in my layouts), I get an error because the slot doesn't exist. Currently, I have a rat's next of try..catch statements to determine whether a slot exists, but it's messy (even though it works). Is there a cleaner way to handle checking whether a slot exists?

Scripting / Re: Drop shadow layout, may be turned into something useful?
« on: January 29, 2019, 11:16:43 AM »
All you should have to do is unzip the archive in your modules folder (attract/modules/shadow-glow). Nothing needs to be renamed. In fact, renaming anything will probably break things!

Once that's done, in your layout, before you want to apply the drop shadow, use this line: fe.load_module("shadow-glow")

Once those things are done, you'll need to create an instance of your snap first, then apply the drop shadow, maybe something like this:

Code: [Select]
// Load module so we can instantiate DropShadow:

// Create a quick and dirty background (drop shadow won't show up against black!):
local bg = fe.add_text("", 0, 0, fe.layout.width, fe.layout.height);
bg.set_rgb(127, 127, 127);

// Create our artwork and apply a drop shadow to it:
local mySnap = fe.add_artwork("snap", 0, 0, 320, 240)
local myDropShadow = DropShadow(mySnap, 50, 10, 10, 153)

// If we want something other than pure black, we can tweak the drop shadow color:
myDropShadow.set_ds_rgb(0, 0, 51);

The values in that example are arbitrary, but should give you an idea of what's going on. Let me know if that doesn't work. I assume you're using the most recent files (from the post you quoted)? The others had some flaws!

(Edited to include comments and stuff.)

Scripting / Re: Drop shadow layout, may be turned into something useful?
« on: January 29, 2019, 03:12:24 AM »
One last (?!) iteration of the shader-glow module, based wholly on zpaolo11x's drop shadow and ambient glow shaders and code:

Pages: [1] 2 3 ... 8