News:

11 March 2016 - Forum Rules

Main Menu

Solstice Randomizer (NES)

Started by pbandpickle, June 08, 2020, 06:46:11 PM

Previous topic - Next topic

pbandpickle

#20
Well, the magic boot randomizer being broken makes complete sense as I am incapable of fixing anything without breaking something :P I'll review this later today.

I will review my detonator code again and will implement the room change that you have suggested.

EDIT:
-The magic boot randomizer appears to be working as intended. Please note that there are currently only 10 spots where the magic boots will spawn and 3 of them are in A3. So currently, there is a 30% chance the boots will be there. This will not be as prevalent once magic boot randomization is expanded.

-Detonator randomization is now disabled for the time being.

pbandpickle

Slight update. I fixed up the graphics a bit in rm 0x30. It's still a bit jacked but much better than before. I probably won't be touching it any further as solstice graphics are kind of complicated.

If playing on Random Start, room 0xFC has received a complete redesign to prevent a softlock while also making the room not boring. If you do not use random start, this room stays vanilla.

Here is the current roadmap:
   1. Fix detonator randomization
   2. Fix color correction
   3. Expand magic boots randomization
   4. Any other goofy things I can think of.

I haven't had as much time to work on it as I would like but I'll still be updating periodically.

Also, one randomization quirk i need to fix:
   Both rooms 60 and 5E are valid locations for Cave of the Doomed Souls key. This means if you happen to drop down the wrong shaft, it's a softlock. I may adjust this so that it can not spawn there but I dunno.

Another note, I am very curious what bytes 0x01A371 -> 0x01A3FE are used for. These bytes are strangely sandwiched between data for room 0x45 and 0x46 but is definitely NOT room data. I'll like to look into that some day....

pbandpickle

Not much to add except detonator randomization has been fixed. All this time I assumed there was something wrong with my randomization code when it was actually a side-effect of the game's programming.

