| messiaen Catgirl Level: 68 Posts: 233/1085 EXP: 2594040 For next: 134760 Since: 11-20-07 Since last post: 8.1 years Last activity: 7.2 years |
|
||
| Maybe, but the problem is finding unused bytes in the RAM Object to hold all this stuff. Also, with this simpler approach you just have to create a separate behavior for each Koopa. Look how handy this is with the 0x04 Jump command: Koopa-The-Quick Alternate Path/Star Behavior: 00 05 00 00 <-- The first two lines are copied from the usual Koopa Behavior: 11 01 20 41 <-- Perhaps this one isn't even needed 27 3E 00 00 07 01 16 A0 <-- Pointer to path 27 3F 00 00 0B D6 11 94 <-- X, Y 27 50 00 00 EE 08 00 00 <-- Z 04 00 00 00 13 00 45 88 <-- Proceed to the usual Koopa Behavior (after the first 2 commands) So, that's just 40 bytes for each new Koopa, and it could be stored somewhere in the level bank (0x0E), so TT64 wouldn't have trouble knowning that this 0x07 Bank is the one currently loaded. The same jump approach could be used for the behaviors which have collision pointers. Here is a template: If I have enough time, I'll try this week to compile a list of all the "moving platforms" behaviors that will work just by changing the collision pointer. These will probably be enough for the next release of TT64 before using this kind of ASM hacks. Edit: I'm done with the list. I used one of my custom objects, set all the collision pointers in the behavior bank to it and now I'm using Yoshiman's spawn code to test stuff. Most behaviors work nicely with custom models/collision data, so with a very simple behavior interface you can assign interesting effects to the new objects. --- Edit2: Here's another ASM trick that can be potentially VERY useful. Looking through Cellar Dweller's Notes, I saw that some behavior commands are unused. So, I replaced the code of the 0x12 command with a modified version of the 0x0C (simple JAL) command. However, this new command can jump to data inside one of the level banks using the segmented_to_virtual (0x80277f50) function, which returns the virtual memory address of a segmented pointer. Sample usage: 12 00 00 00 07 01 16 A0 # Address must be word aligned (multiple of 4) Here is basically how the 0x0C command works: 80384688: LW T7, 0x0004 (T6) <-- Load argument from 0x0C command 8038468C: SW T7, 0x001C (SP) <-- Store in Stack 80384690: LW T9, 0x001C (SP) <-- Copy to T9 80384694: JALR RA, T9 <-- JAL to Register T9 80384698: NOP <-- Delay Slot And the modified version in the custom 0x12 command: 80384E20: JAL 0x80277F50 <-- Segmented to Virtual function 80384E24: LW A0, 0x001C (SP) <-- Ran argument from 0x12 command into this function 80384E28: SW V0, 0x001C (SP) <-- Save in stack [Not sure if it's necessary] 80384E2C: JALR RA, V0 <-- JAL to Register V0 [V0 = return value from segmented_to_virtual] 80384E30: NOP <-- Delay Slot |









.
. Offset tables will be actually needed for these master lists, the easiest solution being making it a direct RAM pointer which, if you don't see any problem with the previous suggestion of having a huge block of ROM data to be a exact mirror of the first meg of extended memory, could be easily converted to a specific ROM offset.
