The java files? I don't know, I think they can be compiled into .exe? And if it's simple enough for window TAS - you might get better answer at this thread.
It's entirely possible you'd find yourself having to write a one-off TAS engine for each game. Thus, while it might be possible, it's probably not feasible.
Pyrel - an open-source rewrite of the Angband roguelike game in Python.
It would be cumbersome. There's no notion of a frame in java, a key event can appear at any point during operation, and if it's multithreaded then threads can run in any order the OS decided.
The developers @ sun already made the Java(TM) Platform Micro Edition SDK 3.0 which comes with an emulator. I'm planning to do some research about the possibility to TAS j2me games.
edit: Okay, I've ended my research.
I assume you meant MIDlets that playable on mobile phones. I don't have much free-time, so I'm not sure I will start writing an emulator atm, however I wrote down some guidelines:
- The required APIs
Sun's newer and older APIs (midp 1.0 ~ midp 2.0 and others), manufacture specifics (from Nokia, Motorola, Sony Ericsson) and some others (OpenGL ES and audio relateds like mp3/ogg)
- Jar verification
Ask game developers for some checksums of their original games. Also make a backup of the original Jar file when you load it.
- Frames?
To make a movie file, I recommend using a special time-based input file where the smallest time unit is microsec. Can't come up with better atm. Here's an example movie file:
0 p5 //press 5 at 0 microsecs
352 h5 //press and hold 5 at 352 microsecs
678 p3 p7 //press 3 and 7, release 5 at 678 microsecs
- Keys?
Inputs can range from 19 keys to qwerty layout. Don't forget extra buttons like restart/resume/shutdown and volume controls etc.
- Emulator options I should want to use while tasing a game
Ability to play on custom resolutions (if the game scretches the game screen).
Memory viewer.
Code viewer.
Fancy animation when vibration occurs.
Here's an example of making a very basic emulator: http://www.longsteve.com/?p=4
PhD in TASing 🎓 speedrun enthusiast ❤🚷🔥 white hat hacker ▓ black box tester ░ censorships and rules...
I doubt if this kind of emulators simulators can be "accurate as the real hardware" to any degree, since the "J2ME Virtual Machine" on which the code runs does not emulate any real hardware at all. Could we be satisfied with a theoric "Generic J2ME Gaming Platform"?
EDIT: More specifically about accuracy.
<klmz> it reminds me of that people used to keep quoting adelikat's IRC statements in the old good days
<adelikat> no doubt
<adelikat> klmz, they still do
My post in this thread is outdated, at least refer to the latest Post #291342. My latest investigation shows that it's possible to make ~95% accuracy emulation (just like for NES), however this kind of tasing can be abusable as hell (custom resolutions, no source of valid ROM checksums, and many other things that already mentioned by you, others and me.).
PhD in TASing 🎓 speedrun enthusiast ❤🚷🔥 white hat hacker ▓ black box tester ░ censorships and rules...
Funny this should be brought up. For ages the only j2me emulator I could find was Midp2Exe, and that got out of date pretty quickly. Then there was SjBoy, which is much better, but there are still some games I have that are just too large to fit in the available resolutions (and it hasn't been updated since either).
So I hope this means we might actually get a regularly updated emulator.
Guys...
Also every bigger manufacturer has their own "emulator".
Just like Nokia, Sony Ericsson, Samsung (their dev site is down at the moment for some hours), etc.[/url]
PhD in TASing 🎓 speedrun enthusiast ❤🚷🔥 white hat hacker ▓ black box tester ░ censorships and rules...
Joined: 4/17/2010
Posts: 11480
Location: Lake Chargoggagoggmanchauggagoggchaubunagungamaugg
Hey look what I found!
http://code.google.com/p/microemu/downloads/list
EDIT:
Tested it a bit with Diamond rush (the game that got me started). Most of the versions don't work, but there are some that do, if you disable sound: 176x220 for sagem and sony, and 3 less powerful versions: 126x160 for sagem and lg, and 132x176 for siemens. The latter 3 seem to work with sound too, but lag as hell.
Overall the emulator IS pretty bad, laggy and glitchy, so it won't make sense to make it rerecord (yes, it's the only open-source mobile emulator), but its cores can be examined and used whenever a normal emulator is started by someone.
Note: it seems to support iOS and Android games too, but I haven't tried.
EDIT:
Shit, microemu was already linked here, haha. That link is long broken anyway.
EDIT:
With 9000 models of mobile phones that this platform is supposed to supply with game support, I doubt hardware-like accuracy is even a matter. We must replicate the platform, not the phone. It makes sense, since that platform was designed to be ran on anything, as long as the virtual machine is supported. I'd say as soon as it syncs with real games images, it's legit.
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Joined: 4/17/2010
Posts: 11480
Location: Lake Chargoggagoggmanchauggagoggchaubunagungamaugg
There's also this open source emulator from Sun:
http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-javame-419430.html#MIDP-2.0-OTH-G-F
It works (after some real magic), but has little to no sound, and doesn't support some more complex midlets. But it's written in C. In theory, it could be turned into a rerecording thing. It's not for msvc though.
The easiest way to use it is:
midp -install URL-to-the-jar-file
midp -run the-resulting-storage-entry
The screen is fixed and small btw, so this also would need hacking.
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Joined: 4/17/2010
Posts: 11480
Location: Lake Chargoggagoggmanchauggagoggchaubunagungamaugg
LOL, I managed to build it.
http://tasvideos.org/Feos/MIDP.html
The license of this thing is quite interesting. Are there any experts around, that could tell if it's theoretically possible to post the modified source to github? Otherwise, we can only distribute patches, like gnupoc does. Because there's no way to actually make sure the one who decides to obtain the sources is in fact a licensee.
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
There may be some progress toward TASing Java games via PCem. Similar to the Flash situation, I have been able to run games in Tiny Core 7.0, this time by using the OpenJDK 8 JRE. Both FreeJ2ME and MicroEmulator work to various degrees. Sound may not work, likely due to an error in how PCem emulates the ES1371 / Sound Blaster PCI 128 card. You can get the hard disk image for experimentation here (size approximately 67.5 MiB). See the readme file for a possible workaround for the sound issue.
This is the process I've used to get games running:
After reaching the boot prompt, mount the device that contains the emulator and the game files. For example, sudo mount /dev/sr0 /mnt/cdrom.
Create a file to run the emulator after the X server starts. For example, echo /usr/local/openjdk-8/jre/bin/java -jar /path/to/freej2me.jar > .X.d/java (tab completion is your friend)
Run xsetup to set up graphics and mouse options.
Run startx to actually start the X server.
Open the game's JAR file from within the emulator.
FreeJ2ME does take command-line arguments for loading games. It seems to expect an URI pointing to the JAR file, followed by optional numbers for the width and height of the display. Something along the lines of file://localhost/path/to/game.jar 100 200 should work to load game.jar with a width of 100 pixels and height of 200 pixels. So that echo line from above would become
Joined: 5/22/2020
Posts: 197
Location: Chennai, India
I am nowhere near knowledgeable about these stuff, but seems like this is an open source emulator? https://github.com/nikita36078/J2ME-Loader
One disadvantage is that it seems to be for Android only, but it is by far the most bug free emulator atleast for the games I tested.
Joined: 4/17/2010
Posts: 11480
Location: Lake Chargoggagoggmanchauggagoggchaubunagungamaugg
It's a great emu indeed but I don't know of a good way to emulate android in a tasable environment, and it's non-trivial to posrt j2meloader to windows or linux.
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Joined: 5/22/2020
Posts: 197
Location: Chennai, India
Hmmm. Maybe it is possible to make a modified version of Android that can sort of natively support TASing? Considering that it is sort of based on Linux and is open source, maybe something similar to libTAS can be developed for it? That would not only solve this but open doorway to TAS countless android games as well! But perhaps thats a topic for another thread...
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Joined: 4/17/2010
Posts: 11480
Location: Lake Chargoggagoggmanchauggagoggchaubunagungamaugg
https://nnp.nnchan.ru/ml/MahoLator is a J2ME emulator for PC. It's based on MahoTrans - interpreter JVM written on C# completely from scratch.
Custom JVM implementation allows cool things. MahoLator aims to provide:
No dependency on "conventional" java tools in your system
Built-in debugger and application state explorer
Taking/loading snapshots of application states
Input record, playback and edit
"Strict" mode with 100% accuracy and reproducibility
Project is in beta state. Performance and compatibility is work in progress. Expect things to break. Please, report found issues to our chat.
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.