Author Topic: Love Fetish games  (Read 14825 times)

黒い灯影

  • Mr. Monkey in the moon
  • Forum Administrator
  • Ambassador of VIPER Knowledge
  • *******
  • Posts: 626
  • Karma: +42/-1
  • Unleashing the monkey inside!!
    • Favorite Sogna Game:
      ・VIPER-RSR
    • Now Playing:
      ・Viper RSR
Love Fetish games
« on: September 29, 2017, 03:55:17 am »
been digging into the files lately,
apparently the 'script.dat' files contain 2 interesting script files
one a script file in one of them 'skinchk.scp', which modifies the state of the female characters in game, permanently setting them in a certain state, (clothed, underwear, nude).

also, another one named 'test.scp', which just shows a menu and cuts to certain h-scenes, i guess it was used as a test.
BlackShadow

黒い灯影

  • Mr. Monkey in the moon
  • Forum Administrator
  • Ambassador of VIPER Knowledge
  • *******
  • Posts: 626
  • Karma: +42/-1
  • Unleashing the monkey inside!!
    • Favorite Sogna Game:
      ・VIPER-RSR
    • Now Playing:
      ・Viper RSR
Re: Love Fetish games
« Reply #1 on: November 04, 2017, 05:02:45 pm »
just thought of a technique to lazily replace all the dialogue in the game without touching too much of the game's script and breaking all the jump points.
Which i might apply to the Viper's scripts as well.
BlackShadow

BremenDruid

  • Engaged VIPER Fan
  • **
  • Posts: 91
  • Karma: +6/-0
    • Favorite Sogna Game:
      ・Viper CTR
Re: Love Fetish games
« Reply #2 on: November 05, 2017, 12:01:49 am »
Nice! Can't wait to hear more about using this on VIPER games. Would love to play RSR and CTR with a full translation.

JG

  • Karin-chan Fan
  • Website Administrator
  • Hardcore VIPER Otaku
  • ********
  • Posts: 3,497
  • Karma: +85/-4
  • 3000 posts of rediculousness and counting
    • Favorite Sogna Game:
      ・Gokuraku VIPER Paradice
    • Now Playing:
      ・Mario & Luigi: Brothership
    • Sogna Digital Museum
Re: Love Fetish games
« Reply #3 on: November 05, 2017, 03:55:06 pm »
Also interested. Particularly if you solve it for games 8-10 which use a different encryption than the earlier ones.

Also, the girl with ponytails is Suzuka, not Suka.

黒い灯影

  • Mr. Monkey in the moon
  • Forum Administrator
  • Ambassador of VIPER Knowledge
  • *******
  • Posts: 626
  • Karma: +42/-1
  • Unleashing the monkey inside!!
    • Favorite Sogna Game:
      ・VIPER-RSR
    • Now Playing:
      ・Viper RSR
Re: Love Fetish games
« Reply #4 on: November 06, 2017, 01:44:07 am »
haven't looked at the later games in the series yet, but the solution i came up with was a simple one, the print statements in LoveFetish begin with 0x01, to end the print statements its 0x02, and its jump code is 0x15xxxx.
at the moment, since i dont know all the opcodes for the AGS engine, but i dont need to when i am not altering the positions of the codes. I parse through the scripts and gather the offset addresses
of all the print statements and their byte sizes (starting offsets, and ending offsets).
inject the jump statements at where there would normally be a print statement, append the new text at the end of the script file, then jump back to where you'd normally be.
Code: [Select]
Line,StartingOffset,EndingOffset,JpString,EngString
0,60,90,公 志「うぉ……っ……!?」,""
1,91,171,突然、背中に生暖かく柔らかな感触があって、
2,183,205,女 性「クスッ……」,""
3,206,280,耳元で聞こえた声は聞き覚えのない声だ。
4,307,333,公 志「ええっ……!?」,""
5,335,381,見も知らない女性が、俺の真後ろに立っていた。,""
6,382,434,公 志「あ、あの……いったい何なんですか……!?」,""
7,449,469,女 性「フフ……」,""
8,470,568,女は妖しげに笑うだけで、
9,569,701,おまけに、彼女はまるで気にする風もなく……
10,702,772,公 志「あ、あの……
......

I'm sure we can apply this same principle to the Viper scripts, although i haven't tested it yet on Viper, but i dont see any reason why it wouldn't work.
although the only limitation i can see is going over the FFFF limit on the jump opcodes. I'm pretty sure viper can handle single byte characters, as opposed to LoveFetish which require you to conform to 2-byte Shift-JIS or the single byte characters have to be groups in multiples of 2.

Code: [Select]
blue = original script code
green = english text
pink = jump codes
« Last Edit: November 06, 2017, 01:51:37 am by 黒い灯影 »
BlackShadow

JG

  • Karin-chan Fan
  • Website Administrator
  • Hardcore VIPER Otaku
  • ********
  • Posts: 3,497
  • Karma: +85/-4
  • 3000 posts of rediculousness and counting
    • Favorite Sogna Game:
      ・Gokuraku VIPER Paradice
    • Now Playing:
      ・Mario & Luigi: Brothership
    • Sogna Digital Museum
Re: Love Fetish games
« Reply #5 on: November 07, 2017, 12:00:00 am »
I wouldn't worry much about SGS. I've done enough work on that format to be able to convert regular SGS files into the external Text based files like the international versions use. Or at the very least extract the text and inject it back in without much effort. Since the entire intstruction set has been decoded now, an assembler/disassembler isn't terribly difficult.

For AGS (at least M3 and some of the Love Fetish games) I've manage to extract text but not all the work to modify and inject back in. I probably did something very similar to what you did, looking for key opcodes like 0x01 and doing best I can to avoid the opcodes I didn't undestand.

(Would still love to know the PC98 file formats, particuarly VIPER-BTR.)

Moge

  • Forum Administrator
  • Hardcore VIPER Otaku
  • *******
  • Posts: 1,020
  • Karma: +30/-2
    • Now Playing:
      ・Zelda: Oracle of Ages
    • Onna Hole
Re: Love Fetish games
« Reply #6 on: November 12, 2017, 04:28:28 am »
know of any methods to convert the audio files to a listenable format?

the ancient aniplayer that can rip out the Erogos game files can't spit a listenable audio format

黒い灯影

  • Mr. Monkey in the moon
  • Forum Administrator
  • Ambassador of VIPER Knowledge
  • *******
  • Posts: 626
  • Karma: +42/-1
  • Unleashing the monkey inside!!
    • Favorite Sogna Game:
      ・VIPER-RSR
    • Now Playing:
      ・Viper RSR
Re: Love Fetish games
« Reply #7 on: November 12, 2017, 11:32:23 pm »
they are just simple PCM files, at least the the games i've examined, i just open them in Adobe Audition, after I extract the files.

I attached my tool, if you wanna use it to extract all the files from their DAT archives
BlackShadow

黒い灯影

  • Mr. Monkey in the moon
  • Forum Administrator
  • Ambassador of VIPER Knowledge
  • *******
  • Posts: 626
  • Karma: +42/-1
  • Unleashing the monkey inside!!
    • Favorite Sogna Game:
      ・VIPER-RSR
    • Now Playing:
      ・Viper RSR
Re: Love Fetish games
« Reply #8 on: June 11, 2018, 04:10:31 pm »
Did a bunch of work on the Op Codes for the earlier AGS engine,
Currently trying to identify the Op Codes and their lengths.

Code: (Some Notes) [Select]

Memory:
0x47C1E0 = 08 = Byte(Second Arg)    =
0x41CB29 = F8 = Byte(First Arg)
0x41C7A0 = 28 = Current Position
 
 
opcode code offsets?  ECX = byte(ECX+40A2A4)
Final Offset: ? = ECX * 4 = 40A180
 
Format
[size](Opcode(real, not -1));
 
Note: 0x48 may not be OpCodes, or point to the same place
 
Memory found at @0x0040A2A4
Seems to be a look up table, offset for opcodes
see: https://i.imgur.com/t20RIkV.png
Some of these are best-guesses, some are confirmed
 
00(0x01) 01(0x02) 02(0x03) 03(0x04) 04(0x05) 48 48 48
48(0x09) 05(0x0A) 06(0x0B) 07(0x0C) 48 48 08(0x0F) 48
09(0x11) 48 0A(0x13) 0B(0x14) 0C(0x15) 0D(0x16) 0E(0x17) 0F(0x18)
10(0x19) 48 48 48 48 11(0x1E) 12(0x1F) 13(0x20)
14(0x21) 15(0x22) 16(0x23) 17(0x24) 18(0x25) 19(0x26) 11(0x27) 1A(0x28)
1A(0x29) 1A(0x2A) 1A(0x2B) 1A(0x2C) 1B(0x2D) 1C(0x2E) 1A(0x2F) 1A(0x30) 
1D(0x31) 1E(0x32) 1F(0x33) 20(0x34) 21(0x35) 22(0x36) 23(0x37) 48 
48 48 48 24(0x48) 25(0x49) 26(0x4A) 48 48
27(0x41) 28(0x42) 48 48 48 29(0x46) 2A(0x47) 2B(0x48)
2C(0x49) 2D(0x4A) 2E(0x4B) 2F(0x4C) 30(0x4D) 31(0x4E) 48 48
32(0x51) 33(0x52) 34(0x53) 35(0x54) 36(0x55) 37(0x56) 38(0x57) 39(0x58)
3A(0x59) 48 3B(0x5B) 48 48 48 48 48
48 48 48 3C(0x64) 48 48 48 3D(0x48)
3E(0x69) 3F(0x4A) 48 48 48 40(0x4E) 41(0x4F) 42(0x50)
43(0x71) 48 44(0x53) 48 48 48 48 45(0x58)
48(0x79) 46(0x5A) 47(0x5B) 90 80 8B 40 00
B1(0x81) 8B 40 00 EA 8B 40 00
F5(0x89) 8B 40 00 80 8B 40 00
2C(0x91) 8C 40 00 38 8C 40 00
49(0x99) 8C 40 00 81 8C 40 00
B9(0xA1) 8C 40 00 0E 8D 40 00
4C(0xA9) 8D 40 00 84 8D 40 00
C7(0xB1) 8D 40 00 23 8E 40 00
53(0xB9) 8E 40 00 83 8E 40 00
B3(0xC1) 8E 40 00 CE 8E 40 00
EC(0xC9) 8E 40 00 0A 8F 40 00
29(0xD1) 8F 40 00 E3 9D 40 00
FB(0xD9) 9D 40 00 13 9E 40 00
29(0xE1) 9E 40 00 CC CC CC CC
CC(0xE9) CC CC CC 83 EC 1C 56
8B(0xF1) 35 98 01 41 00 6A 00
6A(0xF9) 00 6A 00 8D 44 24(0xFF) 10
 
0x04 -
 
0x0A
0x0B, 1 byte = ProcessOpCodes? FlushBuffer? GDI stuff ( does a shitload of things )
0x0F, 2 byte =  2 possible choices... 01 or 00
 
0x16, 1byte = Return from last 0x15 Jump?
0x18, 18 80 01 00
 
0x32 - Invalidate Rectangle - Redraw?
 
 
0x46, load_PCM file
 
============================
Memory   0x04650048
STORED Title.ANI file RAW DATA
 
TODO: Find decoder

Some snippets of interesting asm codes
BlackShadow

