BAGOS the Scriptable Menu replacement!

Discussion in 'Supercard' started by BassAceGold, May 12, 2013.

?

Do you intend to learn BAGASMI scripting for this?

  1. Yes, I have already started!

    16.7%
  2. I intend to but haven't started.

    50.0%
  3. Haven't decided yet.

    0 vote(s)
    0.0%
  4. Nope, I will leach off other people's scripted creations.

    16.7%
  5. Nope, the scripting language is too difficult/complex/unintuitive

    16.7%
  6. Nope, waiting for better scripting features

    0 vote(s)
    0.0%
  7. Probably not, scripting isn't my thing.

    0 vote(s)
    0.0%
  1. BassAceGold
    OP

    BassAceGold Testicles

    Member
    495
    124
    Aug 14, 2006
    Canada
    Alright, so as promised in the "Design your own menu thread", I am releasing the current build of what is now being referred to as BAGOS (subject to change in the future).

    BAGOS is a menu for the Supercard DS2 which contains its own built in script interpreter (BassAceGold's psuedo-ASM Interpreter) for a language I mashed together called BassAceGold's ASM, or BAGASM for short.
    Why is it using my own scripting language? Well, its fast! Really fast. That's about it.

    The goal of this menu is quite simple, make everything script-able! So BAGOS is simply just a file browser, with the ability to launch scripts, run multiple scripts at once and run scripts on boot, allowing for users to script their own menu experience.

    Currently, menu integration is no where near complete. The target is for scripts to be able to interact with BAGOS's core browsers for things like: Obtaining a directory listing, operating on the currently selected file, etc. The core menu's are essentially the programs terminal, and eventually, scripts will be able to perform more features to flesh out the menu (like fetching cover art and icons, maybe a music playing widget script, or even small games!).

    With its current state, BAGOS isn't really suitable for general user consumption. Its just a bare-bones menu at the moment. What it can do is:
    • Load files using .arg files
    • Load nds roms through EOS (No nzip support yet)
    • Load and run scripts
    So if you are looking for a fancy menu to replace iMenu/EOS/BAGPlug, then you should probably check back months from now when script integration has been further worked on. In the mean time, for those who wish to just play around with scripting, or want a simple unpolished menu to use, then look no further!

    As far as menu updates are concerned, I'm thinking I want to try for bi-weekly updates that improve menu integration, and or, fix whatever bugs/ add requested features that end up in here.

    Installation is easy:
    • Unzip BAGMenu.zip
    • Copy _bagMenu folder to the root of your SD card.
    (OPTIONAL STEP)​
    If you wish to make BAGOS your main menu, then copy the _DSTwo folder to the root of your card.​
    This folder contains the newest DSTwo.nds and boot.ini to load the menu on boot.​
    If you just want to load BAGOS from BAGPlug or iMenu or whatever, then just load up the .plg file from the _bagMenu folder.​


    A couple things to note:
    -Some menu options don't work: Rename, create new directory, edit args <- things that require a keyboard​
    -Hiding and un-hiding don't work apparently, and there is no favorites menu (This will be a script later on).​
    -I recommend looking through the files in _bagMenu, you might find some useful things to tweak.​
    When you first boot the menu, you will be on the home screen
    • Pressing L brings up the file
    • Pressing R brings up the directory
    • Holding X while opening the file or directory browser will show all files
    • Pressing B goes back a menu
    • Pressing select on a browser entry will bring up the clipboard options
    • Pressing A on a file will bring up the launch menu option
    • Pressing Start on the home screen will bring up a window displaying the currently running scripts.
    • Pressing A on a script will bring up a list of options to perform on a script
    • L + R + Select should take a screenshot
    You can view/change the controls in _bagMenu/scripts/main.asm

    On with the download! [Release 2 (2013-05-22)]

    **Latest Binary** (2013-06-16)

    The wiki for BAGASMI scripting can be found here.

    The wiki doesn't cover some advanced topics yet, but soon will!
    Obligatory picture: File browser with the launch menu opened.
    [​IMG]
     
    CalebW, Boriar, Flame and 4 others like this.
  2. Sicklyboy

    Sicklyboy Resident Mechanical Keyboard Addict

    Global Moderator
    5,736
    4,738
    Jul 15, 2009
    United States
    [̲̅$̲̅(̲̅ ͡° ͜ʖ ͡°̲̅)̲̅$̲̅]
    Just had a massive BA-GASM :3

    also - areyoushittingme.tiff - I can't believe this is finally released! I was starting to think you had given up on it, which was a tiny bit disappointing. I can't wait to see how this turns out in the coming months.
     
    Aeter likes this.
  3. BassAceGold
    OP

    BassAceGold Testicles

    Member
    495
    124
    Aug 14, 2006
    Canada
    Well if by released, you mean a binary is out in the wild, then yes. It's going to take many releases to get it up to useable levels. For now, its simply just a testing ground to try and get people playing around with its scripting abilities.

    Every 2 weeks, I hope to have mini updates that expand the scripting abilities by some landmark. So over time, the advanced features people want from the other thread should hopefully be able to be scripted in.

    Some current ideas I have for scripts if people wanna give them a shot are:
    -Passworded menu:
    A script that denies menu use until a key combination is entered. This can be done fairly easily, and then set as the first entry in bootscripts.txt so its executed as soon as the menu loads.​
    -Language Changer:
    The language.ini file only contains English right now, but other languages can be added with no problems. A script could be made to change the language option in settings.ini. This script might have to wait for an update when ini file support is added to BAGASMI. There are some fat operations, but currently they are undocumented on the wiki.​
    My other script ideas rely on features that have yet to be added to the interpreter. Perhaps with each new release I could post some ideas that are now possible with each update.
     
    Sicklyboy likes this.
  4. BassAceGold
    OP

    BassAceGold Testicles

    Member
    495
    124
    Aug 14, 2006
    Canada
    Silly double posting.
     
  5. Sicklyboy

    Sicklyboy Resident Mechanical Keyboard Addict

    Global Moderator
    5,736
    4,738
    Jul 15, 2009
    United States
    [̲̅$̲̅(̲̅ ͡° ͜ʖ ͡°̲̅)̲̅$̲̅]
    BAG, this is, as far as I am aware, the third notable menu aside from EOS. If the binary loads (can't screw with my DSTWO right now, got shit to study for my finals in college), I'll see that as a functional beta, if it's lacking in features at the moment. And that's good enough for me.

    Congrats on getting this going, mate. :D
     
  6. VatoLoco

    VatoLoco Don't crush that dwarf, hand me the pliers.

    Member
    2,267
    277
    Jan 29, 2008
    United States
    Ya Cant Get There From Here
    Cool stuff, Bass=) it's going to take some time for me to wrap my head around learning to make scripts =P

    i imported some of my args from bagplug to try out. Noticed that Stella's bottom screen is a corrupt image, although the gameplay works. Using the same arg w/bagplug works fine.
    Also, i got this error after direct booting and playing a NeoDS game (which only works on DSL, not dsi or 3ds for some reason). To get teh error to go away I removed NeoGeo from settings.ini/LastDir = /NeoGeo

    [​IMG]
     
  7. BassAceGold
    OP

    BassAceGold Testicles

    Member
    495
    124
    Aug 14, 2006
    Canada
    Does Stella corrupt using the new DSTwo.nds? Or is the only difference BAGPlug and BAGOS? I'll look into that error you're having, it might be a bit difficult to track down the actual problem as the DS2 seems like corrupting its memory quite often.
     
  8. VatoLoco

    VatoLoco Don't crush that dwarf, hand me the pliers.

    Member
    2,267
    277
    Jan 29, 2008
    United States
    Ya Cant Get There From Here
    ah, i had been using you recently updated DStwo.nds . I switched it for the one provided in the BAGOS download and that fixed the glitchy bottom screen on Stella.
     
  9. BassAceGold
    OP

    BassAceGold Testicles

    Member
    495
    124
    Aug 14, 2006
    Canada
    In regard to your previous error, if you manually set settings.ini/LastDir = /NeoGeo, do you still get the errors on boot? Or does that only happen when you direct boot? Does it also happen if settings.ini/OpenLastDir = 0 and you try direct booting?
     
  10. VatoLoco

    VatoLoco Don't crush that dwarf, hand me the pliers.

    Member
    2,267
    277
    Jan 29, 2008
    United States
    Ya Cant Get There From Here
    it prolly has to do with the neods moonshell version being extlink and not arg.
    Yes, it still errors trying the manual entry and setting OpenLastDir = 0.
    I also changed my directory from NeoGeo to NeoDS, and curiously the direct booting on my DSi works, at least on the first boot, but then i need to delete the settings.ini/LastDir = /NeoDS or I get the same [dbg msg] error when i start up the BAGOS.plg.

    edit: appy-polly-logies for fixating on neoDS, as its an unofficial mod of the emulator anyhow. And i am impressed by BAGOS so far. just need a script for covers, and one for working mp3 playback=)
     
  11. BassAceGold
    OP

    BassAceGold Testicles

    Member
    495
    124
    Aug 14, 2006
    Canada
    Updated binary now in the first post.

    Changelog:

    So with this update, one noticeable change is that copy and paste now works properly.
     
  12. BassAceGold
    OP

    BassAceGold Testicles

    Member
    495
    124
    Aug 14, 2006
    Canada
    Another small update (See first post for link):

    I'm not sure if the lack of replies here indicate that no issues have been found with the last build (like the ones presented by VatoLoco) or not. If that is the case (there being no bugs), then I shall continue to work on improvements rather than continuing to check stability.
     
    Sicklyboy likes this.
  13. VatoLoco

    VatoLoco Don't crush that dwarf, hand me the pliers.

    Member
    2,267
    277
    Jan 29, 2008
    United States
    Ya Cant Get There From Here
    does this mean no internal loader atm (like bagplug uses hbmenu loader iirc)? Noticed when trying to use the 'internal' option to boot .nds files (commercial and homebrew), it just hangs at the 'booting file' screen. EOS option works fine for me.
     
  14. BassAceGold
    OP

    BassAceGold Testicles

    Member
    495
    124
    Aug 14, 2006
    Canada
    The internal loader is still there. I just had to pre-initialize a file handle to NULL to fix the problem:ph34r:. Updated the first post with a fixed binary.
     
  15. VatoLoco

    VatoLoco Don't crush that dwarf, hand me the pliers.

    Member
    2,267
    277
    Jan 29, 2008
    United States
    Ya Cant Get There From Here
    thank ya, sir. that did the trick =)
     
  16. BassAceGold
    OP

    BassAceGold Testicles

    Member
    495
    124
    Aug 14, 2006
    Canada
    I have quite the update this time around. It's mostly just new operations added to the script interpreter.


    Proper documentation (the Wiki) will hopefully be updated this weekend with all this new stuff. In the mean time, you can check out some of the new video operations in the new clock script now included in the base download.

    [​IMG]
    (Number sprites taken from AKAIO Blue XMB 1.0 by Cannonfoddr)

    One thing to note, the clock script is running on the top screen and redraws itself every frame. If you are running another script on the bottom screen that updates itself every frame as well, your frame-rate will drop in half. This is a limitation of the DS card slot transfer speeds. To fix this, either have your scripts all run on the same screen, or modify the clock script to only redraw itself every minute (This may cause problems if other scripts draw on the top screen, the clock might disappear till the next minute).

    Anyway, check out the first post for Release 2.

    New possible script ideas:
    • instead of using the physical DS buttons to bring up the menus, someone could make touch screen buttons to do so
    • fancier clocks!
    • calendars (this one could still be a bit challenging)
    • backgrounds that change based on time of day
     
    VatoLoco and Boriar like this.
  17. Boriar

    Boriar GBAtemp Fan

    Member
    314
    35
    Sep 22, 2008
    Spain
    Why not post on filetrip to archive purpose? Only ask for curiosity
    I really like how it evolve. I must to find some time to experiment (:gun: dawn work)
     
  18. BassAceGold
    OP

    BassAceGold Testicles

    Member
    495
    124
    Aug 14, 2006
    Canada
    Filetrip is a pain for rapidly uploading new versions on a whim (which i do quite often). Once the menu gets to a state where its usable for all users rather than its current experimental scripting stages, I'll start putting the legit releases on filetrip.
     
  19. BassAceGold
    OP

    BassAceGold Testicles

    Member
    495
    124
    Aug 14, 2006
    Canada
    The wiki has now been updated with the sprite and FAT stuff. The GETTIME operation will eventually make its way on a separate page where other system operations (that have yet to be added) will reside. Until then, if you need documentation on GETTIME, you can check out the clock script that is included with the BAGOS download.
     
  20. BassAceGold
    OP

    BassAceGold Testicles

    Member
    495
    124
    Aug 14, 2006
    Canada
    Sorry for the lack of updates. I just finished writing exams for the semester so now I should have a little time to do things.

    The next update is in the works and currently has:
    • ini file opening / reading
    • 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
    Planned for the update:
    • ini file writing
    • cpu frequency control

    What is/will be possible with this update:
    • can make settings files for your own scripts
    • can manipulate the menu's setting files within scripts (scripted option menus?)
    • CPU control scripts, could make a boost button, or attempt at making automatic CPU scaling
    Update should be out in a couple days, just need to make sure the ini file support is handled properly which brings me to this topic:

    How should errors be handled in BAGASMI?
    I'm talking about errors of missing files, as in, you try calling LDSPR to load a sprite and the image file doesn't exist. I've been jumping between two different ways.
    • The first method has the interpreter stop the script and report the error
    • The second method, a zero value is returned that could be detected with a JMPZ call.
    With the first method, you don't catch the errors yourself and the script halts immediately, where with the second method, you handle all errors yourself and could attempt to rectify the situation on your own.
     
    VatoLoco likes this.