April 21, 2014, 09:43:59 PM
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
: Current Zelda Oracles Hacking Suite beta version:
0.05
Home
Help
Search
Login
Register
Primary Zelda Hacking
>
Oracles Hacking
>
Lists
>
Bank 0C event scripting code(WIP)
Pages: [
1
]
« previous
next »
Print
Author
Topic: Bank 0C event scripting code(WIP) (Read 592 times)
Jigglysaint
Hacking Guru
Full Member
Offline
Posts: 150
Bank 0C event scripting code(WIP)
«
on:
June 26, 2010, 06:07:47 PM »
This is an partical list of the various opcodes that are used in bank 0C for scripting purposes:
84 xx xx yy yy - Spawn event at yy yy
88 xx xx - Interaction co-ordinates are now this
98 xx xx - Display text.
B0 xx - Check dungeon room flag
B1 xx - Set dungeon room flag
B6 xx - set global event flags. How it works is that it's in sets of 16 bits. For example, values 00 to 0F will set bits for C6D0 and C6D1. Value 00 to 07 set the 8 bits in the first ram spot, and values 08 to 0F set the value for the second spot. 0F is the value for the level 3 turnstile event to be triggered, and that translates into C6D1(80). For the value, the upper nybble indicates which 16 bits to reference. 30 will set the bit that cleans the ocean because 0 sets bit 0, and 3 means it's the third pair. B6 will set the value during an event, but in other cases, both to write and to check, the value is loaded using 3E(right into A) and then it goes to a subroutine at 31F3. For example, the code to set the Maku Gate is 12, and somewhere in bank 10 is a code that indeed does that. The other in the global scripts in bank 04 checks for that value the same way.
CD - perform following event if item flag has not been set
D3 yy xx xx - Check for switch index. For example, 01 would mean check to see if switch 01 has been pressed.
D5 xx xx yy - Check memory location for exact value, exit script on false
DD xx xx - Spawn an item
E0 - Load ASM routine from bank 15
E3 xx - Load sound effect
E8 - Set tile at event location.
F6 - Check monster clear flag
«
Last Edit: July 15, 2010, 07:16:22 PM by Jigglysaint
»
Logged
Lin
ZOLE Creator
Administrator
Hero Member
Offline
Posts: 580
Re: Bank 0C event scripting code(WIP)
«
Reply #1 on:
July 01, 2010, 05:25:18 AM »
Wow, this is surely going to come in handy. Thanks!
And I think the reason I couldn't find the "checking code" for the opcodes is because it probably loads the accumulator with the opcode and does RST 00, which is what the game does with everything else.
Logged
Lin
ZOLE Creator
Administrator
Hero Member
Offline
Posts: 580
Re: Bank 0C event scripting code(WIP)
«
Reply #2 on:
October 22, 2010, 01:20:05 AM »
I've been debugging with various opcodes, and 83 catches my attention. It calls procedure 486, which I could've sworn is used for loading palettes, but also seems to be loaded with other things. Basically what it does is reads a 3 bytes pointer to read data from and throws 0x100 bytes of it into 0xC300. I'm not sure why, or what I'll call it. Other than that, 80 sets the interaction is enabled (atleast that's what I have marked for Dx44), 81 sets Dx45, and 82 I believe is not used.
Also, F5 and F6 seem to be the same thing, except something gets added to an address based on the lower nybble in the opcode. Are you sure F6 checks the monster clear flag? It doesn't seem like it, because something gets loaded and that gets written to Dx46.
«
Last Edit: October 23, 2010, 12:28:23 AM by Lin
»
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
The Site
-----------------------------
=> Announcements
=> Suggestions
-----------------------------
Oracles Hacking
-----------------------------
=> ZOLE
===> Bug Reports
===> Progress
=> Zelda Oracles Hacking Suite
===> Beta Releases
=> ZOLE Live
=> ZOSE
===> Bug Reports
===> Progress
===> Help
===> Tutorials
===> Scripts
===> Show Off
=> Help
=> Opinions and Experiments
=> Discussion
=> Lists
=> Tutorials
=> Projects
===> Ideas
=> Tools
=> Finished Hacks
-----------------------------
Link's Awakening Hacking
-----------------------------
=> LALE
===> Suggestions
===> Bug Reports
===> Progress
=> Help
=> Opinions and Experiments
=> Discussion
=> Lists and Data
=> Tutorials
=> Projects
===> Ideas
=> Finished Hacks
-----------------------------
General GameBoy Hacking
-----------------------------
=> Hacks
=> Help
=> Documents
=> Projects
=> General GameBoy Talk
-----------------------------
Other
-----------------------------
=> General Discussion
=> Programming Discussion
Loading...