[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/vr/ - Retro Games

Name
Spoiler?[]
Options
Comment
Verification
4chan Pass users can bypass this verification. [Learn More] [Login]
File[]
  • Please read the Rules and FAQ before posting.

08/21/20New boards added: /vrpg/, /vmg/, /vst/ and /vm/
05/04/17New trial board added: /bant/ - International/Random
10/04/16New board for 4chan Pass users: /vip/ - Very Important Posts
[Hide] [Show All]


Janitor acceptance emails will be sent out over the coming weeks. Make sure to check your spam folder!


[Advertise on 4chan]


File: nano_zero-wing_en.png (184 KB, 1920x1028)
184 KB PNG
Back in 2019, I came up with a scheme to make translating many old video games (especially CD-based ones with spoken dialogue and full-motion videos) about as easy as writing subtitles for a video.
After pitching this idea to /emugen/ and getting told that it would be impossible to do, I promptly implemented it in Mednafen, and successfully tested it with games for PC-engine, PlayStation and Sega Saturn (it should also run with PC-FX, but I don't have any games to test it with).

You basically write the subtitles into a human-readable text file similar to .srt or .ass, but in addition to timestamps, you note which address of the ROM (i.e. CD sector for CD-based games) is read right before the content plays.
You can see an example file in picrelated.
No need for a hacker who figures out how and where to patch the ROM, no need for custom assembly code to display subtitles for spoken dialogue, no need to re-encode and degrade full-motion videos.

Here's a demo video of the intro of PC-Engine's Zero-Wing translated in this way:
>>>/wsg/6211503

The implementation is very simple (like 100 lines of C++) and could be added to many other emulators with ease.
In fact, you might be able to mod a physical console to have support for these subtitles, perhaps even through some sort of ActionReplay-like module that wouldn't even require you to solder anything.
>>
File: zerowing-demo.mp4 (1.99 MB, 1280x720)
1.99 MB
1.99 MB MP4
>>12747412
The work I did on this project:
- Created a simple subtitle file format and implemented it for all CD-based consoles supported by Mednafen
- Implemented some quality-of-life features for it in Mednafen: it lets you pick different subtitle files based on language (you specify the language via the config file or command-line options), and shows you which CD sector the CD-ROM drive jumps to (to make the work of translators easier)
- Created a syntax highlighting file for the GNU Nano text editor
- Made a very small program (written in Clojure) which converts subtitle files to HTML
- Created .deb packages for Ubuntu 18.04 on PC and RaspberryPi

I didn't release any of this back then because at the time there was a group of mentally ill people who were harassing various open source developers in the emulation scene, and I don't need that kind of shit in my life.
But if there's interest, I can upload what I have this week, if you tell me:
1. if this is even useful anymore. Does a similar project already exist (the idea seems so obvious to me)? Have AI translations made this project irrelevant?
2. How I should call the file format. The working titles I had for it were EmuSub and ZockTitle, neither of which I like.
>>
Pay an ad, nerd
>>
>>12747412
Nice work and I don't know why there aren't more non-ROM hacking ways to do stuff like this.
>>12747414
>a group of mentally ill people who were harassing
Many such cases.
>>
That's awesome man. You may not get recognition, but I hope you succeed in getting this out there. Don't let the haters get you down.
>>
>advertising your AI vibecoded slop here
>>
This thread got me thinking of others ways to do translations on an emulator level without ROM hacking.
>you specify the region of the screen where dialogue boxes appear (this is because the contents of other parts of the screen might vary)
>you take a PNG screenshot when a dialogue is on the screen
>edit the image with your translation
>the emulator constantly checks if the current contents of the selected region match what's in the original PNG
>if a match is found, it overlays the edited PNG
Not sure how resource intensive this would be but you could maybe just hash the images and only compare the hashes.
There are probably tons of other ways.
>>
>>12747412
very cool OP, id love to see move translations release for games that otherwise wouldnt get them, if this allows that to happen

>>12747524
you might even be able to charge money for it.
>>
>>12747412
Ignore the worthless cunts repeating phrases. Theyve started becoming a bigger problem in the last year here. Keep doing what you're doing.
>>
The problem with emulator level translations isn't that they are difficult to make. The problem is that no translators want to waste their time translating a game if it won't be playable on original hardware. They don't use exactly the same approach, but your project reminds me of these:
https://github.com/sudgy/nintendo_translations
https://github.com/vgarciasc/xeupiu

You can still release this and see what happens, but I wouldn't expect it to get wide adoption.
>>
>>12747828
>no translators want to waste their time translating a game if it won't be playable on original hardware
thats not true
>>
>>12747828
Plenty of people who have no interest in learning how to ROM hack would be interested.
>>
Another Australian thread
>>
>>12747828
The big downside of my approach is that it won't work for every game.
The upside is that it is extremely simple and elegant.
I reckon most emulator devs could implement it in their apps in an evening.
The file format is designed with efficiency in mind, you can write a parser for it in a few lines of assembly, using a jump table.

In fact I'm fairly optimistic that it could even be implemented in physical consoles with hardware mods:
Intercept the messages that go to the CD, have a microcontroller process them, read subtitles from a bit of flash memory, then patch the output signal to show text messages. For Cartridge-based games, I suppose some sort of SuperGameBoy-like adapter could be constructed.
Bam, playing translated games on real hardware AND with the original unmodified CD's and cartridges.

Also, I really undersold this with the thread title, because this could be used not just for subtitles. It could easily be extended to show pictures on screen (both translations but also e.g. area maps, artwork...), play sounds, send rumble events to the controller, change the background image/color when you're playing a 4:3 game on a 16:9 screen, whatever.
>>
This is amazing, don't let the naysayers and real hardware autists and faggots dissuade you from this. More importantly don't let this idea die in this shithole or in some drama fueled discord, don't get entangled in the ai drama (either your soapboxing or the sample translations you're doing) and don't tie your implementation to just one emulators, focus on mednafen, mesen, and retroarch.

Yes there's other attempts but they're honestly retarded and yours shows the most promise. One was recently added for dolphin for the four swords adventures jp translation mod for navi trackers. There's some successful official options like the castlevania rondo of blood psp translation with multi-5 subs.

If you don't mind some suggestions:

- For the subtitle format, you might as well support a normal subtitle format with optional tags for font selection, color, position, alignment (by default centered)

- for some good proof of concepts, try games that already have English subtitles/translations, like snatcher pc engine (even has a sound test menu you can test various audio call hooks with), castlevania rondo of blood, shockman 3 pc engine, ys 4 (there's an early version of the fan patch with just jp voice acting instead of their fan dub), most tg-16 cd games with awful english dubs can have undub+soft subs using your method, and so on.

- every subtitle needs a trigger for showing up and another trigger for fading out, add multiple types
Every emulator from those (not retroarch though) has support for read/write/execute breakpoints, use that as a possible ShowSubTrigger type. For example before a given cutscene there MUST be a ram variable that stores the cutscene id, or audio id, or a data load from a specific rarely used sector/rom region, or a routine that starts audio playback. That's when you trigger the subtitle and have the entire srt file autoplay.

- SubtitleFadeoutTrigger can be a button press (also exposed by these) or a game routine for ending/waiting for button
>>
>>12748184
Since it's breakpoints you'll still need to do some "romhacking" but thankfully just the preliminary research until you find the audio/text ids and detecting routines for showing text / playing back id / ending cutscene
You can add another option for the less skilled, a detector for the frame shown in the emulator, so that a srt fires up immediately when you detect the very first frame from a cutscene (either the image or its data in the ram/video ram/emulator state) that would work like with texture replacement / hd-nes

For the timers you need it frame based as opposed to time based

If you want the image overlays and that kind of shit seen in anime soft subs that translate backgrounds might as well add full .ass support as an option

For the subtitle text data you can offer an option where the you have a config file for formatting (default text styles, where to get the font file, video post processing, etc), a config file listing all trigger conditions (start, type, argument, end, type, argument, subtitle text filename, sub id in that file, subtitle type, formatting preset id), and then tons of subtitle files (in either str or ass or your format, with an explicit end tag subtitle, with start/end timings for each sub, and the actual text which can contain tags for overriding the position/font/alignment/etc formatting) and optionally ram state files you use to detect a cutscene, if you want to go that route

The font can be whatever but it's crass to just use whatever. If it's a vintage retro game then it needs to have the same pixel font or some vhs bootleg sub font like the sonic cd level end font , that really sells it
>>
>>12748221
Maintain (yourself) a github (and other equivalents) where you post a complete documentation for the tool, and some scripts you prepared on your own for various games.
Curate them throughoutly, you don't want obvious ai slop translated subtitles in there as the main thing / without disclosure, because it sets the tone for the entire project that it's just "the ocr mtl feature already in retroarch but worse/repackaged" and destroys trust and community building, and you really need to gather people interested in transcribing audio or checking subtitles (basically just like an anime fansub team skillset, and what they're used to can inform your future project todos). First thing you need is let people know what this is about, there's lots of youtube walkthroughs of audio only game with soft subs that can be converted this way, you can use that as a base.
>>
Official emulation by M2 or Edia for games like the Valis collection or Sega Ages add this competently, though the western compilations have worse quality or fall back to english dubs.

Dolphin manages it for FSA-JP because it's separate files for every sound bite and retro games aren't as convenient (exceptions always exist and maybe you could do undubs for the Summon Night Swordcraft story trilogy because it has separate sound files in the GBA rom after all)

There's a certain ai-slop translator who used to spam similar translations and the least said about that attempt the better, it somehow had character limits despite that the subtitle is external, and it only works on a speedrunning fork with a convoluted cheat-like trigger that's buggy af, idk how you could even get that wrong

And then there's the Cookie's B**tle translation project. The game is built on macromedia shockwave but they didn't want to distribute any files for "certain unusual circumstances" so they developed a hooker that can detect ANY sound playback on windows apps (barely documented but it's open source on github) and then released a subtitle file for it that will show subs if it's hooked with the game running. But that's the final frontier unless you're into jp-only pc games with va-only.
>>
>>12748249
The Cookie's Bustle team has since switch over to just using a hacked executable like other PC game translations. MemSubLoader was a stopgap before they figured out hacking the game.
>>
I've decided on a name: RetroCue. As I wrote in the beginning my first working title was EmuSub, but it's neither meant only for emulators nor to be limited to subtitles.

>>12748221
>>12748184
Thanks for the suggestions.
>font selection, color, position, alignment
I wanted this format to have different tiers/levels. I implemented level 0, which is deliberately small in scope and simple in syntax, so that it could be implemented in an emulator in an evening and perhaps be turned into a hardware mod. I abused Mednafen's on-screen message system to implement it. Almost every emulator has some crude system for displaying messages on-screen, and that's enough to implement level 0.

I envisioned a level 1 with some basic styling and additional actions such as rumble etc.
Then level 2 or 3 would be serialized as JSON or EDN, and make it possible to express very complex styling options, event triggers and so on.

You could then distribute files with multiple levels and languages in a zip file.
You'd have a file called spooky_castle_iii.rqa (.rqa for RetroCue Archive) that contains
spooky_castle_iii.eng.rq0
spooky_castle_iii.ita.rq0
spooky_castle_iii.eng.rq1
spooky_castle_iii.eng.rq2

And the emulator then selects the file based on the highest level it can support, and the user's language preference. I already did implement the language selection part.
>>
Holy shit this is awesome. There's a lot of PCE CD games where this would be useful. If the Legend of Xanadu team would forget about the shitty dubs and just inject their translation (which is complete allegedly) this would by very useful.
>>
>>12748281
>I wanted this format to have different tiers/levels.
In other terms you want a fallback formatting depending on how advanced the emulator support is? Idk about that

>Almost every emulator has some crude system for displaying messages on-screen
Unreliable, often doesn't include a complete font or a sane character encoding, more often than not the font is ugly and ill suited for a subtitle

>hardware mod
Unrealistic. This is exclusively an emulation feature unless you also prepare a game genie on steroids that can dump the entire ram state off the console and send an instruction to another piece of hardware that hijacks the console video output and overlays a subtitle on it, the frame lags and slow data read speeds make this unrealistic. Unless you're exclusively playing romhacks with i/o hardware register instructions that call your device's subtitle service (koei on snes did something more rudimentary to send an ir signal to a cd player to play back voice acting and music and that was clunky and failure prone af)
Just give up on it.
(Unless you count emulation boxes as "hardware" then whatever)

>multiple levels and languages in a zip file.
Meh
A bit overkill

The way i would do it:
- treat each language as a separate project (to save me trouble: so much would change it's not worth making them share assets then pick and choose some of them)
- the fallback formatting would be an afterthought, it would just parse the "higher level/full featured" version (whatever it is) and then decide whether it wants to acknowledge or ignore the formatting tags in the text / the global formatting config. If it's in fallback mode, it ignores that (except comment tags in ass subs and the like, still invisible) and treats it as a non printable character until the next bit of text.

>event triggers
The sub triggers aren't optional.
Adding your own triggers / message flowchart is out of scope for a sub tool for EXISTING text (unless you want gendered lines?)
>>
>>12748363
Supper is probably going to help them (or another team doing the same game) keep the jp audio but have new code for ingame subtitles that run on real hardware. Probably the same goes for the rumored tengai makyou ii fan patch.

That doesn't make the need for this feature any less important. Some games have hardly any text content besides thosr voice only cutscenes and are unlikely to get romhacking attention.
>>
>>12748184
Forgot / trimmed due to character limit
>SubtitleFadeoutTrigger can be a button press (also exposed by these) or a game routine for ending/waiting for button
... or a timer (the most common situation: sub only shows for x frames then disappears)

If it's the button press, it's for subtitles that stay onscreen as long as the player didn't press A to continue

The sub would typically show instantly completely all at once, but if you want to make it like ingame text that gradually appears then you'd need timing tags (text speed in frame per character, pause length in frames) to control that but that's an entire rabbit hole of scope creep. I could see it useful for dramatic revelations but I am partial for movie-like subtitles, just keep them normal and divide them for dramatic timing
>>
>>12748281
>And the emulator then selects the file based on the highest level it can support
If you dig deep enough in those emulator sources there's a drawpixel function meant for HUD, the hud text relies on it, same as the various tile viewers in the debuggers and other stuff.
Just call the hell of that drawpixel function and use it to always at all times draw a framebuffer layer of your subtitles images and overlays



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.