Main Menu
Main Page
Forums
Recent changes
Random page
Help

Databases
GlitchDex
AttackDex
ItemDex
TypeDex
UnownDex
More

Major Glitches
Trainer escape glitch
Old man trick
Celebi trick
Select glitches (Japan)
SRAM glitch
CoolTrainer♀ corruption
LOL glitch
Rival LOL glitch
Super Glitch
ZZAZZ glitch
Pomeg corruption glitch (Glitzer Popping)
Tweaking
Elite Four door glitch (Japan)
Pokémon merge glitch
Pokémon cloning
Time Capsule exploit
Arbitrary code execution
Coin Case glitch
More

Other Glitch Categories
Glitches by generation
Glitches between two generations
Japan-only/language specific glitches
Music glitches
Natural glitches
Non-core series glitches
Non-Pokémon glitches
Officially acknowledged glitches
Recurring glitches
Dead glitches

References
Pokémon GameShark codes
The Big HEX List
GB programming
Curiosities
Debugging features
Easter eggs
Error traps
Glitch areas
Glitch myths
Non-glitch exploits
Placeholder texts
Pokémon glitch terminology
Unused content and prerelease information

Useful Tools
8F Helper
GBz80 to Items
Old man trick name generator
PATH (Prama's Advanced Tweaking Heaven)
Save file editors
Special stat/Pokémon converter
Trainer escape Trainer Pokémon finder

Affiliates
Legendary Star Blob 2 (Hakuda)
Pokémon Speedruns wiki
PRAMA Initiative
Become an affiliate!

Search Wiki

 

Search Forums

 

Author Topic: Would this be useful?  (Read 2010 times)

0 Members and 1 Guest are viewing this topic.

pokechu22

  • Decamark Researcher+
  • *
  • Offline Offline
  • Gender: Male
    • View Profile
Would this be useful?
« on: May 01, 2014, 08:31:37 pm »
A long time ago I wrote a batch script for myself.  It's the console program that says "1 file(s) copied" in the background of some of my videos.  What it basicly does is constantly look for save-state #10, and then if it exists rename and move it into another folder, with a timestamp on it.  I use it a lot to allow accessing of older events, as you can write to it constantly and you won't loose anything.
I'm not going to share the origional script, as it is ugly and really buggy (EG: Rom names cannot have a space in them, because batch didn't feel like escaping charecters), but I'm working on a similar (but more complete) program in C#.  I'm curious if this would be imediately usefull, as I have a few other things I'm also working on.  When it's done I will share it, but does this seem like something I should spend most of my time working on?
When I underline text, that usualy means I am using the [‍acroynm] tag to provide aditional information.  Hover over it to view.
My youtube channel

blahpy

  • Yeah! Pomeg Berry!
  • Member+
  • *
  • Offline Offline
  • Gender: Female
    • View Profile
Re: Would this be useful?
« Reply #1 on: May 01, 2014, 09:44:25 pm »
That actually sounds very useful, when I'm doing TAS work I often end up having a fair amount of trouble trying to organise my hundred or more savestates.

I don't know what it's like for other emulators than Dolphin but I imagine other people would have similar issues.

Zowayix

  • Loose cannon mod who lives on the edge and doesn't play by the rules
  • Staff
  • *****
  • Offline Offline
  • Gender: Female
  • Cool story m8
    • View Profile
    • Youtube channel
Re: Would this be useful?
« Reply #2 on: May 02, 2014, 01:26:30 am »
but does this seem like something I should spend most of my time working on?

If it's something you feel is useful to yourself and you enjoy working on it, go for it. You may as well. It's not illegal to program something that you use but nobody else does. But aside from that, it does sound a bit like it could help people. Though if you're intending to actually make it for public use (as opposed to just for yourself and giving the source to people if they want it, which is an okay thing to do as well) you would want it to be configurable with which folder the savestates go into, etc.