Detonators are still only randomized with detonators but they should work correctly now. The only sideeffect is that you can hit the same detonator multiple times (doesn't do anything extra). It will never show a trigger detonator. Also, detonator randomization is forced on at the moment. I'll fix it during my vacation next week.

pbandpickle

***NEW UPDATE***

Expert Mode! - Start with 0 lives, cannot gain more lives, start with 1 use of each potion. Cannot hold more than 1 usage of each potion
New "Bottomless Hole" in the Caves of the Doom Souls when playing rando (to prevent softlocks)
Teleporter randomization now works instead of just pretending to work! wow!
Other miscellaneous bug fixes and text changes

detonator rando is still forced on. That will be a included in my next update.

pbandpickle

#24
I was hoping to get detonator randomization done today but I ran into some issues. My next update will be out probably next weekend and will feature full detonator randomization and a greatly expanded magic boots randomization.

September 05, 2020, 10:50:22 PM - (Auto Merged - Double Posts are not allowed before 7 days.)

*** New Update is now live and contains the following features: ***

-Full detonator randomization (optional)
-Greatly expanded Magic Boots randomization (10+ more rooms it can appear in)
-"Fix object color palettes" actually works now

There are a few important notes about this latest update:

-Detonators will NEVER be replaced with a "triggered" detonator but they still work
-Enabling Magic Boots randomization will also apply the Random Start room edits. Sorry.

I pretty much break something every time I update it so plz let me know if something is not working or seems strange. Also, some room edits will seem strange (that's on purpose).

JonnyManjiro

Got through a seed of this with the latest build. Really enjoyed it and hope you keep up the good work ;)

pbandpickle

I'm finally coming back to this after a personal hiatus. I'll have some additional randomization options soon and finally fix the item color correction. The item color correction logic is technically correct but does not use the right colors due to a documentation error on my part. I plan to implement an update by this weekend.

pbandpickle

#27
Heeeeeey, so this isn't dead. I did fix the color correction several seeks ago but forgot to update this topic. In other news, I finally found the room pointers. I'm not super knowledgeable with assembly or anything so figuring this out took quite a long time. With this info it should be fairly easy to make all sorts of adjustments to rooms.

Room Pointer Data:

Room pointer data starts at 0x18010 in the rom. The pointers are stored in two groups, the first byte for all rooms, in order, followed by the second byte for all rooms, also in order.

First bytes are 0x18010 - 0x1810C
Second bytes are 0x1810D - 0x18209

During a room transition, the room data is very briefly switched into memory. The room pointers are then stored at 0x0016 and 0x0017 in memory and used as an offset to lookup the room data.

So for example:
Room 02:
    1st byte: 0x18012 = 03
    2nd byte: 0x1810F = 84

This means the room data for Room 02 is currently loaded into memory address 0x8403. And sure enough, here is is:



Interestingly enough, this also explains why Room A2 does not exist. The pointer data for A2 just points to Room 00. With this information, you could easily adjust the pointer and add room A2 back in somewhere.

Room 00: 0x18010 = 88, 0x1810F = 83
Room A2: 0x180B2 = 88, 0x181AF = 83

Super neat!

Also, if you make room edits and need to update the pointers in the ROM your room data should start at 0x010010 + room offset. For example, room 2A:

2A offset byte 1 @ 0x1803A: D7
2A offset byte 2 @ 0x18137: 98

Room start should be located in ROM at byte 10010 + 98D7 = 0x0198E7 which is correct. This works for every single room in game and I have validated it accordingly. I already have an idea on how to reintroduce missing room A2 into my randomizer... so many ideas!

Regarding room data, there are three groups of bytes in the middle of room data that I don't believe are ever utilized. While I am not 100% sure yet, this appears to be left over partial room data or just garbage.

Unused Bytes #1: 0x183CB -> 0x183F9 (47 bytes)
Unused Bytes #2: 0x1A321 -> 0x1A3FE (222 bytes)
Unused Bytes #3: 0x1E57F -> 0x1E597 (25 bytes)

While this isn't tons of space, it does give us an additional 294 bytes of room data space for whatever adjustments we would like to make. 99% of rooms are < 300 bytes so this is fairly substation extra space.

One thing that still eludes me in exactly how the graphics are stored in the ROM. Currently, this is beyond my grasp but I hope to figure this out eventually because adding custom graphics would be great.

JP32

#28
You just need to press +1 byte button few times in yy-chr to make graphics appear properly:




Like here I replaced the solstice guy sprites with the troll enemy via editing graphics. I have no idea how to do the same thing outside of yy-chr though ;D.

Quote
Regarding room data, there are three groups of bytes in the middle of room data that I don't believe are ever utilized. While I am not 100% sure yet, this appears to be left over partial room data or just garbage.

Unused Bytes #1: 0x183CB -> 0x183F9 (47 bytes)
Unused Bytes #2: 0x1A321 -> 0x1A3FE (222 bytes)
Unused Bytes #3: 0x1E57F -> 0x1E597 (25 bytes)
Interesting, I'll poke around to see if theres any stray room data there or if the game ever accesses that.

Also do you mind if I add your Room Pointer Data findings to my doc?


EDIT:

Unused Bytes #1: 0x183CB -> 0x183F9 (47 bytes)
Unused room!
Nothing special, it has no sprites and it only has on exit to room ID 01


27 17 37 13 00 ;orange room, 5x3 size
00 FF 00 81 00 00 FF FF FF FF FF FF FF ;main castle 1 wall graphics window-less, basic floor.
04 18 01 ;only one exit to room ID 01
06 ;how many normal blocks
00 01 00 80 ;normal blocks start
00 01 01 80 ;basic block graphics
00 01 02 80
00 11 00 80
00 11 01 80 
00 21 00 80  ;normal blocks end
00 ;end of room data



Sooo.. early version of the very first room, its also located right after where final room ID 00 is  ::) .

pbandpickle

Please go ahead and add to your notes! I couldn't have done any of this without your documentation anyway.

I zeroed out the bytes in group 1 and 2 and played around a bit. There were no issues but I wasn't thorough in any way.

