News:

11 March 2016 - Forum Rules

Main Menu

Chrono Trigger Bugfix and Uncensoring Patch

Started by Chronosplit, November 22, 2017, 10:15:32 AM

Previous topic - Next topic

Cthulhu88

Quote from: Chronosplit on September 12, 2019, 05:03:54 PMHmm.  I remember changing the lemonade to hard lemonade (that means lemonade with alcohol in it) in a similar way to hard cider, because I couldn't really find another alcoholic item suitable for switching in other than your generic beer/wine.  I don't want to change the variety of items presented in these lines by Woolsey, but I do want the alcohol back in.  Thinking about it, it may be smart to go ahead and leave the lemonade behind (though I don't know to what just yet).

I guess you are right, until you'd mentioned it, I wasn't aware that hard lemonade involved alcohol. In my country we call such a beverage caipirinha, which includes, ice, lemon juice, sugar and cachaça (a brazilian hard liquor similar to vodka).

Chronosplit

Quote from: Cthulhu88 on September 13, 2019, 01:28:29 AM
I guess you are right, until you'd mentioned it, I wasn't aware that hard lemonade involved alcohol. In my country we call such a beverage caipirinha, which includes, ice, lemon juice, sugar and cachaça (a brazilian hard liquor similar to vodka).
Thanks for the feedback on this one though, I honestly wasn't aware.  Here in Eagleland it's somewhat common today to add the word "hard" to something with alcohol added.  It's important that everyone gets the point with my edits, so it's worth replacing anyway.

I don't really think caipirinha quite fits, but a Lemon Shandy is basically the same thing (with less proof, which might actually make it more fitting with how I've handled the fair).  That'll probably work the best.

Cthulhu88

#362
I've updated the MSU-1 patch. It's in the post linked by the original post.
I went through every single line optimizing it for speed, unlike qwertymodo, who optimized his patch for size.
There aren't many CPU cycles wasted now, even the SNES multiplications and divisions are optimized now, it shouldn't pose any kind of problem for those running it on the original SNES with SD2SNES.
Unless an issue arises, I think I am done with this. I've already spent way too much time on this.

Major changes for this update:
  • Added an identification header with the ASCII string "MSU-1 MUSIC" followed by a 24-bits integer version (MAJOR, MINOR, PATCH, 1 byte each). The header is located at the first byte of Patch.ADDRESS.
  • Added a more elegant and efficient way of determining whether to play the attract theme or the looped in-game theme.
  • Fully optimized the code for speed.

EDIT:

Reuploaded the file with a size assert macro for the code. Since the patch's data isn't changed, the only thing updated is the .asm source code.

[*] Assembling...
data: Patch -> 925/1584 bytes ($CDF9D0-$CDFD6D)
data: Tracklist -> 85/422 bytes ($CD5D20-$CD5D75)

Chronosplit

Yeah, this is a great example of taking advantage of the amount of space I have lying around after the expansion!  I'm betting a lot of people using real hardware are going to be excited to see this roll out.

