Register - Login
Views: 99836062
Main - Memberlist - Active users - Calendar - Wiki - IRC Chat - Online users
Ranks - Rules/FAQ - Stats - Latest Posts - Color Chart - Smilies
05-03-22 10:27:03 PM
Jul - The Cutting Room Floor - Riverse Kids (unlicensed) - SFC game with interpreted scripting language inside it New poll - New thread - New reply
Next newer thread | Next older thread
dhg2
Random nobody
Level: 2


Posts: 1/1
EXP: 37
For next: 9

Since: 07-16-18


Since last post: 3.8 years
Last activity: 3.8 years

Posted on 07-16-18 02:11:28 PM Link | Quote
Hello,

I was recently looking for strings inside various SNES ROMs I had lying around, and I discovered that Riverse Kids (othello game where you get rewarded with hentai for winning) is built on what seems to be some sort of interpreted programming language that looks a bit like a variant of BASIC. The code starts at 0x8000 in the ROM.

At the end of the code section, there's the text "MIHO for SNES", I wonder if that's the name of the language or the interpreter software.

I wrote a script to extract the program text from the ROM, with line numbers added. Here it is: http://dusthillguy.ddns.net/folder/files/quickupload/rivs_.txt
I don't know if the line numbers match up with the line number references in the program, I just counted each newline 0x0D character.
There's some binary data mixed in with the program text, I'm assuming from the context that those are text strings in Japanese. I've represented those as [xx] where xx is the byte value in decimal.

Riverse Kids doesn't have a page on TCRF at the moment, but I thought I'd post this on this forum anyway because this is the most appropriate place on the internet I could think of to post this information. I thought it was very interesting and I wanted to share it with people.

Regards,
dhg2
Joe
Common spammer
🍬
Level: 111


Posts: 3303/3392
EXP: 14502023
For next: 366337

Since: 08-02-07

From: Pororoca

Since last post: 13 days
Last activity: 2 hours

Posted on 07-16-18 03:43:55 PM Link | Quote
The stuff that looks like binary data is halfwidth Katakana. The script text is encoded as Shift JIS.

Rather than using line numbers, it looks like the # character is what the labels refer to. There are exactly 177 of them, and the "GO" commands don't reference any labels above 177.

The "MIHO for SNES" text seems to be part of a block of data compressed with a variant of LZSS. It looks like there might be several blocks of compressed data, each starting with "LZ" as a signature, so you might find more strings if you figure out how to decompress them.

____________________
ふにゃあ。
plateshutoverlock
User
Level: 7


Posts: 2/10
EXP: 1095
For next: 353

Since: 01-19-19


Since last post: 2.9 years
Last activity: 265 days

Posted on 01-23-19 01:04:07 AM (last edited by plateshutoverlock at 01-23-19 01:08:44 AM) Link | Quote
Originally posted by dhg2
Hello,

I was recently looking for strings inside various SNES ROMs I had lying around, and I discovered that Riverse Kids (othello game where you get rewarded with hentai for winning) is built on what seems to be some sort of interpreted programming language that looks a bit like a variant of BASIC. The code starts at 0x8000 in the ROM.

At the end of the code section, there's the text "MIHO for SNES", I wonder if that's the name of the language or the interpreter software.

I wrote a script to extract the program text from the ROM, with line numbers added. Here it is: http://dusthillguy.ddns.net/folder/files/quickupload/rivs_.txt
I don't know if the line numbers match up with the line number references in the program, I just counted each newline 0x0D character.
There's some binary data mixed in with the program text, I'm assuming from the context that those are text strings in Japanese. I've represented those as [xx] where xx is the byte value in decimal.

Riverse Kids doesn't have a page on TCRF at the moment, but I thought I'd post this on this forum anyway because this is the most appropriate place on the internet I could think of to post this information. I thought it was very interesting and I wanted to share it with people.

Regards,
dhg2


I looked at the rivs_.txt file you provided, and yes, it's very interesting indeed. I just took a quick look
through this code, and noticed a huge block of "IF O=#(:CG GY##), where the #'s would be different numbers.

Example: IF O=14(:CG GY04)

I don't know what the "GY##"s are supposed to represent, but I am guessing maybe a memory block with code in it? Anyway, it would be much better have the if ## match the GY## and do a range check. Something like:

IF O < 33(:CG GYO)

Of course, there is no seperation between what I presume to be a function and the integer variable, so maybe they were forced to do it the 'dirty' way? Also, if the GY## is referencing blocks of memory, it would be easier to just write up a table of ifs than to try to rearrange the content in those blocks.

These lines are a bit intriguing:

IF O=11(:O=10)
IF O=33(:O=6)

Could this be some sort of correction or aliasing going on here?
Next newer thread | Next older thread
Jul - The Cutting Room Floor - Riverse Kids (unlicensed) - SFC game with interpreted scripting language inside it New poll - New thread - New reply


Rusted Logic

Acmlmboard - commit 47be4dc [2021-08-23]
©2000-2022 Acmlm, Xkeeper, Kaito Sinclaire, et al.

30 database queries.
Query execution time: 0.087314 seconds
Script execution time: 0.007841 seconds
Total render time: 0.095155 seconds