Posts for Lenalia


Experienced Forum User
Joined: 3/18/2017
Posts: 6
Just bumping this thread to post a solution, in case anyone else runs into this problem: If your copy is in ISO/WAV/CUE form (which is what the dub patch is made for), replace the WAV file for track 1 with the equivalent file from the original Japanese version. I'm not sure why this particular track causes trouble, but since it's the "Don't put this data disc in your CD player!" track and not something that actually plays during the game, replacing it shouldn't break anything with the game proper. I haven't played the dub patch all the way through to make sure it's 100% working, but the opening cutscene also plays audio from a track that was replaced in the dub patch and that works okay, I'm guessing this is the only file that makes BizHawk act up.
Experienced Forum User
Joined: 3/18/2017
Posts: 6
(Mods, feel free to move this message or let me know if it belongs somewhere else.) Because the text centering thing has been driving me crazy (and I like my variable-width fonts, dangit! XD), I started hacking DrawText alignment options into BizHawk. I don't even know the first thing about using git, and haven't even coded in C# until tonight -- I just downloaded a zip of the source code from GitHub and started poking at it. In the version I've been working at tonight, I added two parameters to DrawText. The first is "horizalign" (horizontal alignment), which can be either "left" (default), "center", or "right". The second is "vertalign" (vertical alignment), which can either be "bottom" (default), "middle", or "top". Left at their defaults, DrawText works exactly as it does now. But as an example, I generated this overlay: with this lua script:
Language: lua

while true do gui.drawLine(80,0,80,240,"white") gui.drawText(80,10,"Left-Aligned Text","white","black",10,"Munro","regular") gui.drawText(80,20,"Centered Text","white","black",10,"Munro","regular","center") gui.drawText(80,30,"Right-Aligned Text","white","black",10,"Munro","regular","right") gui.drawLine(0,80,240,80,"white") gui.drawText(0,80,"Top Text","white","black",10,"Munro","regular","left","top") gui.drawText(50,80,"Middle Text","white","black",10,"Munro","regular","left","middle") gui.drawText(120,80,"Bottom Text","white","black",10,"Munro","regular","left") emu.frameadvance() end event.onexit(function () gui.clearGraphics() end)
The alignment isn't quite right yet, because it's depending on the coordinates that draw the text backgrounds, and those also seem to be off. (This has the same behavior in release 1.12.0.) If I fix this so the alignment works properly, I'll upload my changes somewhere so they can hopefully be brought into BizHawk officially, if there'd be any interest in that.
Experienced Forum User
Joined: 3/18/2017
Posts: 6
Thanks! I can work with that. As it is, that workaround would work but not look very pretty (as the text just disappears instead of scrolling off nicely), but I can adjust things to make it work well enough. Is this the right place to make feature requests? In addition to this, it would also be useful if BizHawk had an option to center-justify or right-justify text. I wrote my own lua code to approximate centering text for a few things (not shown in this screenshot), but without measuring out and writing tests for every single character for each font and font size I use (or using fixed-width fonts only), it'll never look quite right. It's not the end of the world or anything, but it would help!
Experienced Forum User
Joined: 3/18/2017
Posts: 6
Spikestuff wrote:
Language: lua

client.SetGameExtraPadding(0, 0, 0, 0)
(x1, y1, x2, y2) You want to change the y2 value to whatever you want for what you want.
I've tried that instead of SetClientExtraPadding, and it still causes the same problem. Sorry, I don't think I was clear -- let me post a screenshot to show what I mean: My script is basically scrolling the text up (printing the text 1 pixel higher every 2 frames). I have the window at the bottom set up and working, but when I draw the text high enough that it starts to go above the end of the frame, it starts going on top of the game instead. (See the top of the words "Missed Treasures" there.) What I'm trying to do is to draw the text the same way, but have the top of it (above my frame) disappear instead of getting drawn over the game, while the part of the text in my frame still gets drawn as normal. Is this possible?
Post subject: Drawing under the screen in lua?
Experienced Forum User
Joined: 3/18/2017
Posts: 6
For the past week or so, I've been working on a lua script for FF5 Advance that I intend to use in a livestream at some point in the future. I've used client.SetClientExtraPadding to add some space for my own GUI elements below the main game screen. I'm trying to have the script do something like scrolling credits, with text scrolling to from the bottom of my frame to the top. Naturally, when some of the text is drawn above the top of the frame, it starts getting drawn on top of the game instead. Is there any way to have it draw under the game instead of above it, so the text disappears behind the game? (I've tried a few tricks, like using event.onframestart, and drawing on both emu and native surfaces, but nothing I've tried so far works). If not, is there any chance it could be added in the future?
Post subject: Ys IV: The Dawn of Ys dub patch not working
Experienced Forum User
Joined: 3/18/2017
Posts: 6
Hi all, I'm trying to play the PC Engine version of Ys IV (The Dawn of Ys) with the English translation and English dub patches in BizHawk, but it's throwing an error when I try to run it:
A core accepted the rom, but threw an exception while loading it: System.InvalidOperationException: Unsupported scenario: reading 2048 bytes from an unhandled sector type at BizHawk.Emulation.DiscSystem.DiscSectorReader.ReadLBA_2048(Int32 lba, Byte[] buffer, Int32 offset) at BizHawk.Emulation.DiscSystem.DiscIdentifier.StringAt(String s, Int32 n, Int32 lba) at BizHawk.Emulation.DiscSystem.DiscIdentifier.DetectDiscType() at BizHawk.BizHawk.Client.Common.RomLoader.LoadRom(String path, CoreComm nextComm, Boolean forceAccurateCore, Int32 recursiveCount)
I ripped the original disc (R1F version) myself using TurboRip, and both the original version and the version with the English text (not dub) patch run fine -- it's just after I apply the English dub patch that it throws this error. I'm not sure if the issue is with the patch or with BizHawk, but it runs in RetroArch okay. (I've tried both BizHawk 1.12.0 and a recent developer build.) It's not an end-of-the-world issue or anything, but any help with this would be appreciated! ^^