Advertiser Content
Non-binary
USA-PST
Seen 1 Day Ago
Posted August 6th, 2019
9 posts
141 Days
so I'm using a bit of math to calculate the approximate difficulty of a trainer battle before it starts. issue I am having is it's going to be a royal pain to debug and fine tune if I don't have some print out that's showing the calculations as they happen. seeing as otherwise my only information would be whether it crashes, freezes, or executes a script based on the result of the math. I've been using VBA-M to test my builds. does anyone know how to either make a console window pop up with a log I can print to, or write the log to a text file? I don't know how easy it is for this code to interface with the file system or console, but seeing as it runs in VBA-M which can save videos and screenshots I assume that at least the txt idea has the potential to work. I don't know how accessible the tools are to use the file system through the emulator though, so it may not work at all (I'm just assuming that you can't access the computer's file system through the gba file as it is built for a different architecture).
once I get the rest of the math put together and get rid of syntax errors I'll be looking into if I can put a solution together. but seeing as there have been people making complex things with this code base before I got here, I thought I would ask as it's likely someone out there has already figured out how to solve this problem.

note: I'm using pokeemerald, but I don't know if this post is applicable to the other disassemblies of not. I have it categorized as pokeemerald right now, if it happens to be applicable to the others just tell me and if I can edit that after I post this I will (and also remove this note as it will no longer be of use).
Non-binary
USA-PST
Seen 1 Day Ago
Posted August 6th, 2019
9 posts
141 Days
I found that there is a print function for gba games in VBAm. on the downside, it currently fails to print to the emulator's log. upon further investigation I found that the emulator devs never fully implemented the debug functions it relies on. they have it as a to do before the next big release, but I don't know when that will be seeing as I'm pretty sure they work as volunteers.
so in the mean time, I'm going to look into having a window with a text string pop up in game. It's not ideal as it will take a lot longer to read than a print out, but It should work for now.
Advertiser Content