That is awesome that you figured out the graphics, at least within yy-chr. I'll take a look at it soon and see if I can get any more information.

I have a lot of other documentation I have gathered over the year. I created a complete, color-coded spread sheet of all room data. I have color coded each section of room data so that it is easy to tell what part it is. Specifically, I have objects, room graphics, exits, normal blocks, special blocks all color coded.

I plan on making an room exit randomizer soon but it will take some serious planning...

JP32

Unused Bytes #2: 0x1A321 -> 0x1A3FE (222 bytes) Junk, not accessed by the game ever.

01 03 16 03 80 09 03 00 03 00 00 00 00 00 00 00 00 00 00 00 00 00 03 10 03 00 00 00 00 00 00 00 00 00 00 00 00 00 03 20 03 00 00 00 00 00
00 00 00 00 00 00 00 00 03 06 03 02 00 00 00 00 00 00 00 00 00 00 00 00 03 16 03 02 00 00 00 00 00 00 00 00 00 00 00 00 03 26 03 02 00 00
00 00 00 00 00 00 00 00 00 00 00 02 03 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 22 03 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 14
03 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00


Junk/stray/erased data, not accessed by the game ever.
Located in-between of rooms ID 45 and ID 46 (1a2f5 and 1A3FF), its possible that one point room ID 45 was larger or had more objects in it,
and then they made it smaller, or maybe there was room/rooms in this space, but since the leftover data is just junk its impossible to tell.


Unused Bytes #3: 0x1E57F -> 0x1E597 (25 bytes)

Used by the intro's rooms:




Kinda weird placement since its in-between rooms FC and FE. Room attributes(palette, room size) is in 0x0006e6, which is also shared by room ID FE / ending cut-scene.


Like here I changed rooms palette to blue, and same and only change changes ending cut-scene:



So the devs used same Room attributes for both and everything else in different locations. the endings full room (room ID FE) data is located in 0x1e598 - 0x01e601, which interestingly enough has its unique room palette(14 04 24, purple/pink) that gets overridden to green.

pbandpickle

Hey, I am back after half a year with a update! Wow! Lots of things going on in my life have prevented me from working on this. With this update I bring one new feature.

There is now the option of randomizing the Shadax player sprite. There are 10 different possible sprites (including standard Shadax). The list of possible sprites are as follows: Bug, Eye, Foot, Orc, Skeleton, Slime, Spider, Worm and one more super special sprite!

All sprites have custom death animations, some more custom than others. Hooray.

JP32

Nice.

Theres also Solstice disassembly available here by Cyneprepou4uk, I've poked around and its neat, one step closer to the solstice room editor that I want to make someday. :beer:

RobertCorwen

Hi,

Just a little note to let you know that I've tried to create a randomized file. It seemed to generate properly (I could get to the IPS/LOG download page), however when trying to download the IPS patch, I get a 404 error every single time.

That makes me sad, this game is in my Top 3 of all-time fave games. I didn't know a randomizer existed until now, otherwise I would have abused it! 😀

Thanks,

RC

RobertCorwen

Hi,

Just a few screenshots to show you what happens when the patch is generated. Please note that the filename truncated, which *MAY* mean there is some path error when generating/storing the file for download (the "S" from "Solstice" is missing).

Thanks,

RC



pbandpickle

This is now fixed. I did something incredibly stupid ever since Shadax sprite randomization was implemented at the end of 2021. As a result the filenames would only generate correctly if sprite randomization was enabled.

Please try again and I apologize for the inconvenience.

I stepped away from this a long time ago due to life complications but would like to revisit and fix this up. I have a few projects in the way but will update here if/when I come back to it.

RobertCorwen

It does work now, thanks @pbandpickle!

I tried it a little bit, I noticed the infinite hole in the basement. That's quite a lifesaver, especially when you don't yet have the magical boots!

I also like that you included the Shadax/potions color fix into your randomizer. This makes this even better!

After playing this gem at least a dozen times a year since the game came out ages ago (gosh, I am getting old), it feels all weird to have the items swapped all around! Clearly many hours in perspective...

QuoteI stepped away from this a long time ago due to life complications but would like to revisit and fix this up. I have a few projects in the way but will update here if/when I come back to it.
Sorry to hear that, I hope you'll get well very soon!

Unrelated: I was wondering, is this a python script running server-side that applies the different options in the file?

Thx!

RC

RobertCorwen

I passed through this room, and in place of the key there was a credit (continue). If you 'Game Over' and respawn into this room, Shadax continuously falls onto the spikes and loses all lives.


RobertCorwen

Hi pbandpickle,

I've been playing a lot of seeds so far, mix-and-matching many optional switches.

First, I recently discovered what I consider a bug in the vanilla ROM that I never thought existed regarding credits. I've (and many people online) always considered that losing all lives and using a credit would put you in the same exact state you were when pickup up the said credit... Boy was I mistaken.

In fact, when resuming play using a credit, it appears that on the pause screen, the game gives you a total of 3 hats and +2 potion shots for each potion. I formerly thought it would not be the case, I'm really baffled I haven't come across this behaviour before (maybe it's because I haven't really used a credit in years)...

That being said, your "expert mode" happens to be a really good idea, but unless credits get fixed in the base ROM, it's pretty much next to useless, as getting a credit gives you lives and potions back. Although, getting a new potion will reduce the count to 1 single shot for said potion.

I can see two outcomes really for the accuracy of "expert mode". Either:
1) When selecting expert mode, credits can get picked but their behaviour is deactivated (they will never act as continues and upon dying you get back to the title screen no matter what); or
2) Someone hacks the base vanilla ROM to fix the credits behaviour to it's intended one (making it avail here on this site), which would then be used as a new base for the rando hack (to be applied on top).

Let me know what you think! I can give you more precisions if needs be.

Regards,

Robert


PS.: I thoroughly tested all this using both FCEU and Nestopia using 2 different dumps of Solstice, and the results were exactly the same in all cases. The SHA1 fingerprints I tested are:
1) 992da7fac9248204cddcdf2e37412007359603ba (what I consider should be a valid vanilla ROM);
2) e21f7982913b11933b3a6730316c81026575c70d (which seems to be some variant allowing to skip the title screen quickly).

JP32

Okay I took look at the disassembly and figured it out.


So for lives, in short the game just sets lives to 3 after continue.
So to fix it, change byte at address "0x00013B" to "00" (default "03")
Or in disassembly bank_00.asm control+f "0x00013A 00:812A: A9 03" and change "LDA #$03" to "LDA #$00"


For potions, this took little bit to find, but in short the game just adds +2 to whatever your potion amount was when you died, regardless how much you had when you picked up the credit coin, I guess that was easy and quick solution as it prevents any possible softlocks. This is the intended behavior by the developers AFAIK, after taking quick look at the disassembly.


So to fix it, change byte at address "0x00015C" to "00" (default "02"), doing this the game doesn't add anything to your potions. Change to "01" to only add +1 etc.
Or in disassembly bank_00.asm control+f "0x00015B 00:814B: 69 02" and change "ADC #$02" to "ADC #$00" Change to "#$01" to only add +1 etc.

This is just dirty quick fix, to make it "save" how much you had at the time would take extra code and shit.

To change starting potion amount:
At address "0x000d2b" change byte to "00" (default "02").
Or in disassembly bank_00.asm control+f "0x000D2A 00:8D1A: A9 02" and change "LDA #$02" to "LDA #$00"

To change starting lives amount:
At address "0x000d56" change byte to "00" (default "04").
Or in disassembly bank_00.asm control+f "0x000D55 00:8D45: A9 04" and change "LDA #$04" to "LDA #$00"

Anyway heres two patches, one changes the continue thing and one does that and also changes starting stuff to zero too, I only quickly tested these so let me know if there are any problems, I also didn't check the cheat code if that still works, it mostly likely should work.