Author Topic: Hacking tools  (Read 315 times)

Bonknuts

  • Hero Member
  • *****
  • Posts: 3292
Hacking tools
« on: September 18, 2015, 12:20:16 PM »
Mednafen is a great tool, but the more the better. Bizhawk offers trace logging, but there's something I've been using lately that can be specifically tailored per game or feature; LUA scripting. Bizhawk supports this as well. It's fairly powerful; it can overlay text and video directly over the emulator as well as log to a console window. You can read, write, and call functions on memory access (execution, read, write, etc). It's fairly powerful. With bizhawk, you can run multiple lua scripts, manually pause and resume, etc.

Gredler

  • Guest
Re: Hacking tools
« Reply #1 on: September 18, 2015, 03:18:36 PM »
Thank you for the insight Bonknuts.

I am so new to this whole workspace that I have no experience with current tools, the last emulator I downloaded was Nesticle before getting into this dev situation with DK.


I had heard about Mednafen and was wondering if that's the better option to bizhawk, but bizhawk is what DarkKobald has been using, so I wanted to have the same working environment as him, hence I've been using it as well.

I haven't toyed with lua or any of the scripting tools, but it would be really nice if I could create a debug palettes and sprites/tiles tool using a lua generated interface, do you think that's something bizhawk could support if I were to take the time to investigate?

I initially got involved in the Catastrophy project with hopes of getting a testbed to view spritework and tilemaps on the platform- basically a whitebox for artists to test assets. I am able to view the palettes that DK sets up, and swap out images that he spawns, but beyond that I am stuck limited by what he has implemented, and without programming knowledge I can not create scripted tools to control runtime changeable elements such as the palettes and tilemap assignment.

I would LOVE to setup a testbed for artists to import sprites, modify palettes, and test tilemaps. There is always a bit of transition time between creation, understanding, and implementation - and I'd love to create tools to limit that transition time as currently there is a lot of assumption and guesswork to how things should work (for rookies like me) :)

Again Bonknuts, thanks so much for sharing insight, I have had an atrocious time finding documentation and information relate-able to a laymen of even modern high level programming and scripting.
« Last Edit: September 18, 2015, 03:21:40 PM by Gredler »

Bonknuts

  • Hero Member
  • *****
  • Posts: 3292
Re: Hacking tools
« Reply #2 on: September 18, 2015, 04:06:10 PM »
Here's a sample lua script for Bonk's Adventure: http://pcedev.net/lua/pce/bonks_adventure_lua.zip


It basically shows the active sprites and objects. You'll need bizhawk to use it.

 Gredler: Overall mednafen has a much more powerful debugger, but bizhawk has features for debugger and such that mednafen doesn't have. You can't view vram or satb as hex, hover the mouse over tiles and sprites to get their cell number in bizhawk.. stuff along those lines.


Edit: Parodius
Notice the sprite overlaps on the bosses. It's one of the reason the game flickers in spots. If they had compiled sprites as a single layer without overlap, it would have reduced it.



Script file:
http://pcedev.net/lua/pce/parodius_lua.zip
« Last Edit: September 18, 2015, 06:59:33 PM by Bonknuts »

elmer

  • Hero Member
  • *****
  • Posts: 2153
Re: Hacking tools
« Reply #3 on: September 20, 2015, 08:57:32 AM »
Nice! Perhaps I should take a look at it.  :)

It would definitely be nice if Mednafen had some scripting support.

I keep looking for a "project" that would give me a chance to use Squirrel ... but some Lua-varient might be better choice for most people, despite the bloat.