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

Separating object code and subroutines from s2.asm #27

Closed
wants to merge 26 commits into from
Closed

Separating object code and subroutines from s2.asm #27

wants to merge 26 commits into from

Conversation

Leo40Git
Copy link

@Leo40Git Leo40Git commented May 28, 2019

DO NOT MERGE YET - WORK IN PROGRESS

Because having a file so big it outright causes Notepad++ to crash is kinda dumb.

ASM files will be organized like the Sonic 1 disassembly: object code and related subroutines go in the "_incObj" folder, while other subroutines will go in the "_inc" folder.

The file will be split using the JmpTo blocks as "delimiters" of sorts.

The 3 ASM files in the "misc" folder will be inlined into their object's ASM files (why are they separate, anyway?)


Note: I have no idea what kind of effect this might have on assembly time. If this is a bad idea, please tell me.

@Clownacy
Copy link
Member

Clownacy commented May 28, 2019

Last I checked, it wasn't the filesize itself that causes Notepad++ to crash, but actually its broken syntax highlighting.

Anyway, as I said here, personally I'd rather the ASM be broken up in a way that matches how the original source code was. Also, I don't think '_inc' and '_incObj' matches the disasm's naming scheme at all.

In case you don't know, a lot of people hate the S1 Git disasm specifically because of the way it was split. I've seen way more people complain about S1 being broken up than S2 being a single file.

@Leo40Git
Copy link
Author

...really? Huh. Welp, time to reset, I guess.
All those wasted Ctrl+C/Ctrl+V presses! /s

Just to clarify, splitting it based on your theory would mean that the JmpTo blocks act as "delimiters" between the files, correct?

@Clownacy
Copy link
Member

Yeah.

@Leo40Git
Copy link
Author

Leo40Git commented May 28, 2019

    if gameRevision<2
	nop
    endif

These "stray" NOP commands also seem to act as delimiters between source files.

@Clownacy
Copy link
Member

...I know. I already said that in the post I linked.

@Leo40Git
Copy link
Author

sorry, i cannot read

Music lists have been moved to the start of source/gamemode/level.asm

Also, all source files now have a header describing what they contain
@Leo40Git
Copy link
Author

Leo40Git commented Jun 5, 2019

sorry for dying for a bit

Anyway, some questions before I continue:

  • Should the initialization and V/H-int routines be separated from the main file?
  • As it stands, the DMA routines, the decompression routines, and the PLC + DPLC routines will be shoved into one file.
    Should this remain, or should they be further split? If split further, here's a rough idea about how it'll go:
    • DMA routines -> source/dma.asm
    • Nemesis, PLC, DPLC -> source/dec/nem.asm
    • Enigma -> source/dec/eni.asm
    • Kosinski -> source/dec/kos.asm

WaitForVint is just floating for now, might just leave it there
also, can't think of a better name for art.asm. part of the reason i want to split it into multiple files
yeah, all those were apparently in the same file. i'm definetly gonna have to do some further splitting later.
More details in header: gamemode files that also contain objects now list objects in header
@Leo40Git
Copy link
Author

Leo40Git commented Jun 5, 2019

I can't think of a good naming scheme that would work for both files containing one object and files containing multiple objects...

@Leo40Git
Copy link
Author

closed since A) i ended up just cloning S1's way and B) literally no one wants this

@Leo40Git Leo40Git closed this Jun 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants