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

Loading Offsets #81

Open
ibbstar opened this issue Jun 21, 2024 · 4 comments
Open

Loading Offsets #81

ibbstar opened this issue Jun 21, 2024 · 4 comments

Comments

@ibbstar
Copy link

ibbstar commented Jun 21, 2024

Is there a way to load different type of dplc offsets. Sonic games mostly use word pointers. The games I'm working on use word pointers but have additional word/long values or pointers used for various things like frame ID's/Object ID's etc. Flex2 see's these additional values as word pointers causing issues.

Something like this

Loadcues_Joe: dc.w 0
dc.w DMAJoe_Null-Loadcues_Joe
dc.w $1
dc.w DMAJoe_Stand1-Loadcues_Joe
dc.w $2
dc.w DMAJoe_StandBlock1-Loadcues_Joe

@kirjavascript
Copy link
Owner

it should be possible to support this.

I'm working on making mapping labels have retained names, and these names could be reused in the dplc output

is DMAJoe_Stand1 referring to a mapping definition, or something else?

@ibbstar
Copy link
Author

ibbstar commented Jun 23, 2024

DMAJoe_Stand1 is referring to DPLC location. The thing is if I edit the DPLC table so it removes the frame ID like this

dc.w DMAJoe_Null-Loadcues_Joe
dc.w DMAJoe_Stand1-Loadcues_Joe
dc.w DMAJoe_StandBlock1-Loadcues_Joe

Then it loads the sprite perfectly
Untitled

Below is what happens when loading the DPLC table with the frame ID

Loadcues_Joe: dc.w 0 ; Frame ID
dc.w DMAJoe_Null-Loadcues_Joe ; word pointer pointing to the DPLC
dc.w $1
dc.w DMAJoe_Stand1-Loadcues_Joe
dc.w $2
dc.w DMAJoe_StandBlock1-Loadcues_Joe

1Untitled

I've tried adding macros to differentiate what a word pointer and what a frame ID, it doesn't seem to work.

Loadcues_Joe: mappingsTable
mappingsTableEntryFrame.w $0
mappingsTableEntry.w JoeVRAMPos-Loadcues_Joe
mappingsTableEntryFrame.w $1
mappingsTableEntry.w VRAMPos_Stand1-Loadcues_Joe
mappingsTableEntryFrame.w $2
mappingsTableEntry.w VRAMPos_StandBlock1-Loadcues_Joe

mappingsTableEntryFrame macro frameID
dc.w frameID
endm

Regarding the frame ID, it is required to load the correct mappings.
Revenge of Shinobi and Streets of Rage 1 use a similar mappingsTable format for mapping and DPLC . I'm assuming Offset(dc.x) reads the word pointer tables, right?

@kirjavascript
Copy link
Owner

Ah I see now. It just needs an alternative offsetTable loader.

The frame ID stuff can be stored in the 'auxiliary information' section I have added in the new development version of flex 2

Could you send me the assets somehow so I can test? Doesnt need to be public. I should be able to support it after this

@ibbstar
Copy link
Author

ibbstar commented Jul 2, 2024 via email

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

No branches or pull requests

2 participants