Up until this weekend I took a break from the editor and only made some minor bug fixes. Yesterday I decided to spend some time trying to use libretro and the example lmsw code to get an emulator working inside the editor (internal emulator). This evening I got something working. It's buggy, but I was able to beat the intro stage of X2 inside the editor which is pretty cool.
April 20, 2016, 01:04:36 am - (Auto Merged - Double Posts are not allowed before 7 days.)
Here's a short video showing the intro stage being played in X2 inside the editor. You'll have to excuse my poor playing as I didn't have any megaman game when I was a kid.
I fixed some display bugs and got a basic gamepad controller to work. It attempts to load the current background tile and palette when the emulator changes it, but it isn't quite right yet. I'd like to get save states working among other things.https://www.youtube.com/watch?v=8QIwoahRn7M
April 22, 2016, 12:17:01 am - (Auto Merged - Double Posts are not allowed before 7 days.)
Here's the latest version with the internal emulator. When you cross a graphics/tile/palette load it misses several frames because the update code is slow right now, but otherwise it runs pretty good. I have to fix that problem.
The internal emulator works with X1-X3. It requires libretro (dll included in the zip).
- F12 or file->run internal emulator to start it. F12 also restarts it.
- Escape to terminate the emulator.
- Space to pause it.
- F1-F10 load state, shift+F1-F10 save state
- T still displays events.
- The current border lock is drawn as yellow rectangle and is updated when the emu RAM is updated.
- Graphics, tile, and palettes are updated when the emu RAM is updated. The editor doesn't always get these right, though. These are slow right now and either needs major rework or a separate thread with double buffering.
- Currently loaded sprites have a blue box around them. Ones that aren't loaded have a red box.
- Locks and some other changes are drawn on top of the emu so you can see exactly when they are activated.
- No keyboard support, yet. It only works with what I think is a standard joystick controller layout on joystick port 0 (first one). If you use joy2key try disabling it and see if your controller/joystick works. I need to add an internal emulator setup menu to assign custom keys/buttons.
There are all sorts of cool opportunities with this because I can read and write WRAM and update the editor as stuff happens in the emulator. Writing to the ROM/RAM in real time may also be possible, but would be a significant amount of work. For now I think the save states are sufficient for quick testing.https://drive.google.com/file/d/0Bx9gzQZCkH8qTlRfZEI3amJZbzQ/view?usp=sharing