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 - Retrozz

Pages: [1]
1
General / Re: Windows .bat files wont load in Attract Mode
« on: June 09, 2023, 05:28:17 AM »
I hope this helps the OP.. this works 100% and a lot less messing around..

executable           $PROGDIR\Start_Emu.bat
args                 "[romfilename]" stella_libretro.dll at2600
rompath              $PROGDIR\roms
romext               .a26;.zip
system               a2600;Atari 2600
info_source          listsoftware
artwork    flyer           $PROGDIR/extras/boxart
artwork    marquee         
artwork    snap            $PROGDIR/extras/videos
artwork    wheel           



for completeness.. near the start of my 'universal loader' batch (currently rewriting to a windows executable instead, but meanwhile...)

rem clear variables we are using
set game_file=
set core_name=
set emu_name=

rem check if user forgot to pass parameter
if [%1] == [] goto bad_filename
if [%2] == [] goto bad_filename
if [%3] == [] goto bad_filename

echo filename passed along was: %1 >>last_game_played.txt
set game_file=%1%

echo code name passed along was: %2 >>last_game_played.txt
set core_name=%2%

echo emulator name passed along was %3 >>last_game_played.txt
set emu_name=%3%

rem front end keeps putting / in filename!!!!! Let's fix that..
set game_file=%game_file:/=\%

**note that last line above.. AM puts / instead of windows/dos \ **

2
Scripting / Re: Need help (please) with magic token data comparison
« on: August 25, 2020, 08:13:49 PM »
Thanks again.. I understand the concept.. but don't know squirrel very well at all.

My last real coding was either x86/68k assembler, and C (not C++) so maybe a bit rusty :)

I assume I can find a quick tutorial on Squirrel itself? I've checked out the squirrel language page as well as having the Attract mode pages at the ready, but it's more of looking up functions as required.

Ultimately what I need is to have as you said.. a function to return to a variable a string OR an integer. Either one is fine. Something I can do a comparison with.

I see your code is doing what appears to be the same as mine in that your returning via function a variable.. which is a string? an integer, an object?

If I utilize the return from my function I can get it to display via fe.add_text as well which would indicate I've returned something (string, integer, object) that AM can process, EXCEPT within an IF statement specifically.

Appreciate the help and patience.. I understand coding basics.. been doing it as a hobby for decades. It's the specifics in Squirrel that seem to have me stymied. It works in all aspects except that darned IF. I tried to .tointeger() to no avail (not using blah obviously but just singular numbers 1-8)

In any event.. thanks for the help. It's very much appreciated.

3
Scripting / Re: Need help (please) with magic token data comparison
« on: August 24, 2020, 10:36:55 PM »
Sorry for delay.. got distracted (Flight Sim 2020 launch :) )

I am still  having a really hard time getting this to work properly.. here is my latest iteration:

// Check memory requirements for VIC20
//
function get_memory()
{
   local vic_mem = fe.game_info( Info.DisplayCount, 0 , 0 );
   return vic_mem;
}

if ([!get_memory] == "blah" )
{
   fe.add_text( "[!get_memory]", 1900, 260, 500, 150);
}

No matter what I test for with the IF command I can never get a match.. I've tried 1, "1" for a numeric value, tried a string value.. to no avail.

If I do a != it will just show every value.. it's essentially not working the same way it didn't when I was (improperly) using the magic token outside a fe.game_info() function <- as as said, I've tried different tokens in case some had to be numeric, or text, etc.

I can put whatever 'values' I need in the magic tokens (the game list) but I just need to be able to check the value consistently.

Please help!

Thank You.


Note: I've tried various 'magic tokens' and have a list with the following:

