Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated installation instructions & minor compatibility issue with Hivebrain 2022 #2

Closed
OrionNavattan opened this issue Aug 21, 2022 · 6 comments
Assignees

Comments

@OrionNavattan
Copy link
Contributor

Not sure where else to report this, but with the switch of Sonic Retro's Sonic 1 disassembly to AS by default, and the transition to Lua-based build systems for all three of the Sonic disassembles, the installation instructions that are currently on SonicRetro and SSRG are no longer applicable, and need to be updated.

Additionally, I can report that the ASM68K bundle works perfectly with Hivebrain's 2022 disassembly, although it does have a minor compatibility issue in the form of a conflict in the arguments formatting flags. (Changing 'dec' to 'deci' allowed it to build.)

dec equ $90 ; flag to display as decimal number

@vladikcomper
Copy link
Owner

vladikcomper commented Aug 22, 2022

Thanks for letting me know about the issue! And yes, it's the right place to report.

I didn't know about recent updates in Sonic Retro's disassembly and minor incompatibility with newest Hivebrain's one.

I'll update installation instructions eventually (when I have enough time to do so), probably migrating them to GitHub.

I hope to [officially] release an update to the debugger in a few months, with much improved AS support as well optimizations and fixes that accumulated over the years. Last release on SSRG was in 2018 and this repository is far ahead already.

@JGamer2151
Copy link

JGamer2151 commented Jun 13, 2023

Sorry for the long wait/bump, but thought it was worth sharing:

So in relation to the new Lua build system for the three Sonic disassemblies, I have found that the old way of installing ConvSym (the symbol extraction tool) does not apply anymore. However, I have found that it is not that hard for me to implement it into my own hacks with some trial-and-error and got it to work. I am using Sonic 2 here as an example, since I mostly used the error handler there. I am also using the most recent release of the error handler as well (version 2.0).

The steps of installing the error handler in Sonic 2 remains exactly the same as outlined in the guides, but during the ConvSym installation, after the step of turning off the padding, I moved the ConvSym tool into the build_tools/Windows-x86 directory, and under build.lua I did the following:

Under "-- Obtain the paths to the native build tools for the current platform." I put in "ConvSym" after the build tools. Here's an example:

-- Obtain the paths to the native build tools for the current platform.
local tools, platform_directory = common.find_tools("build tool bundle", "build_tools/source_code/", repository, "fixpointer", "saxman", "ConvSym") <-- ConvSym is added after the usual build tools

Then after that, under the code for fixing the ROM header (after "common.fix_header("s2built.bin")" but before "-- A successful build; we can quit now."), I put in the following:

if common.file_exists("s2built.bin") then
	os.execute(tools.ConvSym .. " s2.lst s2built.bin -input as_lst -a")
	print("Symbols extracted from s2.lst, ready for use with the Error Handler.") <-- I wrote this message to indicate that ConvSym works
end

Once all that was done, I built the ROM, and did some crash-testing, and it worked as intended!

This is just an updated (or more likely a quick-and-dirty) solution for the newer Lua-based Sonic disassemblies with symbol extraction support (in this case, the Lua-based Sonic 2 disassembly).

EDIT (06/13/2023): Removed "os.exit(false)" from the ConvSym code, as Clownacy mentioned it is only used for when an error occurs in assembling the ROM. I had it there just to test and verify if the ConvSym code works as intended.
EDIT (06/13/2023): Minor adjustments to the example code.

@Clownacy
Copy link

Nice work, though that os.exit(false) in the last block of code shouldn't be there: it's meant for signalling an error.

@JGamer2151
Copy link

JGamer2151 commented Jun 13, 2023

Thanks for the reply. The reason why "os.exit(false)" was there is because I wanted to “properly” see the message after it had finished to indicate that the ConvSym tool works as intended, otherwise it would only be shown for a split second before closing and I wouldn’t have any confirmation that it works or not (unless I use the Command Prompt).

I’ll remove it from the guide.

EDIT: Removed.

@vladikcomper
Copy link
Owner

vladikcomper commented Jun 25, 2023

It's been a long while, but things are finally coming together. I'm on the final stretch to release a huge update and I've finally got to the installation guides.

Here's the initial version of installation guide for Sonic 1 Github (AS version):
https://github.com/vladikcomper/md-modules/blob/feat/version_2.5_docs/modules/errorhandler/docs/installation/Sonic_1_Github_AS.md
(Note that you need to build Error Handler from the source code to properly test this, since it's not released)

Guides for other disassemblies, including Hivebrain 2022 will be added eventually. Once all the documentation is complete, the branch in question will be merged and the update will be released. You can track the progress in PR #23.

@vladikcomper
Copy link
Owner

All the documentation was updated. This includes installation guides for Sonic 1 Github (both AS and ASM68K), Sonic 1 Hivebrain (2005 is done, 2022 is started) and Sonic 2 Github.

I'm closing the issue since updating Sonic 1/2 Github AS was the main topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants