Romhacking.net

Romhacking => Personal Projects => Topic started by: filler on March 29, 2017, 06:27:25 pm

Title: Nakayama Miho's Tokimeki High School (Famicom Disk System)
Post by: filler on March 29, 2017, 06:27:25 pm
Not that I don't have a million other projects to work on, but I got restless the other night and did something I haven't done since 2005. I made a table file.

More specifically, I fired up a tile editor and messed around with a couple roms I'm interested in, Nakayama Miho no Tokimeki Gakuen being the one that I was able to find the font for, not to mention the title graphics.

I've since made a seemingly complete table file, (manually) located the text for menus, ending, and dialog, and translated a couple blocks of the main script.

So, yay?

The text encoding totally doesn't follow the order of the font, so that took a little trial and error. The game does some interesting things like using 01 as a switch in the text engine to enable or disable katakana display. It's also got the usual diacritical marks separate from the characters that use them which is typical for 8 bit stuff.

It also uses a bunch of, I don't know, single byte entries for words and partial words. Whatever you want to call that. The bummer is, that it doesn't seem to use the exact same encoding for all text with the ending, and maybe the messages using some bytes to represent different stuff than the regular dialog.

Anyway, for now I have a question. Since it's been at least over a decade since I did any graphics editing, how can you copy paste graphics into something like YY-CHR?

I know I've added fonts to games before, and I swear I didn't sit in the editor and recreate them with the pencil tool. No ideal what I used to do though.  :-\
Title: Re: Nakayama Miho's Tokimeki High School (Famicom Disk System)
Post by: Pennywise on March 29, 2017, 07:54:16 pm
This game's creator pedigree is really impressive. A lot of big names were involved in this game, which is what initi a lly drew me to it.

Anyhow, the game uses dictionary compression, which is the term you're looking for. I don't really use yy-chr, but there should be like a paste option.

The big concern with the FDS are the space limitations of the disk. I did look at the disk utilization for the game and it doesn't utilize all the disk space. So that'll help a little bit.
Title: Re: Nakayama Miho's Tokimeki High School (Famicom Disk System)
Post by: KingMike on March 30, 2017, 01:04:49 am
The big concern isn't with the disk size but with having free RAM space to load expanded files. (since unlike cart games, the files are loaded to RAM and then executed from there)
Title: Re: Nakayama Miho's Tokimeki High School (Famicom Disk System)
Post by: filler on March 30, 2017, 02:11:54 am
The big concern isn't with the disk size but with having free RAM space to load expanded files. (since unlike cart games, the files are loaded to RAM and then executed from there)
When it comes to it, I'm planning to ask someone ;) to give me a hand with doing the actual script insertion. Would it help to use the dictionary compression (thanks Pennywise) that's already implemented? Though I guess it would have to be remapped to the right font graphics.
Title: Re: Nakayama Miho's Tokimeki High School (Famicom Disk System)
Post by: ObiKKa on March 30, 2017, 04:39:40 am
Yahoo!  :crazy:

I'm glad that this game may be being translated into English due to its considerable pedigree, and the unusual way in which the player back then could contact a phone service over the FDS network to hear voice recordings from an actress for story and tips!

This wiki page actually has transcripts of those voice recordings, but they're in Japanese. Perhaps you could actually edit it over there and upload your English translation? The phone numbers were cut off soon after the game's release and will never work again, so there goes that. However, the messages and hints are displayed in text form in subsequent versions of the game.
http://www.nindb.net/nes/tokimeki-high-school/guide.html#phonemessages
Title: Re: Nakayama Miho's Tokimeki High School (Famicom Disk System)
Post by: filler on March 30, 2017, 05:37:50 am
I don't really use yy-chr, but there should be like a paste option.

Thanks, that helped. I thought maybe there was something special, but it just uses the OS clip board.

Here's a title screen. Obviously the pallet will need to be changed for that one spot.