Something to think about: Does it work (or is it going to work when made in C#) by just blindly checking for a file's existence in a loop, or that but with a sleep at the end of the loop? Or are you going to use something a bit more fancy and probably more recommended to check for files?


I DON'T THINK THIS SITE COULD EVER BE WORKSAFE

pokechu22

  • Decamark Researcher+
  • *
  • Offline Offline
  • Gender: Male
    • View Profile
Re: Would this be useful?
« Reply #3 on: May 02, 2014, 07:13:43 am »
but does this seem like something I should spend most of my time working on?

If it's something you feel is useful to yourself and you enjoy working on it, go for it. You may as well. It's not illegal to program something that you use but nobody else does. But aside from that, it does sound a bit like it could help people. Though if you're intending to actually make it for public use (as opposed to just for yourself and giving the source to people if they want it, which is an okay thing to do as well) you would want it to be configurable with which folder the savestates go into, etc.

Something to think about: Does it work (or is it going to work when made in C#) by just blindly checking for a file's existence in a loop, or that but with a sleep at the end of the loop? Or are you going to use something a bit more fancy and probably more recommended to check for files?

My C# implementation is using filesystemwatchers.  My batch one (which is one of the reasons why I'm redoing it in C#) uses a loop and the timeout /t 1 command. 

I'm working on making the newer one very configurable.  It seems that this will be useful to people, so I'm going to continue to work and try to make it functional in a useful way.
When I underline text, that usualy means I am using the [‍acroynm] tag to provide aditional information.  Hover over it to view.
My youtube channel

pokechu22

  • Decamark Researcher+
  • *
  • Offline Offline
  • Gender: Male
    • View Profile
Re: Savestate tool - Status update 1
« Reply #4 on: May 07, 2014, 04:17:59 pm »
Ok, status update time.  It's been about a week, and I've been working on this for that time.  It isn't perfect, but it is at around the point the original batch file was at.  While programing this, I've learned a few things:
1, C#'s settings system is confusing.  It doesn't like user-defined classes, nor does it like dictionaries.  From stackoverflow, there were two ways to fix it: Set up XML serialization methods (I tried that and it didn't work), or modify the computer-generated code for the settings class.  The problem with doing that is that the designer likes undoing your work.  The way to fix it was to add [global::System.Configuration.SettingsSerializeAs(System.Configuration.SettingsSerializeAs.Binary)] before the value.  I ended up moving that to a separate file so that visual studio didn't undo it.  For future reference, this is the code that I ended up with: 

Code: [Select]
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.SettingsSerializeAs(System.Configuration.SettingsSerializeAs.Binary)]
public global::GBSaveStateToolV2.RomDataItemDictionary ExtensionProperties
{
get
{
return ((global::GBSaveStateToolV2.RomDataItemDictionary)(this["ExtensionProperties"]));
}
set
{
this["ExtensionProperties"] = value;
}
}

2, if you have a constructor for a form, and you have a few other things pop-up during the constructor for getting required parameters, if you need to exit the constructor or program at user request you have to change the way the constructor is called:

Originally, I had this:
Code: [Select]
Application.Run(new StateUI(args[0]));I had to change it to this:
Code: [Select]
StateUI s = new StateUI(args[0]);
if (!s.IsDisposed)
{
Application.Run(new StateUI(args[0]));
}



Also, I've had other issues.  After messing around with MessageBoxes, I ended up with some stuff in a while loop.  (if one result is chosen, keep prompting the user until data is valid).  Only, I included too much code in the loop, so I ended up starting my emulator...from a while loop.  I'm coding this on my school netbook, which isn't the fastest computer (though still decent), so having 50 instances of VisualBoyAdvance-m.exe running would have killed it.  Fortunately, the emulator is only capable of having 5 instances running at once (legacy link code?), so I just got dialog box spam.  Still, not the most enjoyable experience. 

Image1
Image2



I'm probably going to be releasing an earlier version of this program soon.  Maybe by Friday, possibly over the weekend.  Here's the features I expect to have in this release:
  • Start a program and copy a configurable savestate.
  • Button to copy all current savestates into a backup folder
  • Button to copy all NEW savestates since last copy (using windows archive bit) into a backup folder
  • Some basic configuration per file extension, so that you can have multiple emulators and savestate formats backed up
  • Automatic backup of battery save files (which is optional and disabled by default, as it seems to copy stuff twice, and isn't too useful
  • Automatically closing emulator when the program is closed (might be buggy) (config exists but isn't editable)
  • Automatically closing program when the emulator is closed (might be buggy) (config exists but isn't editable)
Some of the stuff I plan to set up in later versions:
  • A global configuration UI, such that one can start the program manually and set up properties for different formats
  • A installer
  • Support for emulators that put savestates in a folder next to the emulator, rather than next to the rom
And some things that I might eventually add:
  • Improved UI format.
  • Notification area / system tray support
  • Special configurations for specific roms
  • Make configuration use XML or some other format rather than the binary format that I am currently using/forced to use

If you have any questions, let me know.
When I underline text, that usualy means I am using the [‍acroynm] tag to provide aditional information.  Hover over it to view.
My youtube channel