黒い灯影

  • Mr. Monkey in the moon
  • Forum Administrator
  • Ambassador of VIPER Knowledge
  • *******
  • Posts: 626
  • Karma: +42/-1
  • Unleashing the monkey inside!!
    • Favorite Sogna Game:
      ・VIPER-RSR
    • Now Playing:
      ・Viper RSR
Re: Love Fetish games
« Reply #9 on: July 22, 2018, 08:34:47 pm »
Well, im starting to understand how AGS's ANI image compression works
BlackShadow

黒い灯影

  • Mr. Monkey in the moon
  • Forum Administrator
  • Ambassador of VIPER Knowledge
  • *******
  • Posts: 626
  • Karma: +42/-1
  • Unleashing the monkey inside!!
    • Favorite Sogna Game:
      ・VIPER-RSR
    • Now Playing:
      ・Viper RSR
Re: Love Fetish games
« Reply #10 on: August 09, 2018, 09:51:06 pm »
Quick update, I got my tool to pretty much be able to parse all of the script opcodes and write them back, so it can change all the text in the scripts and correctly write all back without breaking anything.
Cracked their encryption (both versions of it), so the tool can read and write to later versions of the engine.
BlackShadow

黒い灯影

  • Mr. Monkey in the moon
  • Forum Administrator
  • Ambassador of VIPER Knowledge
  • *******
  • Posts: 626
  • Karma: +42/-1
  • Unleashing the monkey inside!!
    • Favorite Sogna Game:
      ・VIPER-RSR
    • Now Playing:
      ・Viper RSR
Re: Love Fetish games
« Reply #11 on: November 02, 2018, 07:48:03 pm »
AGS Script Editor: v0.30a

just load uploading the tool and the source, in it's current state
for the most part it works,
at the moment, i think the importing of dialogue from text doesn't work for later versions of the AGS script.
BlackShadow

JG

  • Karin-chan Fan
  • Website Administrator
  • Hardcore VIPER Otaku
  • ********
  • Posts: 3,497
  • Karma: +85/-4
  • 3000 posts of rediculousness and counting
    • Favorite Sogna Game:
      ・Gokuraku VIPER Paradice
    • Now Playing:
      ・Mario & Luigi: Brothership
    • Sogna Digital Museum
Re: Love Fetish games
« Reply #12 on: November 03, 2018, 08:49:32 am »
Does it decode all the opcode instructions correctly but text is jumbled, or do the opcodes not make sense as compared to other games (i.e., similar opcodes in order to display an image, or display text, play sounds, etc)?  I'm wondering if its the script files that are entirely encoded or just the display text strings.

黒い灯影

  • Mr. Monkey in the moon
  • Forum Administrator
  • Ambassador of VIPER Knowledge
  • *******
  • Posts: 626
  • Karma: +42/-1
  • Unleashing the monkey inside!!
    • Favorite Sogna Game:
      ・VIPER-RSR
    • Now Playing:
      ・Viper RSR
Re: Love Fetish games
« Reply #13 on: November 03, 2018, 03:05:21 pm »
It does parse all the codes, some of the opcodes I just kept as "cmd_0x03" for the sake of being able to edit the scripts without breaking all the jump codes,
If you're getting parsing errors, you'll have to change the Engine Version, some of the opcodes do change a bit (one or two iirc), i'll work on an automatic parser sometime later.
The later versions of the AGS engine does have the entire scripts encoded with a XOR pattern. I've only encountered 2 versions of this encryption, Im still trying to get a hold of their later versions of the AGS engine.

never came across the problem with text being jumbled though, can you send a screenshot?
on second thought, I do remember having the text being unable to display correctly on a machine that didn't have Japanese font installed.

Oh, thinking about your question again, I realized how i phrased what I said in my previous post, I meant a text file (not the script files) that you can export all the dialogue lines into... and importing that text file back to replace all the changed dialogue, its just how the tool parses the dialogue lines inside the exported text file.
« Last Edit: November 04, 2018, 02:57:45 am by 黒い灯影 »
BlackShadow