.\VIC20\Games\[CRT]\Multipart\Adventureland (1981)(Commodore)[SYS 32592].zip;Adventureland (1981)(Commodore)[SYS 32592];vic_games;Adventureland (1981)(Commodore)[SYS 32592];;;;;;;;1;NTSC;;;games
.\VIC20\Games\[CRT]\Multipart\AE (1982)(Broderbund).zip;AE (1982)(Broderbund);vic_games;AE (1982)(Broderbund);;;;;;;;2;NTSC;;;games
.\VIC20\Games\[CRT]\Multipart\AE (1982)(Broderbund)[a2].zip;AE (1982)(Broderbund)[a2];vic_games;AE (1982)(Broderbund)[a2];;;;;;;;3;NTSC;;;games
.\VIC20\Games\[CRT]\Multipart\AE (1982)(Broderbund)[a].zip;AE (1982)(Broderbund)[a];vic_games;AE (1982)(Broderbund)[a];;;;;;;;4;NTSC;;;games
.\VIC20\Games\[CRT]\Multipart\Alphabet Zoo (1982)(HES)(NTSC).zip;Alphabet Zoo (1982)(HES)(NTSC);vic_games;Alphabet Zoo (1982)(HES)(NTSC);;;;;;;;5;NTSC;;;games
.\VIC20\Games\[CRT]\Multipart\Alphabet Zoo (1982)(HES)(NTSC)[h][6000].zip;Alphabet Zoo (1982)(HES)(NTSC)[h][6000];vic_games;Alphabet Zoo (1982)(HES)(NTSC)[h][6000];;;;;;;;6;NTSC;;;games
.\VIC20\Games\[CRT]\Multipart\Apple Panic (1982)(Creative).zip;Apple Panic (1982)(Creative);vic_games;Apple Panic (1982)(Creative);;;;;;;;7;NTSC;;;games
.\VIC20\Games\[CRT]\Multipart\Apple Panic (1982)(Creative)
  • .zip;Apple Panic (1982)(Creative)
  • ;vic_games;Apple Panic (1982)(Creative)
  • ;;;;;;;;8;NTSC;;;games

.\VIC20\Games\[CRT]\Multipart\Apple Panic (1982)(Creative)
  • [a].zip;Apple Panic (1982)(Creative)
  • [a];vic_games;Apple Panic (1982)(Creative)
  • [a];;;;;;;;blah;NTSC;;;games



4
Scripting / Re: Need help (please) with magic token data comparison
« on: August 16, 2020, 07:34:36 PM »
Thanks! I'll try that tomorrow when I have time and post results.

5
Scripting / Need help (please) with magic token data comparison
« on: August 16, 2020, 02:22:41 PM »
Hi,

I am working on the latest MyRetrozz Mini (blatant plug) and stumbled across what I would have thought would be the easiest thing to do.. yet after 2 hours of trying many (some silly) options I am stuck and I need help...

Here is the data I am using as source (just a sample for testing):

#Name;Title;Emulator;CloneOf;Year;Manufacturer;Category;Players;Rotation;Control;Status;DisplayCount;DisplayType;AltRomname;AltTitle;Extra
.\VIC20\Games\[CRT]\Multipart\Adventureland (1981)(Commodore)[SYS 32592].zip;Adventureland (1981)(Commodore)[SYS 32592];vic_games;Adventureland (1981)(Commodore)[SYS 32592];;;16k;;;;;;NTSC;;;games

The field I am using is 'Category'

Side note.. if this helps anyone for something else.. this part works fine:

local memtype = fe.add_image ( "[Category].png", flx*0.364583333333, fly*0.4351851851851852, flw*0.1171875, flh*0.1134259259259259);

Here is where it does NOT work..

I need to set up specific conditions based on which 'Category' I am using, i.e. the value, 3k, 8k, 16k, 24k and this is (presumably) just text because it works in showing the correct picture on the screen.

What I thought was reasonable was (this is a debugging test):

if ("[Category]" == "16k" )
{
   local debug_showtext = fe.add_text( "16k cart found!", 1900, 260, 500, 150);
   debug_showtext.char_size = 20;
}

yet the condition never hits true.. if I do >= it will always show but that just shows the if and operand are at least doing something

I tried this variant (before I tried really silly options which are to ludicrous to show here):

local testvariable = "[Category]";
local debug_showtext = fe.add_text( testvariable, 1900, 240, 500, 150); <--- this does show something on the screen properly so I know the variable has the correct data
debug_showtext.char_size = 20;

if (testvariable == "16k" )
{
   local debug_showtext = fe.add_text( "16k cart found!", 1900, 260, 500, 150);
   debug_showtext.char_size = 20;
}


Help!

Thank You,

Retrozz  8)









Pages: [1]