Alright, if anyone doesn't want to wait I have the main ending's King line fixed in only the Mega link (I won't be submitting anything to RHDN until I have all these upcoming things finished).  I'll be addressing the rest pretty soon, I had a surprise work hold up. :P

Cthulhu88

Quote from: Chronosplit on September 15, 2019, 07:04:26 PM
Yeah, this is a great example of taking advantage of the amount of space I have lying around after the expansion!  I'm betting a lot of people using real hardware are going to be excited to see this roll out.

I don't use the ExHiROM portion of the physical address at all. I do keep them in the HiROM section, which can benefit from a FastROM (banks $80-$BF and $C0-$FF).
This code was designed to run on the original ROM aswell from the start. This is why I'd defined the "EX" macro. You can cross-assemble it on the original ROM by commenting or removing `set DEFINE="EX"` from make.bat and it will run even better than qwertymodo's, assuming you don't care for the FMVs, which my version does not include.

The code size got smaller too after my optimizations, it wasn't just speed. It was taking almost 1200 bytes, now it takes 925 bytes.
If you do not consider how we store the play types, my code might be even smaller than his at this point.

PS: Have you considered changing Magus' line at the End of Time? "You got whacked cuz you're weak" sounds to gangsta too me. Doesn't fit Magus in my opinion.

Chronosplit

Got it!  Honestly, at this point I'll take original SD2SNES over FMVs since I'd be patching it in.  But would anyone miss them?  Personal opinions needed.

I may look at that line again... I kept it in because it's one of those iconic Woolsey Magus lines.  It also kind of reads like Nizbel's one line did though, and it doesn't fit with the rest.

ThegreatBen

I was definitely excited about the fmvs but I dont believe he ever got them ready did he?

Cthulhu88

He got them all in, except for the Fall of Guardia one.
There are a few issues he ran into though (from reading some of his old comments), one of them being the poor quality of the FMVs. Considering the limited number of color palettes and resolution for the SNES, I would say it would be hard to make it look like the PS/DS versions.

As for how he implemented them, he uses TF to add an unused location event and an unused dialog event, which he intercepts through ASM and plays the FMV.

Chronosplit

#368
Quote from: ThegreatBen on September 15, 2019, 09:14:05 PM
I was definitely excited about the fmvs but I dont believe he ever got them ready did he?
Not yet, I don't think he's quit or anything like that last I checked?

Mauron

The FMV portion of the hack used the event command Color Crash, which was replaced to start playback. All necessary data was stored to RAM through assignment commands beforehand.
Mauron wuz here.

Cthulhu88

Quote from: Mauron on September 16, 2019, 01:06:57 AM
The FMV portion of the hack used the event command Color Crash, which was replaced to start playback. All necessary data was stored to RAM through assignment commands beforehand.

Yeah, Color Crash is the Location Event I'd mentioned. He also uses the Special Dialog 12 Event for some of the FMVs.

As for storing them into the RAM, he loads them directly from the MSU-1 file into the VRAM and CGRAM, he even has macros named as such (MSU_TO_VRAM and MSU_TO_CGRAM).

    ldx #{REG_MSU_DATA}// MSU-1 data read port
    stx $4302   // Low DMA source address
    lda #$00
    sta $4304   // High DMA source address

ThegreatBen

He helped me get the intro video working on my project but asked me not to include it publicly,  did he ever make any of the other videos available?

Cthulhu88

Quote from: ThegreatBen on September 16, 2019, 09:50:43 AM
He helped me get the intro video working on my project but asked me not to include it publicly,  did he ever make any of the other videos available?

Not publicly.
And even then, I wouldn't add them in for the same reason I'd given you. This is his baby and I'll let him handle it as he sees fit. It would be kind of disrepectful for me to disregard his generosity (in allowing me to take a look at his code). I would be stuck with a crappy fade in/out and SPC muting without him.

Mauron

Sorry, I worded that poorly. I think the only data stored beforehand is an FMV index, but there may be a couple other pieces of information.
Mauron wuz here.

Cthulhu88

Quote from: Mauron on September 16, 2019, 11:47:28 AM
Sorry, I worded that poorly. I think the only data stored beforehand is an FMV index, but there may be a couple other pieces of information.

As far as I am aware, the data stored in RAM is the video index, FPS counter, timer and the music stuff.
FPS counter and timer were used by the music portion of the code in DarkShock's code, but qwertymodo's new SPC muting method made it redundant (which is why I've removed those variables from mine).
The whole data stored in the .msu file is DMA'ed directly into $2118 (VRAM) and $2122 (CGRAM).

Chronosplit

Quick progress thingy: While I was at it, I edited Prehistoric to Prehistory because that's almost too easy (shout out to Axiphel who had the Prehistory stuff first, if you're still reading).  So the next update will have that in too.  I forgot how much fun Tile Molester is, though my main headache has been getting the q in Antiquity to look right.  I think we're about there.  Also, I only needed to add one tile for the "ty" ending.

Cthulhu88

I've found a bug in vanilla, not sure if you want to fix it.

Incognitos/Peeping Dooms get stuck at 1 HP after peeping and you can easily kill them even after they hide behind their shields.
I am not sure whether this bug affects the other types or not.

Mauron

That's specific to Incognitos/Peeping Dooms. The Peeping Doom has a max HP of 1 instead of 110.
Mauron wuz here.

Chronosplit

#378
I'm okay with fixing it, dunno what's behind it though.  I've never run into it due to always killing them on sight, but it's nice to know about! That's two Black Omen bugs, wonder if they had to rush it towards the end a bit...

andrewclunn

Question, I've seen some "knocked out character appears to just be standing there" in vanilla CT, and it definitely occurs in the black omen.  Is that an emulator thing, or soemthing real that people know about?