(http://mattsmessyroom.com/uploads/title.png)

Yahoo!  :crazy:

I'm glad that this game may be being translated into English due to its considerable pedigree, and the unusual way in which the player back then could contact a phone service over the FDS network to hear voice recordings from an actress for story and tips!

This wiki page actually has transcripts of those voice recordings, but they're in Japanese. Perhaps you could actually edit it over there and upload your English translation? The phone numbers were cut off soon after the game's release and will never work again, so there goes that. However, the messages and hints are displayed in text form in subsequent versions of the game.
http://www.nindb.net/nes/tokimeki-high-school/guide.html#phonemessages

Don't get your hopes up too high regarding the pedigree. :P It seems like a cute, interesting game, but it was probably more like a publicity stunt back then. Expect much idol nerd wish fulfillment.

I heard the same thing about "later versions of the game", but where are the later versions? I'll see what I can do.
Title: Re: Nakayama Miho's Tokimeki High School (Famicom Disk System)
Post by: Pennywise on March 30, 2017, 07:44:10 am
You can reoptimize the compression for the English translation, but you're still gonna run into some pretty severe space limitations.

I'll give you an example for what I did/am doing with Dead Zone. So the game uses dictionary compression as well in that each entry is a fixed 8 bytes, but I improved it. I increased the number of entries and recoded the dictionary to load any length I want. Using Table Dumper Pro, I split all the fds files and got a disk space and ram usage analysis, which I then used to expand a file to give me more space. Anyhow, the script's not fully translated yet and the compression isn't optimized, but I'm pretty sure the script will have to be carefully edited down to fit back in.
Title: Re: Nakayama Miho's Tokimeki High School (Famicom Disk System)
Post by: ObiKKa on March 30, 2017, 03:15:43 pm
Thanks, that helped. I thought maybe there was something special, but it just uses the OS clip board.

Don't get your hopes up too high regarding the pedigree. :P It seems like a cute, interesting game, but it was probably more like a publicity stunt back then. Expect much idol nerd wish fulfillment.
Thanks. Though, fortunately, I've never said that this game was 'great' in its subjective term, :police:, haha! But perhaps see it as a beginner's sort of game development, 'testing the waters', for these developers before they each went on to make better and more famous games!

Quote
I heard the same thing about "later versions of the game", but where are the later versions? I'll see what I can do.
Well, I found this in the third paragraph in this strategy wiki article for this game but they've never referenced it to anywhere.
http://strategywiki.org/wiki/Nakayama_Miho_no_Tokimeki_High_School
Title: Re: Nakayama Miho's Tokimeki High School (Famicom Disk System)
Post by: filler on March 31, 2017, 09:32:45 pm
All right font nazis, here's your chance.

There should be room for an upper/lowercase 1BPP font. So these are the contenders:

Font 1 (happens to be the one used in my PCE Maison Ikkoku project)
(http://mattsmessyroom.com/uploads/chr000.png)
Font 2
(http://mattsmessyroom.com/uploads/chr001.png)
Font 3
(http://mattsmessyroom.com/uploads/chr003a.png)
Font 4
(http://mattsmessyroom.com/uploads/chr003b.png)
Font 5
(http://mattsmessyroom.com/uploads/chr004.png)

Here's what the text looks like.
(http://mattsmessyroom.com/uploads/screen01.png)
(http://mattsmessyroom.com/uploads/screen02.png)

Please leave your votes below.
Title: Re: Nakayama Miho's Tokimeki High School (Famicom Disk System)
Post by: ObiKKa on March 31, 2017, 09:35:09 pm
I like Font 4 the most for readability. Font 3 is better than Font 5. Font 2 is pretty.
Title: Re: Nakayama Miho's Tokimeki High School (Famicom Disk System)
Post by: KingMike on March 31, 2017, 10:12:50 pm
Font 2 I'm guessing is the Link's Awakening font (or very similar). Perhaps is the most fitting. If we are to be "dreaming" of dating a popstar.
4 is I think a Technos font (looks similar as I think I used it before), though the typewriter look is maybe a fit. (though 3 I guess is also Technos)
5 is the Pokemon GB font (without even noticing the first two characters which give it away)

So, I go with 2 first choice, 4 second.
1 is my least favorite of the options.
Title: Re: Nakayama Miho's Tokimeki High School (Famicom Disk System)
Post by: Spinner 8 on March 31, 2017, 10:40:32 pm
Please don't use the Pokemon font.

I also vote for 2, then 4.
Title: Re: Nakayama Miho\'s Tokimeki High School (Famicom Disk System)
Post by: filler on March 31, 2017, 11:02:06 pm
Lol, I didn't even notice it was Pokémon. These are mostly from an 8x8 font pack.

EDIT: As it seems to be the current fav, here's the moonspeak for font 2.

(http://mattsmessyroom.com/uploads/screen03.png)
(http://mattsmessyroom.com/uploads/screen04.png)

April 02, 2017, 01:25:18 am - (Auto Merged - Double Posts are not allowed before 7 days.)
Here's the name entry screen.

(http://mattsmessyroom.com/uploads/screen05.png)
Title: Re: Nakayama Miho's Tokimeki High School (Famicom Disk System)
Post by: Satoshi_Matrix on April 02, 2017, 02:18:58 am
Please font 4. please please please.
Title: Re: Nakayama Miho's Tokimeki High School (Famicom Disk System)
Post by: mikeprado30 on April 02, 2017, 03:12:00 am
Font 3 definitively!  ;)
Title: Re: Nakayama Miho's Tokimeki High School (Famicom Disk System)
Post by: filler on April 02, 2017, 01:20:26 pm
Interestingly, ASCII capital letters (41-5A) are available so I'm using those for menu items and "system" messages, reserving the fancy font for dialog related stuff. I don't see the font in the ROM though. Does anyone know if there is some FDS system font that this is using?

I've manually inserted the menu actions.

(http://mattsmessyroom.com/uploads/screen06.png)

EDIT: BTW: Thanks for the additional font votes! The font is relatively easy to update so I'll take future votes into consideration (within reason).
Title: Re: Nakayama Miho's Tokimeki High School (Famicom Disk System)
Post by: KingMike on April 02, 2017, 04:10:02 pm
I know the FDS BIOS uses an English font for message (such as the error messages on the boot screen, as well as the KYODAKU- file, which is the "licensed" message that appears when loading the disk. Which I believe was used as a copyright-protection measure to deter unlicensed development.)

If the game itself never replaces them in VRAM, then yes they would be leftover from the BIOS startup.
Title: Re: Nakayama Miho's Tokimeki High School (Famicom Disk System)
Post by: filler on April 02, 2017, 07:41:14 pm
Ah yes, that's it! I opened the bios and there's the font plain as day. Thanks for clearing up that little mystery. :thumbsup:
Title: Re: Nakayama Miho's Tokimeki High School (Famicom Disk System)
Post by: filler on April 19, 2017, 11:39:10 pm
So I'm finished with the first draft of the scrip. Yay!  :woot!:

Now it's time to spot-check, and edit. After observing the recent Legend of Zelda FDS project, and reading the warnings from Pennywise and KingMike, I'm hoping this project isn't hobbled by overly restrictive space constraints.

The most important thing to me is that a script is accurate and flows well. While I don't want to sacrifice either of those things, I plan to edit with space in mind. Maybe there will be a miracle and it can fit without seeing the chopping block.
Title: Re: Nakayama Miho's Tokimeki High School (Famicom Disk System)
Post by: filler on April 30, 2017, 02:54:28 am
I just finished playing through the game and checking the script. It needs a proofread/spellcheck, but I'll probably do that tomorrow. The important part now is...

Who would like to help me insert this script? ;D

As has been mentioned, the fact that this is an FDS game poses some unique challenges. I've edited the script with size in mind, but it's still going to need to accommodate a larger script than it has now. Feel free to respond here or via PM.

EDIT:

As I haven't had any responses for a couple of days, I'd like to throw the resources out there for folks to look at if you're interested. Doing one better, I've also licensed this work so that others can use it as they see fit, for a non-English translation patch for instance.

At this point I'm interested in being involved in the final production of an English language patch (though it's not strictly necessary per the license), so please feel free to contact me if you'd like to work on this after reviewing the materials.

Miho Nakayama's Tokimeki High School Script Package (http://mattsmessyroom.com/uploads/miho_nakayama_package.7z)
Title: Re: Nakayama Miho's Tokimeki High School (Famicom Disk System)
Post by: Pennywise on May 03, 2017, 09:15:35 pm
I'll be keeping the game in mind for future projects. I don't want to work on too many FDS translations at once considering how much of a pain they are to hack. It'll probably be down to Mr. Gold or this game for my next FDS project, but I did take the liberty of breaking down all the files and getting an overview of how the PRG-RAM is used and it's pretty much full. However, since the game already uses compression, it might be possible implement a more powerful method instead to get a decent sized script back in.
Title: Re: Nakayama Miho's Tokimeki High School (Famicom Disk System)
Post by: filler on May 04, 2017, 12:53:03 am
I appreciate that. Has anyone translated the Mr. Gold script yet? If not, I might be up for some quid pro quo. :) I'd never heard of it before. That intro Engrish is pretty epic.
Title: Re: Nakayama Miho's Tokimeki High School (Famicom Disk System)
Post by: Pennywise on May 04, 2017, 12:28:36 pm
Nah, I haven't gotten that far yet. It's just a casual interest mostly because of that intro. It might come down to which one would be less work.
Title: Re: Nakayama Miho's Tokimeki High School (Famicom Disk System)
Post by: KingMike on May 04, 2017, 10:40:31 pm
I only heard of Mr. Gold when Tomato was streaming him reading some of his retro Japanese game magazines and apparently Mr. Gold was at one point like the #2 most-written game by Disk Writers or something like that. (I heard SMB2 was the #1 overall over the lifetime of Disk Writers but I'm not sure at that time.)
Title: Re: Nakayama Miho's Tokimeki High School (Famicom Disk System)
Post by: FCandChill on May 06, 2017, 12:03:43 pm
Who would like to help me insert this script? ;D

I can write the code to insert the script. I just need the proper documentation (e.g. pointers, table, etc.) Just keep the conversation on the forum ... instead of PM.

I did find a library for dictionary compression ... should help http://forums.nesdev.com/viewtopic.php?t=5677
Title: Re: Nakayama Miho's Tokimeki High School (Famicom Disk System)
Post by: filler on May 06, 2017, 06:01:05 pm
Miho Nakayama's Tokimeki High School Script Package (http://mattsmessyroom.com/uploads/miho_nakayama_package.7z)

This has table files and notes on offsets. That's all the info I have.

That compression tool loks cool!
Title: ###
Post by: FCandChill on May 06, 2017, 06:46:54 pm
Comment removed because reasons...
Title: Re: Nakayama Miho's Tokimeki High School (Famicom Disk System)
Post by: filler on May 06, 2017, 11:29:36 pm
I don't know how to find dialog pointers unfortunately.  :(
Title: Re: Nakayama Miho's Tokimeki High School (Famicom Disk System)
Post by: KingMike on May 07, 2017, 11:59:22 am
Can you find the dialogue in RAM (using the hex editor in FCEUX to search RAM while running)?
Or using a program, such one I wrote ;) (I think I called it FDS Builder) to split the FDS image into files, the pointer can be found by finding the offset within the split file and adding it to the file's RAM offset (which would be listed in a contents file generated by the program).
Title: Re: Nakayama Miho's Tokimeki High School (Famicom Disk System)
Post by: FCandChill on May 07, 2017, 10:00:10 pm
Nice...

Assuming you get those pointers, how do you want this program done? Also, it would be nice to get pointers for the DTE table, so it can be modified. Here's options to consider...


...submit a copy. Fill it out with the ☑ character, a checked checkbox.
Title: Re: Nakayama Miho's Tokimeki High School (Famicom Disk System)
Post by: filler on May 07, 2017, 11:54:41 pm
Can you find the dialogue in RAM (using the hex editor in FCEUX to search RAM while running)?
Or using a program, such one I wrote ;) (I think I called it FDS Builder) to split the FDS image into files, the pointer can be found by finding the offset within the split file and adding it to the file's RAM offset (which would be listed in a contents file generated by the program).

So here's the first bit of dialog in RAM. Highlighted is "ここは". Does this help? What do I do next?

(http://mattsmessyroom.com/uploads/ram01.png)

Nice...

Assuming you get those pointers, how do you want this program done? Also, it would be nice to get pointers for the DTE table, so it can be modified. Here's options to consider...

  • ☐Terminal or ☐GUI
  • ☐Import and export script only ☐Edit one by one. ☐Both
  • For the edit one by one option with a GUI... do you want to see a comparison between the original and the Japanese text while editing the script? ☐Yes ☐No
  • Use DTE compression ☐Yes ☐No
  • Be able to edit DTE table ...proper documentation must be provided... ☐yes ☐No

...submit a copy. Fill it out with the ☑ character, a checked checkbox.

I guess if we're going to make a fancy dumper/inserter GUI would be nice. I don't think one by one is necessary. Just dump the whole script and reinsert. Not sure why we'd want to toggle DTE off in this case? I think that's the important part. Would this use the DTE utility you linked to? Is there any reason to edit the DTE as opposed to building it automatically?

The cool thing about this, aside from getting the English script in there, would be if this helps folks make other language versions.
Title: Re: Nakayama Miho's Tokimeki High School (Famicom Disk System)
Post by: Spinner 8 on May 08, 2017, 02:25:27 am
Yeah, I checked it out. Does this game not use pointers for the dialogue? Some games generate pointers on the fly. If not, offsets will not be enough to create a tool for you...

I was taking a quick look at this game last week. The first two text banks (91AD-93F2 and A3D2-A62E) have the pointer tables just ahead of them. Bank 1's pointers start at 917B, bank 2's start at A3AA. (These addresses assume no header.)

Hope this helps a bit :)

EDIT: I forgot to mention the pointer offset! Bank 1 pointers are the ROM address + 28B9, and bank 2 pointers are the ROM address + 1B28. I don't think bank 3 has a pointer, since it's just a single long message. I didn't look at the other text banks.
Title: ###
Post by: FCandChill on May 08, 2017, 05:57:30 pm
Comment removed because reasons...
Title: Re: Nakayama Miho's Tokimeki High School (Famicom Disk System)
Post by: filler on May 08, 2017, 06:02:37 pm
The table file should be sjis. I can double check.
Title: Re: Nakayama Miho\'s Tokimeki High School (Famicom Disk System)
Post by: FCandChill on May 08, 2017, 08:32:33 pm
The table file should be sjis. I can double check.
Alright thanks ... I got it to work now!

May 08, 2017, 09:13:59 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
Just a demo
(http://www.bwass.org/bucket/miho%20screen%20shot.png)
Title: Re: Nakayama Miho's Tokimeki High School (Famicom Disk System)
Post by: KingMike on May 08, 2017, 10:08:06 pm
The RAM address in that screenshot should be C088. So, C088 should be the pointer value.

You can't easily convert from offset in a .FDS file because an FDS game is an image with several files inside. Files get loaded to RAM (which is where the games are run from), and so the pointer depends on WHERE in RAM that data gets loaded to (that RAM address is in the file header, if you can find the header in the .FDS).
I'm not 100% but it SEEMS that files in an FDS image are stored sequentially and they seem to always have filenames (8 characters) in ASCII (at least the games I have looked at). If I recall, the header format was: a 0x03 flag, 8-character file name, file size and RAM offset (2 bytes each, maybe not that order), then 1 byte indicating destination RAM (PRG-RAM, CHR-RAM or PPU), then a 0x04 flag then the file data.
Without using a tool to rip a file list from the FDS, you'd have to scan through the file to look for ASCII text (for the filenames) and do math using the file size data to find where the files are. Or use the FCEUX hex editor to find the RAM offsets to find pointer values and then do a hex search to find those.
Title: Re: Nakayama Miho\'s Tokimeki High School (Famicom Disk System)
Post by: FCandChill on May 08, 2017, 11:12:20 pm
Thanks, kingmike. Everything is loaded into memory and then read for the FDS ... so it makes sense that RAM addresses would be used as pointers. The guide of NesDev is helpful. (http://wiki.nesdev.com/w/index.php/Family_Computer_Disk_System#File_amount_block_.28block_2.29) So I can either hardcode where I read the RAM offsets or not... In theory, I could map out where the files are in the ROM and read where the RAM addresses are stored instead of hardcoding the location. Detailed documentation on how to do this would be nice ... or a code library I could use.

May 09, 2017, 08:34:05 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
Current code https://github.com/romhAndAcking/Miho/
Title: Re: Nakayama Miho's Tokimeki High School (Famicom Disk System)
Post by: filler on May 10, 2017, 11:39:15 am
Awesome! I'll check this out tonight.
Title: Re: Nakayama Miho's Tokimeki High School (Famicom Disk System)
Post by: FCandChill on May 10, 2017, 08:08:54 pm
I actually finished stealing doing the code for compression. Now to modify the pointers. Is there a byte in the file specifying how many pointers there are? I just hardcoded the values...

Also ... the game don't leave any space in the files ... but there's plenty of space on the disk. You may want to consider moving files around and expanding them ... if the game even allows you to...
Title: Re: Nakayama Miho's Tokimeki High School (Famicom Disk System)
Post by: KingMike on May 10, 2017, 10:10:22 pm
I think files might only be stored sequentially (there doesn't seem to be any kind of TOC, if I'm guessing right what a TOC is in CD-based games (it says what sectors files are stored at on the disc?), which I haven't hacked). Files could be expanded (if you separate and rebuild the FDS disk contents) but depending on the game could overwrite other data if the following RAM (after the end of where the file is loaded) is used for other files or other data.
As an example, in Deep Dungeon 1 and 2, I was able to expand the individual level data a little bit because I was lucky that the particular games reserved an extra 0x100 bytes in RAM (than what the largest level file actually used) between where the other data would be loaded in RAM.
(well, some of that RAM space was used to store dialogue window text as it was being rendered but a few minor ASM hacks were all that I needed to move it around a bit in RAM to get the little extra space I needed in that situation).
Title: Re: Nakayama Miho's Tokimeki High School (Famicom Disk System)
Post by: FCandChill on May 11, 2017, 02:05:28 am
I haven't encountered any documentation on a directory that references FDS files... Thanks anyway, kingmike!

A new version of the utility was pushed to GitHub... (https://github.com/romhAndAcking/Miho/)

(http://www.bwass.org/bucket/miho2.png)

Read the readme for more info.
Title: Re: Nakayama Miho's Tokimeki High School (Famicom Disk System)
Post by: filler on May 11, 2017, 03:54:58 pm
Looks good! I just had my internet die in the middle of the 7GB Visual Studio download, so it may be a while before I can check this out.

EDIT:

I managed to download Visual Studio. Having some trouble compiling.

I pick make project from existing code -> windows app -> but it says:

The reference assemblies for framework ".NETFramework,Version=v4.0,Profile=Client" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend.

Seems like this would be as simple as a download, but I don't see anything for .NET Framework 4.0. It's all 4.5 and over.
Title: Re: Nakayama Miho\\\'s Tokimeki High School (Famicom Disk System)
Post by: FCandChill on May 11, 2017, 08:18:25 pm
You'll have to...

1) Make a new solution
2) Recreate the projects
3) Add the class files from my GitHub to your projects through the your OS's GUI
4) Make Visual Studio recognize the files exist by. You do this through the solution explorer by pressing the icon with the sloppily stacked papers. Then you right click each outlined file and select an option to include the files in the project.

Whew...

May 11, 2017, 10:55:53 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
I may have found two files referencing files in the game. On both sides, there's a file called "LS DATA" in ASCII. Considering LS is a UNIX command for file viewing (https://en.wikipedia.org/wiki/Ls) (predates the game by a decade), it's a reasonable guess...

May 12, 2017, 04:40:22 am - (Auto Merged - Double Posts are not allowed before 7 days.)
Updated the code again. Has a new comparison feature. Keep out the bank 2 text as well for something amusing...
Title: Re: Nakayama Miho's Tokimeki High School (Famicom Disk System)
Post by: Spinner 8 on May 12, 2017, 10:55:20 pm
I took another look at the text banks and the pointers. :) Here's everything I have (for now).

Code: [Select]
bank1: 91AD-93F2
bank1 pointer: ROM+28B9
bank2 pointer table 917B-91AC (25 strings)

bank2: A3D2-A62E
bank2 pointer: ROM+1B28
bank2 pointer table A3AA-A3D1 (20 strings)

bank4: 10F86-1234C
bank4 pointer: ROM-4E27
bank4 pointer table 10EDE-10F85 (84 strings)

bank5: 14263-15192
bank5 pointer: ROM-7BD5
bank5 pointer table 141E3-14262 (64 strings)

bank6: 167B4-174C2
bank6 pointer: ROM-A6D6
bank6 pointer table 16704-167B3 (88 strings)

bank7: 1828C-18815
bank7 pointer: ROM-C9B4
bank7 pointer table 18252-1828B (29 strings)

bank8: 1A02A-1AB3F
bank8 pointer: ROM-DD14
bank8 pointer table 19FB2-1A029 (60 strings)

Note that bank 3 isn't listed, and this all assumes a ROM without header.
Title: Re: Nakayama Miho's Tokimeki High School (Famicom Disk System)
Post by: FCandChill on May 13, 2017, 02:28:11 am
Thank you for that information, Spinner8. All that info is good on my end except for the last bank ... bank #8. Could you double check that one? (FDS headers are pointless ... all the information contained in it can be figured through the disk dump size...)


Good news... I added code to limit the script size when inserting!
Bad news... I didn't realize how bad the dictionary compression is... Dumping and reinserting gives an error of the script being 26 bytes too large...
Title: Re: Nakayama Miho's Tokimeki High School (Famicom Disk System)
Post by: Spinner 8 on May 13, 2017, 12:52:28 pm
Thank you for that information, Spinner8. All that info is good on my end except for the last bank ... bank #8. Could you double check that one? (FDS headers are pointless ... all the information contained in it can be figured through the disk dump size...)

Hmm, I just double-checked everything and it still looks good to me. I could be missing something though.
Title: Re: Nakayama Miho's Tokimeki High School (Famicom Disk System)
Post by: FCandChill on May 14, 2017, 11:04:59 pm
Hmm, I just double-checked everything and it still looks good to me. I could be missing something though.
I could be missing something too... Filler, how are you doing with the utility? I made a new update.
Title: Re: Nakayama Miho's Tokimeki High School (Famicom Disk System)
Post by: filler on May 15, 2017, 10:44:31 am
I could be missing something too... Filler, how are you doing with the utility? I made a new update.
Not so good. :( I tried making a project and adding the files like you said, but I'm still getting some errors. Would it help if you share the Visual Studio project files with me directly?
Title: Re: Nakayama Miho's Tokimeki High School (Famicom Disk System)
Post by: FCandChill on May 15, 2017, 01:11:59 pm
Not so good. :( I tried making a project and adding the files like you said, but I'm still getting some errors. Would it help if you share the Visual Studio project files with me directly?

The source of the issue probably... Go to "Project > Add reference". This will allow you to have projects reference each other.
Title: Re: Nakayama Miho's Tokimeki High School (Famicom Disk System)
Post by: filler on May 15, 2017, 02:46:10 pm
The source of the issue probably... Go to "Project > Add reference". This will allow you to have projects reference each other.
This is what I have now:
(http://mattsmessyroom.com/uploads/visual_studio01.png)

If I go to add reference I get this dialog:
(http://mattsmessyroom.com/uploads/visual_studio02.png)
(http://mattsmessyroom.com/uploads/visual_studio03.png)

The only things that seem to be selectable are these extensions.
Title: Re: Nakayama Miho's Tokimeki High School (Famicom Disk System)
Post by: FCandChill on May 15, 2017, 04:47:16 pm
There's your issue... You created one project for the solution and placed folders inside of it. Miho, Diskinfo, et al should get separate projects. Right click the "Solution App1" ... and created a new "Windows Form Application". Then for the other projects, created a new class library. After that, place the files in the respective projects.
Title: Re: Nakayama Miho's Tokimeki High School (Famicom Disk System)
Post by: filler on May 15, 2017, 10:18:24 pm
There's your issue... You created one project for the solution and placed folders inside of it. Miho, Diskinfo, et al should get separate projects. Right click the "Solution App1" ... and created a new "Windows Form Application". Then for the other projects, created a new class library. After that, place the files in the respective projects.
Still trying... :banghead:

So I made a new project that's a "Windows Form App" and called it "MihoUtil". This made the solution, and first project.

(http://mattsmessyroom.com/uploads/visual_studio04.png)

Then I made a new project, "AddressStuff"

(http://mattsmessyroom.com/uploads/visual_studio05.png)

And copied the contents of the remote "AddressStuff" inside, and did like you said before and added the files to the project.

(http://mattsmessyroom.com/uploads/visual_studio06.png)

I did this for all folders. Now I seem to be able to build without errors, but I get a blank form. Thoughts?

(http://mattsmessyroom.com/uploads/visual_studio07.png)
Title: Re: Nakayama Miho's Tokimeki High School (Famicom Disk System)
Post by: FCandChill on May 15, 2017, 10:24:29 pm
Right click the Miho project ... and select the option to set it up as the start project.
Title: Re: Nakayama Miho's Tokimeki High School (Famicom Disk System)
Post by: filler on May 15, 2017, 10:36:10 pm
Right click the Miho project ... and select the option to set it up as the start project.
I get these messages.

(http://mattsmessyroom.com/uploads/visual_studio08.png)
(http://mattsmessyroom.com/uploads/visual_studio09.png)
Title: Re: Nakayama Miho's Tokimeki High School (Famicom Disk System)
Post by: FCandChill on May 15, 2017, 10:45:38 pm
Two methods that help me in such situation....

1) Double click some error messages ... then hover over the red underlined code ... it may give a light bulb ... this is where VS corrects the error for you.
or
2) Click any three options in the build menu or any combination of the first three options.
Title: Re: Nakayama Miho's Tokimeki High School (Famicom Disk System)
Post by: filler on May 16, 2017, 06:17:35 am
This is basically telling me it can't find classes that exist in the sub projects (AddressStuff, etc.) despite these projects having been "added". There's something funny here, and I'm running out of patience for this.

I advocate abandoning the approach of me having a copy of the code I can compile. Is there some other way we can test the dumper/inserter and move forward with this?

EDIT:

Yay :woot!: Hurrah  :woot!:

FCandChill: Thanks for getting me a version of the dumper/inserter. Below is the first bit of my test insertion.

(http://mattsmessyroom.com/uploads/miho_eng01.png)

I messed up on the English table file in that I wasn't very diligent. I still need to switch a lot of the Japanese characters over to English and such. Example:

"Hello。 This is Miho Nakayama。Hello。 This is Miho Nakayama。Are you enjoying "Miho Nakayama'sTokimeki High School"?Huh? Not yet? The love story can'tbegin without you! Hurry and start the gameokay。 I'll be waiting。This has been a notice from Miho。    Press the A buttonFor starters、 a note about disk fax。We're accepting entries from Dec。 19th、to Feb。 29th。"

Am I able to edit that table file and use it right away, or will that need to be sent back to you? Also I tried \# as the line character, but it said it was not a character that was in the table.

If you'd rather do this via PM, just PM me the response.
Title: Re: Nakayama Miho's Tokimeki High School (Famicom Disk System)
Post by: FCandChill on May 16, 2017, 02:57:26 pm
"\#" is a special case character... When exporting ... the character is replaced with a linebreak. For importing don't use the character and use your OS's linebreak.
Title: Re: Nakayama Miho's Tokimeki High School (Famicom Disk System)
Post by: Spinner 8 on May 17, 2017, 10:55:48 pm
filler asked me to take a look at the dictionary table and pointers.

The values are located from #60 through #9E in the TBL (#9F is a special case for the player's name), and the table is from 7B38 through 7C82 in the ROM. The TBL value at #60 labeled "[STARTDIALOG]" is simply a colon, line break, and a quotation mark, so you can change that to something else if you like (for instance you can remove the line break if you're concerned about a lack of space on-screen).

There are actually no pointers for the dictionary values - the game will simply start at 7B38 (300 in RAM) and "count" each end break (#FF), until it reaches the right number. I hope that makes sense, but essentially, as long as the dictionary values are all sequential, they'll work fine without needing pointers - with one exception.

The dictionary values are added to RAM at 300-44A. 44B-44F are five bytes reserved for the player's name (four characters plus the #FF end break), appended to the end of the dictionary values. I'm not sure if the dictionary table can be expanded (I imagine that would take a lot more testing to find out), but the name pointer is stored at 4E4 in the ROM if you want to move it elsewhere. Just make sure it's at the very end of the dictionary table.

Let me know if I can help with anything else.

(edited for clarity)
Title: Re: Nakayama Miho's Tokimeki High School (Famicom Disk System)
Post by: FCandChill on May 18, 2017, 05:04:07 pm
Thanks Spinner 8! I think I'll go ahead and add you to the credits part of the program ... because you deserve it! The dictionary can now be modified but that special case $9F is tripping me up... Where is the string located in a non-headered disk image and where is the pointer? The pointer location you gave me is where a file name is...
Title: Re: Nakayama Miho's Tokimeki High School (Famicom Disk System)
Post by: Spinner 8 on May 19, 2017, 10:33:55 am
The dictionary can now be modified but that special case $9F is tripping me up... Where is the string located in a non-headered disk image and where is the pointer? The pointer location you gave me is where a file name is...

Well it's the player's name, which they enter themselves when they start a new game, so it's not exactly a string you can locate. Once the name is entered after starting a new game, it gets stored at $44B in RAM for dictionary purposes... and probably elsewhere too, I mean it's a disk-based game so I'm sure it's saved to a more permanent location, but that doesn't really matter much in terms of the dictionary compression itself.

Again, if you want to expand (or shrink) the dictionary table, you'll need to move the location of that player name in RAM (not ROM) to wherever the end of the table is. The pointer for that name is at $4E4 in the ROM (not RAM). :)

EDIT: I just realized there may be a separate pointer when loading a game (as opposed to starting a new game). I kind of doubt it, but the coding in this game is kind of weird, so who knows. I'll take a closer look later at how the name is saved and loaded.

ANOTHER EDIT: I pulled up the game in a hex editor just now, and I see what you mean about the pointer being where a file name is... I don't think it's a file name ($141-$3C12 is all one file named "OPEN"), but immediately after the pointer is the word "DISK" in ASCII. Still, I'm pretty sure that that's the correct pointer, so I'll double-check and confirm it later on today.