Hacking BAGOS the Scriptable Menu replacement!

Do you intend to learn BAGASMI scripting for this?

  • Haven't decided yet.

    Votes: 0 0.0%
  • Nope, waiting for better scripting features

    Votes: 0 0.0%
  • Probably not, scripting isn't my thing.

    Votes: 0 0.0%

  • Total voters
    6

BassAceGold

Testicles
OP
Member
Joined
Aug 14, 2006
Messages
496
Trophies
1
XP
441
Country
Canada
New update! Check the first post for the link.

Includes:
  • Ini file reading/writing/modification
  • New sprite drawing system. You can now draw and change a sprite multiple times per frame without using more than one sprite slot. Currently you'll only be able to draw up to 32 objects per frame.
  • Sprite registers SX# and SY# (these were undocumented) are now removed in favor of the SETSPRXY operation
  • CPU Frequency control (cpu levels 0 to 18, 0-13 are standard sdk frequencies, 14 -18 are overclocks
  • Can now choose between automatic error handling or manual error handling in cases where external files may or may not be missing. (Using [Auto Error])
Sample Scripts:
Example reading BAGOS settings from ini file.
Example setting the CPU frequency.

Notes about features:

[Auto Error] - With this pragma set, the interpreter will automatically halt the script if a file that doesn't exist is passed as an argument to an operation (such as LDSPR, INI_OPEN, INI_WRITE, etc.)

Without [Auto Error], It is up to the scripter to handle the error cases on their own. CPU bit X is set on errors, and you can jump when this bit is set using the IFERR operation. For example:
Code:
LDSPR #0, "invalidPath.bmp"
IFERR no_sprite ;if LDSPR failed to load or no such file exists
....
no_sprite PRINT "Error loading sprite"
HALT


CPU Frequency - Not all CPU frequencies are stable on the DS2, so you may encounter decreased performance or even a hard lock when playing with these.

INI Files - If a section or entry doesn't exist in an ini file when reading or writing (INI_GET* and INI_SET*), they are automatically added. If you are adding new sections and entries, don't forget to call INI_WRITE to finalize the changes in the ini file.

Ini format:

Code:
[Section]
entry = value




The wiki should be updated sometime later this week. If anyone would like to help out with the wiki by writing some examples or even to clear up some explanations, just let me know and I shall get you set up on it! Then maybe the wiki could be updated immediately with the releases with more people working on it.
 
  • Like
Reactions: Boriar

BassAceGold

Testicles
OP
Member
Joined
Aug 14, 2006
Messages
496
Trophies
1
XP
441
Country
Canada
  • Like
Reactions: Flame

VatoLoco

Don't crush that dwarf, hand me the pliers.
Member
Joined
Jan 29, 2008
Messages
2,330
Trophies
1
Age
52
Location
Ya Cant Get There From Here
Website
www.backwoodzstudioz.com
XP
3,017
Country
United States
Thanks for the progresso soup update, Bass.
I have to admit, i also have been a bit slow. Im still at the super-basics of reading/learning the scripting language. But, cha know, summer is here and its hard to be productive and diligent...at least for me ;p

and speaking of animal farming, i just set up my new town in AC this mornin', so i may even be a bit more distracted than usual, too.
 

BassAceGold

Testicles
OP
Member
Joined
Aug 14, 2006
Messages
496
Trophies
1
XP
441
Country
Canada
Another Update:

Not much progress on the menu side of things. I am currently working on updating / improving the NDS build of BAGASMI to try and enter the neoflash competition again. Hopefully, this time around there won't be as much confusion as to what it is and does.

The NDS build of BAGASMI has its own built in file browser, and will eventually have a built in text editor for writing code on the fly. My plan afterwards is to eventually port the text editor portion to the Supercard as a stand-alone program and improve it (The NDS editor won't be too fancy).
 
  • Like
Reactions: Boriar

BassAceGold

Testicles
OP
Member
Joined
Aug 14, 2006
Messages
496
Trophies
1
XP
441
Country
Canada
Well that break went on longer than expected. Unfortunately, I never did get around to working on a the text editor, but I have made some progress on the interpreter side of things. I've been working on an interactive terminal mode for the PC/Linux build to make testing little bits of code easier. When you launch the interpreter on its own (that is, without supplying it a file), you can type up code in the terminal, and have it execute immediately on a line by line basis.

terminaldemo.png


Hopefully, once this is fully working, it'll make going through the wiki a bit easier.
 
  • Like
Reactions: VatoLoco

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    ZeroT21 @ ZeroT21: only ps5 updated to latest firmware can go on psn, jailbroken ones just don't use psn or they...