Romhacking.net

General Category => News Submissions => Topic started by: RHDNBot on May 13, 2017, 01:46:23 am

Title: Other: Castlevania 30th anniversary
Post by: RHDNBot on May 13, 2017, 01:46:23 am
(http://www.romhacking.net/newsimages/newsimage1876a.gif) (http://www.romhacking.net/newsimages/newsimage1876a.gif)

Update By: kya

According to Wikipedia, the NES release of Castlevania has recently turned 30. On this occasion a facelift patch for the game is released. The graphics are mostly transferred from the game's mobile phone version. The missing tiles are taken from Vampire Killer, Castlevania Bloodlines, or
touched up. Nothing else is changed - the gameplay is left intact. To play the game on Windows, you should load a Castlevania US ROM into a patched Nestopia UE emulator available here:

https://yadi.sk/d/FpFQjw9Q3HgFb5?ncrnd=3454

The Count is still ready for a rematch. Are you?

Relevant Link (https://yadi.sk/d/FpFQjw9Q3HgFb5?ncrnd=3454)
Title: Re: Other: Castlevania 30th anniversary
Post by: KrustyKong on May 13, 2017, 02:12:28 am
Chrome says the download to the emu is a virus?
Title: Re: Other: Castlevania 30th anniversary
Post by: Spinner 8 on May 13, 2017, 02:22:24 am
Yup, Win10 Defender says it's a trojan. Who knows, emulators always come up as false positives, but someone else is welcome to try it and let me know. :)

Anyways this isn't a ROM hack, it's an emulator hack. It uses the CV1 ROM untouched. But, it's just a news post, so whatever.
Title: Re: Other: Castlevania 30th anniversary
Post by: SunGodPortal on May 13, 2017, 02:29:43 am
Chrome says the download to the emu is a virus?

Yeah, I say it's a fluke. I'm sick of emu/hacking things always reading false pos's.
Title: Re: Other: Castlevania 30th anniversary
Post by: FCandChill on May 13, 2017, 02:33:07 am
Yup, Win10 Defender says it's a trojan. Who knows, emulators always come up as false positives, but someone else is welcome to try it and let me know. :)

Just sandbox it or put it in a non-networked virtual machine if you really want to play the game. I honestly wouldn't trust it...

May 13, 2017, 02:36:17 am - (Auto Merged - Double Posts are not allowed before 7 days.)
The emulator is probably getting malware flags because it's modified. Virus scanners are probably comparing the modified version to the official one and think it was modified for malicious purposes... :D
Title: Re: Other: Castlevania 30th anniversary
Post by: SunGodPortal on May 13, 2017, 03:05:26 am
The emulator is probably getting malware flags because it's modified. Virus scanners are probably comparing the modified version to the official one and think it was modified for malicious purposes... :D

Could have debugging features that are tripping it.
Title: Re: Other: Castlevania 30th anniversary
Post by: nesautist on May 13, 2017, 06:45:27 am
Can this be compiled for Linux?
Title: Re: Other: Castlevania 30th anniversary
Post by: lexluthermiester on May 13, 2017, 06:48:04 am
Yup, Win10 Defender says it's a trojan. Who knows, emulators always come up as false positives, but someone else is welcome to try it and let me know. :)

Anyways this isn't a ROM hack, it's an emulator hack. It uses the CV1 ROM untouched. But, it's just a news post, so whatever.
Windows Defender is lacking at best and gets in the user's way more often than not. Do yourself a favor, remove it and use a competent antivirus/antimalware suite like Avira, Avast or Comodo.

And Castlevania never looked so good!
Title: Re: Other: Castlevania 30th anniversary
Post by: MathUser2929 on May 13, 2017, 08:43:15 am
This looks really good. I hope someone takes more screenshots or makes a youtube video.
Title: Re: Other: Castlevania 30th anniversary
Post by: Tsukiyomaru0 on May 13, 2017, 09:58:07 am
Windows Defender is lacking at best and gets in the user's way more often than not. Do yourself a favor, remove it and use a competent antivirus/antimalware suite like Avira, Avast or Comodo.

And Castlevania never looked so good!

Speaking of, Avast said nothing.
Title: Re: Other: Castlevania 30th anniversary
Post by: sics on May 13, 2017, 11:42:38 am
It happened to me the same with some translations of emulators that you create, it is a pity I wanted to share in the site, but i thought it better to avoid inconveniences, if anyone is interested the list is:

FCEUX | VirtuaNES | Nestopia

Gens r57shell mod | Kega Fusion |Gens32Surreal

DeSmuME  (Español) ;)
Title: Re: Other: Castlevania 30th anniversary
Post by: Rudy on May 13, 2017, 01:42:26 pm
Personally I would love more information about this custom Nestopia build. It allows graphic packs?
Title: Re: Other: Castlevania 30th anniversary
Post by: MagusLOGS on May 13, 2017, 02:12:26 pm
This is really fantastic work. I was always wondering if it could be possible to enhance the NES graphics with Graphic Packs without patching the Original ROMs. This Emulator proves it that it is indeed possible. I hope someone with the knowledge can make a NES Emulator (or other Systems) which supports this sort of Graphic Enchantment via Graphic Packs. This is a big step in the right direction as far as modding/hacking goes. :thumbsup:
Title: Re: Other: Castlevania 30th anniversary
Post by: Pancio on May 13, 2017, 02:27:15 pm
looks really great. idea with a graphic packs is great ... but i wonder if its possible to patch rom file so it has those graphics build in ? like appling ips patches. meaby someone can provide ips patch. would be great ;) cheers
Title: Re: Other: Castlevania 30th anniversary
Post by: Tsukiyomaru0 on May 13, 2017, 03:21:37 pm
From the looks of it, the emulator transforms the tiles when rendering, based on palette and VRAM, using an external image.
Title: Re: Other: Castlevania 30th anniversary
Post by: danke on May 13, 2017, 03:34:19 pm
Just a tip:

If an exe has the word "patch" in the title, it will be flagged as a virus one way or another, period. Y'all need to get more creative naming your programs.
Title: Re: Other: Castlevania 30th anniversary
Post by: nesrocks on May 13, 2017, 04:49:36 pm
Very interested in the nestopia build too as the hd nes emulator is terrible to work with.
Title: Re: Other: Castlevania 30th anniversary
Post by: Bonk on May 13, 2017, 05:01:56 pm
This is awesome.
Title: Re: Other: Castlevania 30th anniversary
Post by: Spooniest on May 13, 2017, 07:41:16 pm
I'm live on twitch with this guy now...let's do it. :) You've got me.

Having trouble displaying chat on stream with CLR browser plugin...OBS...


ugghhhhhh huge software update for obs never mind


Edit: Ok all fixed now! Live :D
Title: Re: Other: Castlevania 30th anniversary
Post by: MathUser2929 on May 14, 2017, 02:05:17 am
I missed the cv stream, hope someone else makes such a video.
Title: Re: Other: Castlevania 30th anniversary
Post by: darthvaderx on May 14, 2017, 04:13:40 am
HD pack for Mesen ?

(W10+Avast always deletes Nestopia.exe...)
Title: Re: Other: Castlevania 30th anniversary
Post by: lexluthermiester on May 14, 2017, 04:57:24 am
Just a tip:

If an exe has the word "patch" in the title, it will be flagged as a virus one way or another, period. Y'all need to get more creative naming your programs.
Flagged by who/what? I have plenty of exe files with the word "patch" in the name. Rarely do they get flagged. Just curious..

(W10+Avast always deletes Nestopia.exe...)
Really? Never had that problem before. But then again, the last time I tested Avast none of my emu stuff was on the system being used for testing. Might be time for a new batch of tests...
Title: Re: Other: Castlevania 30th anniversary
Post by: Spooniest on May 14, 2017, 07:13:24 am
I missed the cv stream, hope someone else makes such a video.

I will do it again today, if people want to come by and see :D Really don't have much to do these days, especially not today.
Title: Re: Other: Castlevania 30th anniversary
Post by: bogaabogaa on May 14, 2017, 08:28:09 am
Here a play-through. Who can beat my time? "30min"  Love the Facelift!! Thanks so much!! :D https://www.twitch.tv/videos/143362780
Title: Re: Other: Castlevania 30th anniversary
Post by: PhyChris on May 14, 2017, 10:08:27 am
cool, Castlevania 2 next please ;)
Title: Re: Other: Castlevania 30th anniversary
Post by: FCandChill on May 14, 2017, 01:05:58 pm
Flagged by who/what? I have plenty of exe files with the word "patch" in the name. Rarely do they get flagged. Just curious..
Really? Never had that problem before. But then again, the last time I tested Avast none of my emu stuff was on the system being used for testing. Might be time for a new batch of tests...

I assume stuff like file.pdf.exe flagged too... The virus scanner must assume the downloaded exe file is trying to pass as another filetype. This isn't really a rare attack...
Title: Re: Other: Castlevania 30th anniversary
Post by: SunGodPortal on May 14, 2017, 11:36:22 pm
So if the ROM itself isn't being patched, does that mean this should be compatible with basic level hacks?
Title: Re: Other: Castlevania 30th anniversary
Post by: Pen8bits on May 15, 2017, 12:17:09 am
Guys, the hack is incomplete  :-\ (https://cdn.discordapp.com/attachments/283793090194571264/313522351608168448/Castlevania_USA_001.png)
Title: Re: Other: Castlevania 30th anniversary
Post by: haxSon on May 15, 2017, 02:09:48 am
Wow this is awesome. ;)

EDIT: wrong thread; apparently I don't know the method of posting here

EDIT2: V U D
Title: Re: Other: Castlevania 30th anniversary
Post by: bogaabogaa on May 15, 2017, 02:28:05 am
So if the ROM itself isn't being patched, does that mean this should be compatible with basic level hacks?
Yes It works. As far as I understand it does something like patching the tiles in VRAM. It is not limited to the 4 colors per tile (That had required some hacking at the nestopia I guess..) I didn't test much but I guess it would require extra work for each Hack that did changes to the ROM/tile-layout itself. But as you see in the picture new rom-hack graphics remain.. I am not a expert but tried my best to explain a little bit how I understand it. I am sure interested how it really works and how easy you can make this. If anybody knows more about this nestopia undead build and understands the NtsPpu.cpp, NstPpu.hpp, NstVideoFilterNone.cpp, NstVideoFilter2xSaI.cpp, NstVideoFilterScaleX.cpp files (yes you can build in Linux according to the readme.) Let us know  :woot!:
 
http://imgur.com/wd4YA7c

(http://i.imgur.com/wd4YA7c.png)
Title: Re: Other: Castlevania 30th anniversary
Post by: kya on May 15, 2017, 02:35:22 am
To Pen8bits: sorry, missed that. Now fixed, available at the same location.

As for the other questions. As it was was already guessed, the patched emulator replaces original patterns with modified ones when rendering. If the replacement pattern is not found, the emulator renders the original one. Both the original and the replacement patterns are stored in a skin.png file. This file has no link to a ROM, so this indeed should work for basic level hacks, if the tiles themselves were not touched. And of course you can draw your own replacement patterns if you don't like those in the skin.png. Another consequence of not being tied to a ROM is that graphics can be changed for any ROM by redrawing original patterns in a skin.png. But if you dare do this, you should be aware of some important limitations. I'll write them down, if a need arises.

Concerning the request to make a patch for Castlevania 2, to my taste, it is good enough as it is. Actually I can't think of any other NES game that requires such a patching. The reason behind making this patch for Castlevania lies in how I got acquainted with the series. The first game I saw was Vampire Killer for the MSX 2. It was early 1988 in the computer classroom of our school. The NES version fell into my hands much later, in the beginning of the ninetees after the fall of the iron curtain, when parents bought as a Dendy (russian NES clone). I was shocked by the smoothness of the scrolling (both MSX and 286 PC had problems with it), but disliked the downgrade in the graphics. Ever since I dreamed of upgrading the NES version tiles to at least the MSX level. This would've never happened because I can't draw.

But KONAMI has redrawn the tiles for the mobile phone release of Castlevania. Unfortunately they've split the release in three parts, 6 stages each. The first one is widely available, but I can't find the second and the third anywhere. If you happen to stumble upon them, please let me know. Later KONAMI has released the complete edition for the Japanese phones. But they have redrawn the enemies, making them worse (to my liking). Anyway I would really like to get that version as well, to grab the original tiles for the font, intro and ending. I have the complete edition for Chinese phones, but the font there is hyeroglyphic, and the intro and the ending are redrawn once again for the worse.
Title: Re: Other: Castlevania 30th anniversary
Post by: SunGodPortal on May 15, 2017, 08:17:19 pm
This is awesome. More hacks should take advantage of things like this. Fuck the purists.
Title: Re: Other: Castlevania 30th anniversary
Post by: Real_Character on May 16, 2017, 07:24:41 am
You need windows for this? wuuuut.
Title: Re: Other: Castlevania 30th anniversary
Post by: Zeikar on May 16, 2017, 02:16:22 pm
This is awesome!
Title: Re: Other: Castlevania 30th anniversary
Post by: ShadowOne333 on May 16, 2017, 02:24:48 pm
So basically we can't play this in any other emulator that's not Nestopia?
And there's no way to make it a standalone patch for the ROM I'm assuming, right?
Title: Re: Other: Castlevania 30th anniversary
Post by: WebSlinger on May 16, 2017, 02:58:46 pm
It's not working for me at all..  Do i need to unzip my CastleVania rom?  Have the rom in the same EXACT folder as the patch tiles?
Title: Re: Other: Castlevania 30th anniversary
Post by: Zeikar on May 16, 2017, 06:22:44 pm
This would go great with a patch that enhanced the sound effects and music!
Title: Re: Other: Castlevania 30th anniversary
Post by: SunGodPortal on May 16, 2017, 07:11:20 pm
So basically we can't play this in any other emulator that's not Nestopia?
And there's no way to make it a standalone patch for the ROM I'm assuming, right?

It appears to step beyond the bounds of what is capable on a real NES so it wouldn't make any sense to place the changes in the ROM itself. It is probably stuck being a hacked emulator hack.

Let's hope this doesn't turn into Puzzledude's IQ Test thread all over again... :P
Title: Re: Other: Castlevania 30th anniversary
Post by: -pepodmc on May 16, 2017, 09:17:07 pm
It happened to me the same with some translations of emulators that you create, it is a pity I wanted to share in the site, but i thought it better to avoid inconveniences, if anyone is interested the list is:

FCEUX | VirtuaNES | Nestopia

Gens r57shell mod | Kega Fusion |Gens32Surreal

DeSmuME  (Español) ;)

spanish translations? give it to me now XD (REALLY)
Title: Re: Other: Castlevania 30th anniversary
Post by: MathUser2929 on May 16, 2017, 10:25:28 pm
That's a good point, why not make it replace the music too? You could pick some proper remixes and include them in the download.
Title: Re: Other: Castlevania 30th anniversary
Post by: SunGodPortal on May 16, 2017, 11:47:19 pm
That's a good point, why not make it replace the music too? You could pick some proper remixes and include them in the download.

Castlevania Chronicles comes to mind. Those techno versions feel weird to listen to outside of the game but make the game feel more fun when you're actually playing it (and getting your ass handed to you since CC is borderline unfair).
Title: Re: Other: Castlevania 30th anniversary
Post by: MathUser2929 on May 17, 2017, 05:08:33 am
I liked the techno music of castlevania chronicles. Especially level 1 and tower of dolls.
Title: Re: Other: Castlevania 30th anniversary
Post by: bogaabogaa on May 17, 2017, 08:12:49 am
You need windows for this? wuuuut.
You could try using wine and tell us if it worked. There is a zip file with the source code. May be you feel like searching for a tutorial to build it on you machine. May be you could make a universal build and share it with your linux friends.


I would love to see a nestopia build that could strip the VRAM to a file and use the same file after to reskin. It could make up a easy hacking experience for beginners. But I guess it is not as easy to get all the tools made for it and if it is worth the effort. I think Sound is more complicated because it need to respond to the nes and there are many triggers.. but I may be wrong here..

It's not working for me at all..  Do i need to unzip my CastleVania rom?  Have the rom in the same EXACT folder as the patch tiles?
Make sure you using the Castlevania (U) (PRG1) there is a (PRG0) I deleted a longtime ago since it crashes always. Please try to write down exactly what you tried. It is so hard to troubleshoot like this  ::)

1. Download the zip
2. Unpack it
3. Lunch the Nestopia.exe in the folder
4. File -> open (find your Castlevania (U) (PRG1) I have mine unpacked donno if you need to
5. ...
6. Most upscale filters will crash the emulator; do not use them.
7. skin.png should reside in a folder you start the emulator from,
   otherwise the game will run unpatched.
8. The source is available in a src.zip in a root folder of the archive.
   In theory it could be built for Linux or even as a RetroArch core.
Title: Re: Other: Castlevania 30th anniversary
Post by: PLiberty on May 18, 2017, 02:07:27 am
Castlevania Chronicles comes to mind. Those techno versions feel weird to listen to outside of the game but make the game feel more fun when you're actually playing it (and getting your ass handed to you since CC is borderline unfair).
I think you mean the X68000 version is unfair. The remixed CC mode is quite manageable.
Title: Re: Other: Castlevania 30th anniversary
Post by: kya on May 18, 2017, 03:15:46 am
Due to multiple requests I've tried myself to build the emulator from sources on a Ubuntu 14 virtual machine. I had to make some changes to the source. Now it should build both in Windows and in Linux. But on Linux it is without GUI and runs too fast. Maybe it is just my VM, i don't know. I've uploaded the updated package to the same place. Sources are in a src.zip file in a root folder of the archive.

To those people who run the patched emulator, but the game looks regular: bogaabogaa is right. The emulator can't find skin.png and renders the game in its original form. You should check out where Nestopia creates its temporary and configuration files (nestopia.log, nestopia.xml, skin.log), and put skin.png into that folder.

As for the music replacement, I am a total n00b in sound programming. The obstacle I see, is that detecting a tile to be replaced is an instant process from the human perspective. Detecting the melody is not. Several seconds should pass, and what should the emulator do in the process? Remaining silent or playing the origial melody is hardly acceptable.

Concerning a tool to make pattern table dumps, I used a slightly modified FCEUX, making screenshots of its ultra-convinient Pattern Table Viewer. Of course, this way I could only dump one table at a time, but this gives us flexibility of not being dependent of a ROM's mapper.
Title: Re: Other: Castlevania 30th anniversary
Post by: bogaabogaa on May 18, 2017, 05:06:28 am
@kya Thanks for making and sharing this build. Really amazing idea and excellent execution!

I sadly don't understand any programming language and I can't make sense how you would trigger to update tiles while rendering.
As I said I am interested to find out how it works and how much work it was. A friend of me tried different ROM and when he played some contra there been fragment of the patched tiles.
And he was so happy that he could play his CV-level-hacks with a different skin!!

My questions:

- Could you imagine a Nestopia build that makes this kind of hacking easier or popular for different games?
- How do you trigger the tiles to update? Would it be possible to point to files to change and make this kind of hacking possible without programming knowledge?
- My friend did ask if he could do speed-runs with this Nestopia build. Does it run on the correct frame rate?
Title: Re: Other: Castlevania 30th anniversary
Post by: kya on May 18, 2017, 10:38:13 am
Quote
- Could you imagine a Nestopia build that makes this kind of hacking easier or popular for different games?
- How do you trigger the tiles to update? Would it be possible to point to files to change and make this kind of hacking possible without programming knowledge?

It is already possible to make graphic packs for other NES games without programming knowledge using the released emulator.

Steps (basically):

1. You throw away my skin.png
2. You create a new skin.png in your favorite graphics editor (256 pixels wide).
3. You launch a game you decided to facelift in a FCEUX NES emulator (you should ask me for a copy, it's slightly modified).
4. You open a PPU viewer (menu Debug->PPU Viewer...)
5. Every time the tiles change in a PPU viewer you grab a screenshot
6. You insert this screenshot into your skin.png twice. One under another.
7. The above copy is original patterns. Emulator will use them for detection.
8. The below copy is replacement patterns. Redraw them to your heart's content.
9. Repeat for every tileset change in a PPU viewer window. Your resulting skin.png will be very tall.

But once again, if you dare, ask me for the details.

As for 60 fps, the emulator should run at the correct frame rate, but I wouldn't bet on it. I haven't measured.
Title: Re: Other: Castlevania 30th anniversary
Post by: macbee on May 18, 2017, 04:50:51 pm
It is already possible to make graphic packs for other NES games without programming knowledge using the released emulator.

Steps (basically):

1. You throw away my skin.png
2. You create a new skin.png in your favorite graphics editor (256 pixels wide).
3. You launch a game you decided to facelift in a FCEUX NES emulator (you should ask me for a copy, it's slightly modified).
4. You open a PPU viewer (menu Debug->PPU Viewer...)
5. Every time the tiles change in a PPU viewer you grab a screenshot
6. You insert this screenshot into your skin.png twice. One under another.
7. The above copy is original patterns. Emulator will use them for detection.
8. The below copy is replacement patterns. Redraw them to your heart's content.
9. Repeat for every tileset change in a PPU viewer window. Your resulting skin.png will be very tall.

But once again, if you dare, ask me for the details.

As for 60 fps, the emulator should run at the correct frame rate, but I wouldn't bet on it. I haven't measured.
So cool. It works in a similar way to HiSMS (for Master System). I'd love to see this becoming a tool released to public (since I could never make HDNES work properly).

Congratulations! :D
Title: Re: Other: Castlevania 30th anniversary
Post by: SunGodPortal on May 19, 2017, 12:31:46 am
I think you mean the X68000 version is unfair. The remixed CC mode is quite manageable.

Well to clarify, that game is hard as fuck (that should be a good thing) and the controls are almost as bad as the Gameboy Castlevanias. That's what I mean by "unfair". Unrealistic was probably a more accurate depiction of the difficulty.
Title: Re: Other: Castlevania 30th anniversary
Post by: Azkadellia on May 19, 2017, 02:58:37 am
I think you mean the X68000 version is unfair. The remixed CC mode is quite manageable.
The original X68000 version (not the classic mode on chronicles) is much easier. Almost everything does only 1 damage.
Title: Re: Other: Castlevania 30th anniversary
Post by: bogaabogaa on May 19, 2017, 03:04:01 am
Hey Macbee keep in mind that you are still limited to the NES resolution. And up-scaling filters crash the emulator. HDNES could still compete. With this nestopia we have more color to work with. And I could imagine that there are limits too!

I would like to start on a Castlevania 3 skin

It is a non linear level selection and I wonder if there are issues that the nestopia will pick the wrong PPU tile-set to update. I did check the log and I think Castlevania does follow a stage by stage PPU tile-set replacement.

In order to work in a non linear level order you would need something like PPU sized sub-region with check-sum for the orginal tile-set in the skin.png. The program could find the the same check sum you have in the PPU and would know to replace this particular tile set in VRAM. I am not sure how it works. Still never got passed making my terminal to a calculator..

Would it work already in a none linear level select game?

I would love to get my hands on your moded FCEUX NES! And I bet there are other people who would love to have it too!

6 years ago a guy named TheBehest started to work on a CV 3 Hack. Did anybody know him? Or what happen to him? He is a very talented Artist and I would make my CV 3 skin after what I already saw of his work. And I hope I can stand up to his standards for the rest of the game. I will mention him in the credits.

https://www.youtube.com/user/TheBehest
(http://i.imgur.com/Jz6qPyR.png)
Title: Re: Other: Castlevania 30th anniversary
Post by: kya on May 19, 2017, 03:50:02 am
I'm quite surprised, people are asking for tools to develop their own skins for other NES games. HDNES exists for about 4 years now, but I haven't seen many graphic packs developed for it since then.

There is no problem giving away that FCEUX, here it is: https://yadi.sk/d/GRCG_Zaq3JKCaA

But this was made as a quick and dirty hack. Maybe it's preferrable to stick to standards? Now as Mesen supports HDNES packs, maybe it is better to use them for facelifting NES games?
They allow for upping tile resolution, and they even seem to replace background music (what people asked here).

My hack, on the other hand, due to its nature won't be able to do that. Speaking of its other limitations, it only supports 32000 colors (5 bits R, G, B) in replacement patterns. It also can not replace "something with nothing" (if an original sprite has any non-transparent color in a particular row, a replacement sprite should be non-transparent in that row too). Another limitation is that it most likely won't support fadein/fadeout, and certainly does not support NES color emphasizing and B/W mode.

And finally the most important one: the hack does not replace the tileset entirely. It only checks if a particular original pattern (a row of 8 pixels) is read from a particular address in a pattern table (a special area of NES VRAM). If it detects such an event, it renders a replacement pattern instead. So two (or more) equal original patterns can't be replaced with different replacement patterns. When I started my work, I thought this to be a minor issue. I was wrong. Despite Castlevania being a relatively small game, it happened all the time. I had to develop a concept of trigger patterns. If a particular (trigger) row of 8 pixels is detected early in a frame (preferrably in a top row), then a special subset of so called triggered patterns is used for replacement until the end of a frame. As triggers I mostly used regular color filled "night sky" or abundant brick patterns.

I'm afraid this concept won't work in a tile rich game like Castlevania 3. The non-linearity of levels is not a problem here. The problem is the total amount of the tiles in the game. It may turn out impossible to choose a trigger in certain levels.

Another problem with Castlevania 3 is that, as far as I remember, it uses a lot of custom effects like fog or water. How will they look like with a skin hack is impossible to imagine.

Although I admit, it is fun to imagine Trevor from SotN making his way through the original Castlevania 3.
Title: Re: Other: Castlevania 30th anniversary
Post by: bogaabogaa on May 19, 2017, 06:49:21 am
But this was made as a quick and dirty hack. Maybe it's preferrable to stick to standards? Now as Mesen supports HDNES packs, maybe it is better to use them for facelifting NES games?
They allow for upping tile resolution, and they even seem to replace background music (what people asked here).

How come you did not use "standards" for your face-lift?

Does anybody have experience with HDNES? To be honest I did never hear about it. I am here because I like Castlevania..

HDNES:
Only mapper 000-004, 016, 153, 159  is supported at the moment. And CV 3 uses what mapper?

Will try out Mesen emulator and see how it runs already made HD packs.

Will do some trial and error testing and report back in case anybody is wondering. But it may take a while.
Title: Re: Other: Castlevania 30th anniversary
Post by: kya on May 19, 2017, 07:22:45 am
Quote
How come you did not use "standards" for your face-lift?

I felt their way is too complicated. Creating a png per tileset and making those tile indexing files was too much for a simple (as I thought in the beginning) game.

Quote
I am here because I like Castlevania..

Me too!

Quote
CV 3 uses what mapper?

CV 3 is mapper 5. A pain in the back for many early NES emulator developers. Here the only benefit of my approach shines - it is mapper independent. But in all the other ways it is quite limited. I meant no offense when talking about adhering to standards. I just want to stress, I'm afraid my hack won't be up to the task of facelifting of the huge and advanced Castlevania 3.
Anyway, you may try to start by simply replacing the Trevor sprite and see for yourself, if the procedure is manageable. Very talently made spritesheets are available here:
http://castlevaniadungeon.net/forums/index.php?topic=3504.0
Title: Re: Other: Castlevania 30th anniversary
Post by: SourMesen on May 20, 2017, 12:13:39 am
Will try out Mesen emulator and see how it runs already made HD packs.
FYI, Mesen currently only supports HD packs for CHR ROM games - Castlevania 1 uses CHR RAM (Castlevania 3 is CHR ROM, though).
That being said, HDNes' packs are supposed to support CHR RAM, iirc - I just never got around to implementing it since there has been very little interest for HD packs from the NES community in the ~2 years since I originally added support for them in Mesen.
I'd be more than happy to add support for CHR RAM packs if someone actually makes a HD pack that needs it, though.

Edit: Also, I guess I could see about adding code to generate the PNG images & the tile definition file in Mesen (i.e dump the tiles with their proper palette to a PNG file while playing through the game, similar to what HDNes does, I think?).  That might be better since HDNes itself has a few limitations (e.g mapper support)
Title: Re: Other: Castlevania 30th anniversary
Post by: bogaabogaa on May 20, 2017, 05:32:58 am
How manageable it is for me to work on different skins on kya's nestopia.

I honestly feel to inexperienced to life up to the task. The PPU viewer showed me always the doubled tile-set and it seems stuff is missing. I could not find the Trevor sprite..
(http://i.imgur.com/mJcBHpw.png)

I did toy around a little redrawing some of the existing skin.png and it works quiet well. It will work if you stick to the guidelines. If you try to be creative you may get a headache to get
everything together. It is already quiet tedious how it is. When you try to find the proper animation with a different sprite you better think it through first(picture). You will need to look at the animation closely and make a proper sprite for it.  It will be hard to life up to the standard we have already.
(http://i.imgur.com/aaCol39.png)

Hey SourMesen I will tell you how it is for me. I am somewhat interested to make a CV3 Skin. If the tools are there and they are not horrible to work with I would start working on a skin sometimes.
My main interests in my spare time will go to Super Castlevania IV. I feel nobody will notice the potential of SC4ed when I don't make a great example. And I feel I could push this over the next year with a short level hack.
the same goes for HDNes packs. There are great example needed to get people involved to work on it. I still have not tried HDNes. I will give a short feedback after some testing soon.
Title: Re: Other: Castlevania 30th anniversary
Post by: xttx on May 20, 2017, 10:47:25 am
This is amazing work Kya!  :cookie: ;)

I reached out to you through a personal message. I tried compiling this myself and it will not compile for me. I sent you the 5 errors. Is there any way i can get any insight on how to maybe fix it?

Either way, thanks for sharing this with us!
Title: Re: Other: Castlevania 30th anniversary
Post by: nesrocks on May 21, 2017, 08:33:18 pm
HDNes is an absolute nightmare to work with. My biggest request, if you're still taking any, is for the nestopia build to somehow read higher resolution files, even if it is locked to 2x or 4x for example. Maybe that makes it complicated to have the "source" and "target" CHR on the same png.
Title: Re: Other: Castlevania 30th anniversary
Post by: kya on May 22, 2017, 06:48:28 am
To SourMesen:
Taking the opportunity I would like to say, I am fascinated with your emulator. You've done an impressive amount of work in an impressive amount of time! I would really love to see the tools for tileset generation in Mesen, and not without a reason. I have a set of 2x upscaled tiles for Castlevania from chinese complete edition mobile version. Personally I don't like the way the enemies were redrawn, but tastes differ, and it will be a pity if the tiles will remain unused.
I'd like to make a few requests, though.
1. Could you dump the tiles upscaled with some filter?
2. Could you implement a tile substitution mechanism somehow? The reason is that Castlevania often uses the same tiles for absolutely different objects (for example, the statue and the wall in stage 1; the moon and the Clock Tower in the final stage). In my hack I was checking if a certain tile gets displayed to trigger the substitution.

To bogaabogaa:
I'm very sorry for all the frustration I caused! I was too naive, thinking my approach will work for Castlevania 3. FCEUX indeed does not show the sprites for it, just duplicating the tiles. Let us all ask SourMesen to make our lives easier, and provide us with the proper tools for the job.

To nesrocks:
I'm unable to do scaling with my hack due to its limited nature. It works directly on PPU level, detecting original patterns in the screen buffer and replacing them in the same buffer. Upscaling filters kick in later on the preformed buffer. I won't be able to discern sprites from a background at that time. So, I'll repeat. Let us all ask SourMesen to make our lives easier, and provide us with the proper tools for the job. :)
Title: Re: Other: Castlevania 30th anniversary
Post by: AxlRocks on May 22, 2017, 01:29:08 pm
Been lurking this thread since release, a few things:

It looks really good, kya! I also like that assets from rare mobile ports (that I didn't even know existed) are being used and can be appreciated better than on some weird mobile port. I hope someone sees this and dumps the other ports. Mobile stuff is so poorly preserved. (On the top of my wishlist is the two Rockman.exe Docomo games.)

---

Dumping capability in Mesen would be awesome, Sour. Echoing what nesrocks said, I've tried HDNES but not had... any luck at all with it.

I think the low community interest, for tile replacement of any 2D system and not just NES, is due to having to use specific, somewhat obscure emulators that are usually not up to par with other emulators in terms of actual emulation accuracy and options. (No offense meant to any dev that might apply to though! Their work is still incredible.)

I'd love to see kya's work here converted for use in Mesen. One of the first things I'd like to try myself is backporting some of Megaman The Wily Wars graphics to MM1-3 and 16-bit-ifying 4-6.
Title: Re: Other: Castlevania 30th anniversary
Post by: nesrocks on May 22, 2017, 02:05:38 pm
I had no idea about the mesen emulator and I'm sorry to hear there wasn't much interest on it. I'll be testing it asap!
Title: Re: Other: Castlevania 30th anniversary
Post by: bogaabogaa on May 22, 2017, 03:06:41 pm
Hey macbee I did test your HDNES a little bit and I have to say you really had some neat ideas! Thanks for all the work you put into. The emulator feels unfinished and the community around it is dead  :'( (could not even find any  HDnes pack!) I was just toying with it to see how it works.

When people say horrible it is mostly a bad definition about what could be improved.
I am very new in this community and I have trouble finding the right guides ones in a while. Sometimes I do thing the most tedious way and I know there are different ways but could not make them work. Thats why I get grumpy very quick sometimes. But this not related to this Nestopia or HDNES. This is related to Romhacking.

About Tools:
When I do work on a tile-set I use Gimp. Use a 8x8 grid and make it snapping. Gimp does not allow a fast workflow with the tools I know. And when I work on a Tile-set I was always wishing for better tools.

Is there a  tool that enhances grid as a tile-layer-editor? May be with futures like: right click copy tile and left click past tile. Indexing tiles!! You could dump your tile-set you wish to edit save the tile-map. Then rearrange it edit/paint it to your likening and when loading the original tile-map it would be ready to be dumped back.

Guess how many hour I spend already arranging tiles.. and I am not the best puzzler..

Title: Re: Other: Castlevania 30th anniversary
Post by: nesrocks on May 22, 2017, 03:13:22 pm
HDNes wasn't made by macbee, it was done by mkwong98.
For me HDNes is difficult to work with because it is slow, it sometimes crashes, the interface doesn't feel organized, etc...

For working with tiles I recommend pyxel edit (http://-http://pyxeledit.com/). It is cheap, but it isn't free.
Title: Re: Other: Castlevania 30th anniversary
Post by: bogaabogaa on May 22, 2017, 03:29:50 pm
MacBee said "I could never make it work properly" misinterpret that.. haha
I had crashes too. The sound emulation is bad and as I said it feels unfinished. It is on Git-hub but a one man project by mkwong98 and abandon since 2 years.

Thanks for the info   
Title: Re: Other: Castlevania 30th anniversary
Post by: SourMesen on May 22, 2017, 03:53:54 pm
I spent some time working on dumping tiles over the weekend, but haven't really figured out the best way to do this yet.
Would it just make the most sense to keep the ordering identical to the original game's CHR tables and just generate a different picture for each palette?
That's what I'm doing at the moment (after having tried some other more complex solutions that didn't really work out too well).
e.g you play through a game normally, and Mesen will just record and save every combination of tile+palette used, with each different palette is saved in a separate file (Unused CHR tiles for a given palette combination are left blank)

Here's an example of what that gives playing CV3 & DD each for a few minutes: link (https://www.mesen.ca/tiletest.zip)
The PNG files could of course be rendered at any given scale, this is 1x.
I know nothing about graphic editing - would PNGs like these be usable? Would it be too hard to figure out what a tile is used for? Would you need to reorder the tiles in the PNGs to be able to work with them efficiently? Changing the PNG's layout means you'd have to change the tileset definition file as well (which would be pretty hard to do manually without some sort of tool)

For CHR RAM games, another approach to dumping the tiles would be needed since the tiles do not have a predetermined order.

To SourMesen:
Taking the opportunity I would like to say, I am fascinated with your emulator. You've done an impressive amount of work in an impressive amount of time! I would really love to see the tools for tileset generation in Mesen, and not without a reason. I have a set of 2x upscaled tiles for Castlevania from chinese complete edition mobile version. Personally I don't like the way the enemies were redrawn, but tastes differ, and it will be a pity if the tiles will remain unused.
I'd like to make a few requests, though.
1. Could you dump the tiles upscaled with some filter?
2. Could you implement a tile substitution mechanism somehow? The reason is that Castlevania often uses the same tiles for absolutely different objects (for example, the statue and the wall in stage 1; the moon and the Clock Tower in the final stage). In my hack I was checking if a certain tile gets displayed to trigger the substitution.
Thanks!
1) For filters, do you mean things like xBRZ and the like?  It'd be possible, but I'm unsure how well those would work at a tile-by-tile level, since the tiles around a given tile normally affect the borders of the tile when applying the filter to the entire screen at once.
2) Do you mean Castlevania reuses the exact same tile with the exact same palette colors, but in a different object?  If so, it'd be possible to have some way to specify conditions (e.g based on surrounding tiles) - but there is currently no way to do anything like this (afaik) with HDNes' format.  Maybe it would be better to create another format or alter the current one.

Dumping capability in Mesen would be awesome, Sour. Echoing what nesrocks said, I've tried HDNES but not had... any luck at all with it.
I'd love to see kya's work here converted for use in Mesen. One of the first things I'd like to try myself is backporting some of Megaman The Wily Wars graphics to MM1-3 and 16-bit-ifying 4-6.
Yea, I took another look at HDNes a couple of days ago, and I'm not sure I really understand what most of the buttons are supposed to do in the tileset editor
Converting this tileset to Mesen would be nice (still need to add CHR RAM support for that to be possible), but it'd probably involve redoing a lot of image editing work.
And HD Megamans sounds pretty nice.
Title: Re: Other: Castlevania 30th anniversary
Post by: bogaabogaa on May 22, 2017, 08:05:49 pm
Hey SourMesen here a badly made test sprite of your test CV3 test48.png. I could not get it to work http://imgur.com/LPcdIAz

Sure you could use this generated PNG files. But they are not optimal to work with. To answer your question. If you played the game a bit you may recognize the tiles most likely.
The arrangement is still tedious to work with. You can get around that if you know how to use tile editors properly  :happy: But most just don't

Some ideas and thought I had

If you would work with romhacking tools you get much better dump results. If you open the rom with tools like tilemolester or tilelayer pro you can view graphics very nicely (with a 16 tile wide screen). For sprites you like to have it 2-4 tiles wide and interleaved in case of CV3. (depends on arrangement) Here some examples: https://tinyurl.com/lnjmyjm

I wonder if it would be easier to dump the tiles as they are in the rom into a PNG. May be you could generate a table file with the right addressing to the PNG-tiles. When the addressing would look the same as in the rom.. Most-likely it won't work like that anyway.. but I post the idea. May be there is a way to do it like that. Not sure how good the idea is though

- You would be sure that you got everything and there would be no playing and dumping needed.
- Your HD file would be more compact

 
Title: Re: Other: Castlevania 30th anniversary
Post by: SourMesen on May 22, 2017, 08:22:49 pm
If you would work with romhacking tools you get much better dump results. If you open the rom with tools like tilemolester or tilelayer pro you can view graphics very nicely (with a 16 tile wide screen). For sprites you like to have it 2-4 tiles wide and interleaved in case of CV3. (depends on arrangement) Here some examples: https://tinyurl.com/lnjmyjm
These tools essentially display the same thing as far as I can tell - it's just a matter of the number of columns used.  I guess an option to split sprite/background into 2 separate PNGs and an option to select the number of columns to use would be good? That way you could technically try a few different combinations and see what makes the most sense for a given game.

Quote from: bogaabogaa
I wonder if it would be easier to dump the tiles as they are in the rom into a PNG. May be you could generate a table file with the right addressing to the PNG-tiles. When the addressing would look the same as in the rom.
This isn't possible on the NES - the palette for the tiles is not stored in the tiles themselves, it's up to the game's code to set the right palette to be used for each tile.  So there is no way to know which palettes would be used for which tiles without playing through the game.

Quote from: bogaabogaa
Your HD file would be more compact
No matter the solution used, it should be easy to have a "minify" tool that would rebuild the PNG files to remove all unused blank spaces, to reduce the HD pack's total size before distribution.
Title: Re: Other: Castlevania 30th anniversary
Post by: nesrocks on May 22, 2017, 08:30:16 pm
This isn't possible on the NES - the palette for the tiles is not stored in the tiles themselves, it's up to the game's code to set the right palette to be used for each tile.  So there is no way to know which palettes would be used for which tiles without playing through the game.
The other way around could be done then. Use a 4 color PNG that is compatible with how the nes handles colors, but this would be only for HD graphics, not for extra colors...
Title: Re: Other: Castlevania 30th anniversary
Post by: bogaabogaa on May 23, 2017, 02:35:38 am
My ideas that I trow in would be a totally different attempt to do this. Lot's of extra work. Mesen is right you get basically something worse since you don't have palettes. I think it is not worth to have the sprites displaying in tow columns format. It may not display right most of the time anyway and it could get in the way when you have sprites of a remake that would fit over otherwise!
Title: Re: Other: Castlevania 30th anniversary
Post by: kya on May 23, 2017, 03:17:16 am
Quote
1) For filters, do you mean things like xBRZ and the like?  It'd be possible, but I'm unsure how well those would work at a tile-by-tile level, since the tiles around a given tile normally affect the
borders of the tile when applying the filter to the entire screen at once.

Let the tiles have stitches, no problem. They will be just templates to edit.

Quote
2) Do you mean Castlevania reuses the exact same tile with the exact same palette colors, but in a different object?

Exactly.

Quote
If so, it'd be possible to have some way to specify conditions (e.g based on surrounding tiles)

That would be great! Nametable replacements on the fly. If a certain character sequence is detected in a nametable, replace it with another one.
Or even a wilder dream - if a certain rectangle of characters is detected, replace it with another one.

And another condition for sprites - if a certain trigger sprite is already rendered (visible to the top and to the left of the current), replace current sprite with another one.

Quote
- but there is currently no way to do anything like this (afaik) with HDNes' format.  Maybe it would be better to create another format or alter the current one.

The most convinient for me would be a plain text file where original and replacement rectangles are separated by empty lines.
For example, to replace a 2x2 circle made from a tile 255 with a rectangle I do this:
00FFFF00
FF0000FF
FF0000FF
00FFFF00

FFFFFFFF
FF0000FF
FF0000FF
FFFFFFFF

Quote
I spent some time working on dumping tiles over the weekend, but haven't really figured out the best way to do this yet.
Would it just make the most sense to keep the ordering identical to the original game's CHR tables and just generate a different picture for each palette?

Now someone wake me up! I'm dreaming about how I would like to see the dumping tool made (the major expansion of what I did to that FCEUX).

I play the game with a PPU Viewer window active. The emulator displays both PPU banks (three banks in case of MMC5 8x16 sprites) scaled up using the current scaler. Every tile gets displayed in a palette last used for its rendering (that's what my modified FCEUX does). I may override this setting and use a fixed palette for a bank. I may specify 8x8 or 8x16 layout for each bank. There is a dump button in a PPU Viewer window. Every time I press it, a dump of all the banks is made using the current settings for each bank (8x8 or 8x16, dynamic or fixed palette) and the scaler.

This leaves the question - how to do the replacement for CHR-RAM games. I don't know how it was done (or supposed to be done) in HDNES. In my hack I'm simply checking the contents of the original tile (the address in a PPU, the character and the attrubute bits). Maybe it is better (albeit somewhat slower), to check the actual NES colors of an original tile. This way it will be possible to support fade in/fade out and color emphasizing effects.


Title: Re: Other: Castlevania 30th anniversary
Post by: SourMesen on May 23, 2017, 07:55:38 pm
Use a 4 color PNG that is compatible with how the nes handles colors, but this would be only for HD graphics, not for extra colors...
4-color graphics at 4x scale will still look pretty bad in most cases, imo (especially since 1 of the 4 colors is the background color and shared across the entire screen) - there's only so much you can do with more pixels when you're so limited by the colors you can use.

Or even a wilder dream - if a certain rectangle of characters is detected, replace it with another one.
Allowing for user-defined shapes like that would be pretty complex, and slow.  Just being able to add a condition based on adjacent tile(s) (up/down/left/right) should be good enough for most cases, shouldn't it?
In the first place, reusing the same tile with the exact same palette in 2 different objects is probably not something that is excessively frequent, I'd imagine..

I play the game with a PPU Viewer window active. The emulator displays both PPU banks (three banks in case of MMC5 8x16 sprites) scaled up using the current scaler. Every tile gets displayed in a palette last used for its rendering (that's what my modified FCEUX does). I may override this setting and use a fixed palette for a bank. I may specify 8x8 or 8x16 layout for each bank. There is a dump button in a PPU Viewer window. Every time I press it, a dump of all the banks is made using the current settings for each bank (8x8 or 8x16, dynamic or fixed palette) and the scaler.
Is there a benefit to doing all of this manually vs having it done automatically for you, though?  What I've been slowly implementing essentially does all of this for you, and while excluding all the unused tile+palette combinations. Doing it manually means you might miss some tiles, or end up wasting time creating tiles in HD using a palette that is not ever used in the actual game.  This is especially true for CHR ROM games.  For CHR RAM, how to present the tiles in the PNG files might be a bit more complex, though - so having a manual way to do this might make more sense (but I'd still prefer an automatic approach if I can think up one that works well for most CHR RAM games).

This leaves the question - how to do the replacement for CHR-RAM games. I don't know how it was done (or supposed to be done) in HDNES.
I'm fairly certain HDNes just compares the original tile's 16 bytes to the data stored in the HD pack definition file (it contains all 16 bytes in decimal format for CHR RAM games, I believe).  It just compares those 16 bytes on the fly and checks if a matching tile exists - essentially the same as checking the tile number in CHR ROM games, except instead of having a 4-byte key (the tile number), you end up with a 16-byte one (the tile itself)
Title: Re: Other: Castlevania 30th anniversary
Post by: mkwong98 on May 24, 2017, 12:39:18 pm
Good work! I'm happy to see someone interested in HD Packs.
Title: Re: Other: Castlevania 30th anniversary
Post by: kya on May 24, 2017, 03:39:42 pm
to SourMesen:

Quote
Just being able to add a condition based on adjacent tile(s) (up/down/left/right) should be good enough for most cases, shouldn't it?

Yes. Such a condition would allow me to do all the necessary tile replacements, except one: in stages 16 (a bridge guarded by bats) and 17 (clock tower) NES uses the same tile for bricks. Mobile phone version uses different tiles. I was able to reproduce the mobile version behavior in my patch, because my condition is "meet a trigger tile at least once, and all the tiles until the end of the frame will be taken from an alternate tileset". But it is perfectly acceptable to use the same set of bricks for both stages.

Quote
In the first place, reusing the same tile with the exact same palette in 2 different objects is probably not something that is excessively frequent, I'd imagine..

Even once is enough. Meet such a tile (for example a brick in the center of the moon), and the expirience will be flawed.

Quote
Is there a benefit to doing all of this manually vs having it done automatically for you, though?
...
For CHR RAM, how to present the tiles in the PNG files might be a bit more complex

That is why I ask to do a dump manually - I'd like to be able to choose the arrangement. 8x16 presentation is better for 8x16 sprites, and 8x8 - for bg tiles and 8x8 sprites.
And I'd prefer all the tiles from a PPU viewer window to go into one PNG. But that's just me. Others may have other preferences.

Quote
HDNes just compares the original tile's 16 bytes to the data stored in the HD pack definition file (it contains all 16 bytes in decimal format for CHR RAM games, I believe)
Does it check the palette? Can one tile with different palettes be replaced with different tiles?

to mkwong98:

Greetings! Glad to see a person, who pioneered the tile replacement in a NES emulator.
Title: Re: Other: Castlevania 30th anniversary
Post by: mkwong98 on May 25, 2017, 10:28:44 am
Does it check the palette? Can one tile with different palettes be replaced with different tiles?
Yes, it does. You can supply different tiles for different palettes and select one of them as the default.
Title: Re: Other: Castlevania 30th anniversary
Post by: bogaabogaa on May 25, 2017, 06:34:03 pm
I am happy to try a new mesen emulator when it is out. The last thing I tried was to put the dumped PNG folder into my mesen ../HdPacks directory. I know it is build for HDNes :D
And I don't know much about HDnes Packs in general. It would be awesome to see this up-scaled CV3 sprites in action that i got. Let me know when there is stuff to beta-test. I am a fan of the automated dumping. It saves time and may be errors of missing stuff.
Title: Re: Other: Castlevania 30th anniversary
Post by: SourMesen on May 25, 2017, 11:01:43 pm
That is why I ask to do a dump manually - I'd like to be able to choose the arrangement. 8x16 presentation is better for 8x16 sprites, and 8x8 - for bg tiles and 8x8 sprites.
And I'd prefer all the tiles from a PPU viewer window to go into one PNG. But that's just me. Others may have other preferences.
I'm still working on this, but at the moment I have something that's starting to look pretty decent.
It keeps the tiles together as they are in the CHR banks (so groups of 256 tiles in a 16x16 grid), only shows tiles that are actually used for a given palette, and it works for CHR ROM & RAM.
Since the tiles are used with multiple palettes, it repeats the same bank into multiple PNG files, in order of usage frequency (first PNG contains the most frequently used tiles, in their most frequently seen palette).
It can also dump the tiles in either the 8x8 or 8x16 display modes.
All of this still has no UI, though - will need to create one to be select some options (e.g which scale to use, whether to use 8x8 or 8x16 for a given set of 256 tiles), etc.

I am happy to try a new mesen emulator when it is out. The last thing I tried was to put the dumped PNG folder into my mesen ../HdPacks directory. I know it is build for HDNes :D
And I don't know much about HDnes Packs in general. It would be awesome to see this up-scaled CV3 sprites in action that i got. Let me know when there is stuff to beta-test. I am a fan of the automated dumping. It saves time and may be errors of missing stuff.
The HD packs need a "hires.txt" file to define which tile in the PNG replaces, so it won't work by just putting the PNG file there - creating the hires.txt files by hand is pretty complex, though.

I'll probably have something decent finished at some point within the next few weeks.
Title: Re: Other: Castlevania 30th anniversary
Post by: kya on May 26, 2017, 03:23:26 am
Quote
It keeps the tiles together as they are in the CHR banks (so groups of 256 tiles in a 16x16 grid), only shows tiles that are actually used for a given palette, and it works for CHR ROM & RAM.
Since the tiles are used with multiple palettes, it repeats the same bank into multiple PNG files, in order of usage frequency (first PNG contains the most frequently used tiles, in their most frequently seen palette). It can also dump the tiles in either the 8x8 or 8x16 display modes.

Perfect! Waiting for it.

Btw, I remembered another place in Castlevania, where the same tiles with the same palette are used for different objects. Cavern walls in stage 10 and mountains in stage 11. So, a global trigger-like condition I described earlier would still be welcome.
Title: Re: Other: Castlevania 30th anniversary
Post by: SourMesen on May 28, 2017, 08:15:06 pm
I've fixed some issues with 8x16 sprites in HD packs and implemented support for CHR RAM games.

To test a bit, I captured the start of CV1 and then manually edited the PNG files that were generated with the tiles found in your CV1 mod.
It didn't take too much time (the layout that gets generated automatically was almost identical to the layout used in your tileset)

And it works:
screenshot 1 (https://www.mesen.ca/CV1-1.png)
screenshot 2 (https://www.mesen.ca/CV1-2.png)

For CHR RAM games, the tile matching is done by checking all 16 bytes of the tile + its palette.  Still haven't implemented any conditions, etc.
There's still a good bit of work to get done, but it's slowly getting there.
Title: Re: Other: Castlevania 30th anniversary
Post by: Satoshi_Matrix on May 28, 2017, 09:08:04 pm
This is really cool, but I really hope someone can adapt this to work with an actual NES so it can be played on the real hardware on an oldschool CRT.

Obviously the NES isn't capable of the degree of shading going on with this skin hack, but the general colors for background tiles and sprites could be used to improve the look considerably.

By the end of the NES's lifespan, incredible looking games such as Shatterhand showed that moody, 16-bit like backgrounds were indeed possible on the NES through use of color matching and selective dithering. Even flatshading with the right colors would go a long way. The original Castlevania is very orange, making it rather cartoony. Change that and I think the whole game would look better.

I hope someone makes an actual NES version, not just a PC emulator only one.
Title: Re: Other: Castlevania 30th anniversary
Post by: bogaabogaa on May 29, 2017, 09:22:09 pm
How should this work on a NES? Do you mean having a special card like Everdrive with the right chips and programs on it to do the swapping somehow?
May be retro-pie will run mesen one day for this. Everything else sounds like insane amount of work.
I will be happy when I see graphic-packs been made. To make a graphic-pack you need to dedicate lots and lots of time and love to get something good and we all know there are not to many people out there doing this kind of work.
Title: Re: Other: Castlevania 30th anniversary
Post by: Maxbeta on June 02, 2017, 11:38:17 am
Does anybody know if there is a raw build of this Nestopia emulator that you could compile for example as a retroarch core?

In any case, are there any other NES emulators that allow for this kind of color patching?

This is way too awesome!
Title: Re: Other: Castlevania 30th anniversary
Post by: kya on June 04, 2017, 10:36:08 am
Quote
Does anybody know if there is a raw build of this Nestopia emulator that you could compile for example as a retroarch core?

You may try to build this one for your favorite platform. The sources are included in src.zip in the root folder of the archive (and there is a libretro folder there). I personally was able to build this version for Ubuntu, a good friend of mine built it for Mac, and xttx fellow on this forum has succesfully built it for Xbox. As you can see, it's quite portable.

Quote
In any case, are there any other NES emulators that allow for this kind of color patching?

HDNES supports tile packs, albeit in a format that differs from the one used in this hack, and only for CHR ROM games (Castlevania is CHR RAM).
Mesen is another one. The author of Mesen is now working to add a support for CHR RAM games in his emulator, and to provide us with tile dumping tools.
Title: Re: Other: Castlevania 30th anniversary
Post by: Maxbeta on June 07, 2017, 03:17:30 am
....

Hello kya and thank you for your input and helping me locate the source.

I wouldn't know the first thing about compiling programs and would really like to get this working on my Wii U now that the retroarch version keeps getting better and better. I really look forward to even creating some graphic packs for Ninja Gaiden I, II and III so we can have a properly enhanced trilogy.

Question: Is there a limit to how many new colors you could use on a game with this build?

I want to post the source over at the Retroarch forums to see if someone could compile a core, mainly for the Wii U so I can get the ball rolling, but I would definitely like to credit the main author of this build. Would that be you?

Thank you once again.
Title: Re: Other: Castlevania 30th anniversary
Post by: kya on June 08, 2017, 02:02:27 am
Quote
I really look forward to even creating some graphic packs for Ninja Gaiden I, II and III so we can have a properly enhanced trilogy.

You mean taking out the tiles from the SNES trilogy and putting them into NES games?
Unfortunately it is not possible right now. The problem is not with the hacked Nestopia, but with the tile dumping tool.
To construct a skin.png you need not only the replacement tiles, but also the original NES tiles dumped in a special format.
I modified slightly the FCEUX emulator, and used it for dumping. It worked well for Castlevania, but I've just checked - it does not work for Ninja Gaiden.

So we all have to wait while Sour (the author of Mesen emulator) will make a proper tile dumping tool.

Quote
Question: Is there a limit to how many new colors you could use on a game with this build?

32768 colors (5 bits red, green and blue) in any arrangement for any tile.

Quote
I want to post the source over at the Retroarch forums to see if someone could compile a core, mainly for the Wii U so I can get the ball rolling, but I would definitely like to credit the main author of this build. Would that be you?

The correct credit would be "Nestopia was written by Martin Freij, and ported to Linux by R. Belmont.
The new cross-platform port is maintained by Ryan Danbrook."
My job was adding the tile replacement code to that port and constructing the skin.png for Castlevania.
The tiles were taken from Castlevania mobile (2003 and 2004 versions), Castlevania Bloodlines (title screen), Vampire Killer for MSX.
The rest of the tiles I've recolored/redrawn manually.
Title: Re: Other: Castlevania 30th anniversary
Post by: mkwong98 on June 10, 2017, 10:16:32 am
I remember seeing a fan art of Ninja Gaiden in the NesDev forum:
(http://th00.deviantart.net/fs70/PRE/f/2010/215/b/1/Ninja_Gaiden_NES_HD_Widescreen_by_Billysan291.jpg)
Title: Re: Other: Castlevania 30th anniversary
Post by: Maxbeta on June 12, 2017, 01:25:00 pm
....
I never liked the trilogy for SNES even if SNES is my all-time favorite console. I think Tecmo did a very rushed job and didn't take full advantage of the huge SNES color palette. IMHO other Ninja Gaiden ports like the Master System and Turbo Gfx-16 displayed much better color palettes than the SNES trilogy. So if anything I would be borrowing from those two ports and manually drawing in a few sprites. Its a bummer that the tiles don't currently display on your modified FCEUX, but again I'll wait for Mesen. Thanks for the tip and all the hard work you've put into this. I've been wanting to fiddle around with something like this for years! Another game I would love to tackle is NES Double Dragon.

I remember seeing a fan art of Ninja Gaiden in the NesDev forum:
(http://th00.deviantart.net/fs70/PRE/f/2010/215/b/1/Ninja_Gaiden_NES_HD_Widescreen_by_Billysan291.jpg)
Now that is just SICK!
Title: Re: Other: Castlevania 30th anniversary
Post by: FeRcHuLeS on June 19, 2017, 02:57:40 pm
Woow this is a great mod!!! btw how do you edit the tiles I mean the program recommended to do this I was trying with Paint Shop Pro 7 and don't know how to save it, the silhouette of the old tiles are mixed with the new ones.
Title: Re: Other: Castlevania 30th anniversary
Post by: kya on June 21, 2017, 03:55:58 am
Quote
how do you edit the tiles I mean the program recommended to do this I was trying with Paint Shop Pro 7 and don't know how to save it, the silhouette of the old tiles are mixed with the new ones

Basically, any program which could edit a 24-bit PNG should do. I know that both GIMP and Photoshop work. I've downloaded Paint Shop Pro 7.04, tried some basic editing with it, and found it working too.
Could you be more specific - what exactly you do that goes wrong? I suspect some problems with partial transparency (excuse me, if I write obvious things here). 24-bit PNGs can have semitransparent pixels, but the hack requires the pixels to be either totally transparent or totally opaque.
Title: Re: Other: Castlevania 30th anniversary
Post by: FeRcHuLeS on June 21, 2017, 11:20:51 am
This is what is happening look at the zombie I edited from Simon's Quest https://drive.google.com/open?id=0BzLzYSdAsr2hVXdvcElIMUk5aTA .I'm not familiar with image editing so if you are using PSP 7.04 how do I must save? and how about copy-paste tiles from a bmp (256 colors) to png (24bit) how do I must save?? I've got a message of something about "just an alpha channel will be saved".
Title: Re: Other: Castlevania 30th anniversary
Post by: kya on June 22, 2017, 08:02:30 am
Quote
This is what is happening look at the zombie I edited from Simon's Quest

Seems it's exactly what I thought. You have almost transparent pixels in your skin.png, but the hack renders them opaque.
You should make them totally transparent. Use Eraser tool, set its size to 1, hardness to 100 and delete those almost transparent pixels left from the old sprite.

Quote
I've got a message of something about "just an alpha channel will be saved"

Looks like you have multiple alpha channels in your edited skin (e.g. R, G, and B each have their own transparency). PNG24 does not support that. The editor warns you that it will merge these three channels into one. This is ok. As I told you above, the hack does not need this information. It does not support even one alpha channel, just a binary value - the pixel is either totally opaque, or totally transparent.
After you erase all unnecessary pixels, use Dropper tool to make sure they have zero opacity. The pixels should have
R: --
G: --
B: --
O: 0
shown in the right pane
Title: Re: Other: Castlevania 30th anniversary
Post by: ferk on June 22, 2017, 11:53:49 am
Also (and correct me if Im wrong) I think the sprite needs to have exactly the same shape/silhouette for this hack to display it as intended, doesnt it?

Probably it makes more sense to wait for nicer HDNES support in Mese.
Though that doesnt take any merit away from this rom hack, it's an amazing work.

And its great you have spotted things that can be improved in the HDNES format, it would be awesome if there existed a standard and an easy way to edit the spritemap for artists.
Title: Re: Other: Castlevania 30th anniversary
Post by: FeRcHuLeS on June 22, 2017, 05:04:13 pm
Seems it's exactly what I thought. You have almost transparent pixels in your skin.png, but the hack renders them opaque.
You should make them totally transparent. Use Eraser tool, set its size to 1, hardness to 100 and delete those almost transparent pixels left from the old sprite.

Looks like you have multiple alpha channels in your edited skin (e.g. R, G, and B each have their own transparency). PNG24 does not support that. The editor warns you that it will merge these three channels into one. This is ok. As I told you above, the hack does not need this information. It does not support even one alpha channel, just a binary value - the pixel is either totally opaque, or totally transparent.
After you erase all unnecessary pixels, use Dropper tool to make sure they have zero opacity. The pixels should have
R: --
G: --
B: --
O: 0
shown in the right pane

I've tried everything you recommended a nothing worked for me, there is maybe something in the configuration I touched that it's making this to happen on the other hand I'm going to give a try to GIMP asap and tell you of the results.
Title: Re: Other: Castlevania 30th anniversary
Post by: kya on June 23, 2017, 02:15:57 am
Quote
Also (and correct me if Im wrong) I think the sprite needs to have exactly the same shape/silhouette for this hack to display it as intended, doesnt it?

The exact rule is that if an original sprite has at least one non-transparent pixel in some horizontal row (of 8 pixels), the replacement sprite should also have at least one non-transparent pixel in that row (any pixel of 8, not specifically in the original pixel position).
Basically (but not exactly!) this means both sprites should have the same height, but not necessarilly the same silhouette.

If the above rule is broken, the hack displays the original sprite row (in original NES colors).

But from the screenshot posted by FeRcHuLeS we may see, it's not the case. Because the original sprite silhouette is white, not black/magenta.
That is why I beleive he has got not completely transparent pixels there, and the hack renders them opaque.

Quote
Probably it makes more sense to wait for nicer HDNES support in Mesen.

That's what I keep telling everyone in this thread, since I learned Sour is improving the support for tile packs in his emulator.
He has full control of his emulator and can do much more than this simple hack could.

To FeRcHuLeS: if you still wish to experiment with this hack, you can PM me your current skin.png, I'll look into it to see what's wrong.
Title: Re: Other: Castlevania 30th anniversary
Post by: mkwong98 on June 23, 2017, 11:35:11 am
From my experience there are some features which will help greatly when working on graphics pack besides dumping tile+palette data:
1. Batch add tile+palette data. In SMB, I played the game and got all the tile+palette data for basic small and big Mario. Without the ability to add my own data, I have to play the game again as fire Mario, basic Luigi, fire Luigi and star Mario etc in order to have them included in the dump.
2. Specify color palette to be used with the pack. If you try my Kung Fu pack with Mesen, then you will see the tiles in the title screen do not matches. This is because there are tile which I did not replace with a HD version and the default color palette of HDNes is different from the default one of Mesen. So a feature added to version 2 of HDNes format is to include a palette file to the pack. This will make the pack looks consistent across emulators.
3. Another feature added to version 2 is the ability to specify the brightness of the HD replacement to be used. Many games have fade in and fade out effects when the scene changes. Repeating the HD replacement for each brightness value will greatly increase the pack size and time cost to produce it. If we can reuse the same HD replacement but specify a different brightness value, it will remove such repetition.
Title: Re: Other: Castlevania 30th anniversary
Post by: SourMesen on June 28, 2017, 03:07:14 pm
I've been working on this some more.

So far I've finished adding support for everything that HDNes currently supports (I believe):
-CHR RAM games
-Large sprites
-Custom palettes (palette.dat file)
-Brightness parameter on tiles

On top of this, I've added my own extensions to the format (and gave it version number 100 to avoid any potential numbering conflicts with HDNes). It keeps the same overall format, but adds some things:

1) Conditions: You can use conditions to conditionally replace tiles with different HD tiles based on surrounding tiles, or the presence of a specific tile at a specific point on the screen, etc.

2) Backgrounds: You can define a background image that will be used instead of the NES' background color. This makes it possible, for example, to give a background to the fight sequences in Final Fantasy games, instead of a black background:
(http://forums.nesdev.com/download/file.php?id=9180)

3) IPS/BPS patches: It's now possible to ship IPS/BPS patches along with the HD pack itself so that you can, for example, create a HD pack for an existing romhack (or create a romhack specifically for the HD pack)

4) A flag to disable the sprite limit

Examples:
Code: [Select]
#Defining a condition that checks if we're on the battle screen, in the crystal tower, in FF3:
<condition>towerBattle,tileAtPosition,0,8,D250B460A8C2952270F4D0EA62508665,0F302112

#Using that condition to setup a background image (e.g what was shown in the screenshot above):
[towerBattle]<background>TowerBattleBackground.png,1

#Defining an IPS patch to use with the HD pack:
<patch>ff.ips,c4443fc24625e3c2bb859525eb44b6b3a80e7c35

#Disabling the sprite limit:
<options>disableSpriteLimit

I think that's about it for additions to the HD pack format.

On top of this, I also added a tile dumping tool to Mesen that dumps a game's graphics as you play through the game. The PNG files created display the tiles in the same order that they were placed in CHR ROM/RAM, which usually makes sense.  There are a few options to try and get the best results possible based on the game (it's by no means perfect, but it's a decent starting point to making an HD pack)
Technically speaking, after playing through the entire game with the dumping tool turned on, the "only" thing left to do is to redraw the PNG files with better graphics (which is probably the most time consuming part of the process).
The tool allows you to select what scale/filter you want to dump the tiles with - so you can dump the tiles as they appear with the xBRZ filter, for example, and use that as a starting point to redraw them properly in HD.
(https://www.mesen.ca/images/HdPackBuilder.png)
The tool doesn't actually let you manually modify the contents of a HD pack, though - this still needs to be done manually by editing the text file (at least for now)

There's still a little bit of work to get done (and most likely bugs to fix), but I'm slowly getting there.
Title: Re: Other: Castlevania 30th anniversary
Post by: mkwong98 on July 06, 2017, 12:03:10 pm
Excellent news! Can't wait to test it out. :thumbsup:
Title: Re: Other: Castlevania 30th anniversary
Post by: bogaabogaa on July 08, 2017, 05:36:21 pm
Me too can't wait to do some work.
Title: Re: Other: Castlevania 30th anniversary
Post by: AxlRocks on July 09, 2017, 12:10:54 am
That looks and sounds great! Do conditions have an option (or can such a thing be added) for reading from user specified RAM addresses to change tiles, rather than just checking certain tiles on-screen?

I can only assume background replacement works (well) only with static screens and can't support scrolling in anyway, right? Still really useful regardless.

Can't wait to use this with some Megaman stuff I've been working on.
Title: Re: Other: Castlevania 30th anniversary
Post by: SourMesen on July 15, 2017, 08:18:37 am
Do conditions have an option (or can such a thing be added) for reading from user specified RAM addresses to change tiles, rather than just checking certain tiles on-screen?
At the moment, no - this is because the thread that handles the HD conversion runs independently of the emulation. So you might get a 1-2 frame delay between the value in RAM vs what it actually was when the pixel was originally output. Having access to the value at the exact same time as the pixel is output would be pretty hard (esp. when considering performance). If a 1-2 frame delay seems acceptable, though, that would be easy to add.

I can only assume background replacement works (well) only with static screens and can't support scrolling in anyway, right?
Yea, pretty much. It would technically be possible to implement soft scrolling via a ton of conditions, but as is, that would require a lot of effort and a ton of PNG background files.

If anyone wants to play around with the new feature, there's a build with it here: https://www.mesen.ca/MesenHdPackTest.zip (https://www.mesen.ca/MesenHdPackTest.zip)
But keep in mind some bugs may still exist, and I still might have to change the HD pack file format based on needs/feedback, so don't spent 10 hours making a HD pack based on this :)
I'd be nice to have some feedback about it, though!

Edit: Until it's properly documented, the best way to know the file format is probably to take a look at the code: https://github.com/SourMesen/Mesen/blob/master/Core/HdPackLoader.cpp (https://github.com/SourMesen/Mesen/blob/master/Core/HdPackLoader.cpp)
Title: Re: Other: Castlevania 30th anniversary
Post by: mkwong98 on July 21, 2017, 11:41:57 am
Can it dump tile data yet? I can't find the option for doing that.
SourMesen, thank you for the reply. It only appears when the game is running.



July 22, 2017, 06:51:02 am - (Auto Merged - Double Posts are not allowed before 7 days.)
I found 2 graphics glitch. I attached two screen shots, one from Mesen and one from HDNes for reference:
1. The "Help!" speech bubble in the screen shot. Not sure what's happening
2. When 2 sprites over lap, the sprites priority uses the original tile pixels instead of the HD pixels as shown in the bottom left of the screen shot.
(http://i.imgur.com/35XOChw.png)
(http://i.imgur.com/s3sb7q6.png)
Title: Re: Other: Castlevania 30th anniversary
Post by: SourMesen on July 23, 2017, 08:25:36 pm
I found 2 graphics glitch. I attached two screen shots, one from Mesen and one from HDNes for reference:
1. The "Help!" speech bubble in the screen shot. Not sure what's happening
2. When 2 sprites over lap, the sprites priority uses the original tile pixels instead of the HD pixels as shown in the bottom left of the screen shot.
Thanks for letting me know about this!
Both issues were actually the same thing. Mesen only took into account the sprite that was actually draw by the PPU when considering which HD sprite to draw (so there were issues when sprites overlapped). I fixed the problem, but I'm not quite done testing+optimizing yet - I'll most likely post a new test build within the next few days.

Edit: I updated the test build (which should fix these bugs + the bug reported by bogaabogaa below, too): https://www.mesen.ca/MesenHdPackTest.zip

Edit 2: Updated download link again with another build that fixes a couple more issues found by bogaabogaa
Title: Re: Other: Castlevania 30th anniversary
Post by: bogaabogaa on July 24, 2017, 02:23:26 am
The HD Pack builder is great. I like all the options. It is easy to understand and you can get to work quickly like that. The sad thing is I never got it to work after I made changes. I placed the modified PNG files in the same folder where it got recorded. As far I understand you don't need to move things at all. I did check the options over and over again. In the Video tab HDpacks are enabled. I tryied CV 1, cv3 and super mario bros. (tried so many things) I have no idea what to do next guess I would remove all the emulator files and try again? Since I had older versions of the emulator. Hopefully will figure it out soon what I did wrong. Keep up the great work. I think it would be cool to include something in the log if a HDpack is found or if there is a error since I have no idea how to find out why it is not working for me.

I always tried to change the sprite.. for some reason this was the only thing that did not work. (http://i.imgur.com/5ggrtqh.png)
This tiles are saved with different pallets. I am sure I modefied the right one. But can't tell right now why it does not work..

Here a Video that explains my problems https://www.twitch.tv/videos/161586479 FIXED!!


If you plan on doing a HDPack in the future I recommend to participate in the testing. There been issus for me that got fixed in no time. Can't tell how happy I am about your work Mesen. I think you create something great here!
You can blow new life in your old favorite games or even make a costume pack for your favorite streamer.

CV3 is working for me now too! https://clips.twitch.tv/NurturingShakingCormorantSSSsss

Here if you have no idea how to test. It is very easy and quick. Just grab a game, record with a filter on and check if it worked correctly.
Example: https://clips.twitch.tv/DaintyInventiveDuckGingerPower


Here what I did test so far:

Full game:

Castlevania 3
Castlevania

First one or tow stage:

Bomberman
Bubble Bobble
Grimlings 2 Then new Batch
Advancer of lolo
Bucky O'Hare
Castlevania II - Simon's Quest
Contra
Exitebike
Gauntlet
Ghosts'n Goblins
Hitler no Fukkatsu - Top Secret
Jurassic Park
Kirby's Adventure.. (World tow and I got 1500 PNGs pallet swapping OP)
Legend of Zelda
Super Mario Bros 3
Super Mario Bros 2
Ninja guiden 2

(There is also a bug when streaming with mesen using OBS.. it only happen when resizing the window while OBS is running. Only restart both program fixes it for me)
Title: Re: Other: Castlevania 30th anniversary
Post by: SourMesen on August 06, 2017, 08:00:22 pm
I just released version 0.9.1 (link) (https://github.com/SourMesen/Mesen/releases/tag/0.9.1) which contains all the HD Pack features/fixes I mentioned in my previous posts in the thread (among other things), if anyone feels like trying it out. Hopefully this will make it a bit more simple to create HD Packs for the NES and get some more people interested in it.

If you find any issues with it, let me know.
Title: Re: Other: Castlevania 30th anniversary
Post by: bogaabogaa on August 11, 2017, 12:19:39 am
This is for people who want to test if they can apply HD packs correctly  :D

I made a CV3 HDPack with redrawn sprites made by Jorge D. Fuentes. Unfortunate he did not draw grant so don't check him out if you don't want the see a bad example.. https://www.dropbox.com/sh/szqdximfbdic9y4/AAANzmTl61waRLczoEQ1yZGra?dl=0

ShowCase: https://clips.twitch.tv/FlirtyHyperWormPanicBasket

(If anybody plays this could you record the missing sprite? I am working on a different pack right now. But I may fix and finish it if anybody would want this)


Is there a place where I can find HDPacks? Would be nice to be able to present and share work. I tried to find some HDPacks once but was not successful..

Title: Re: Other: Castlevania 30th anniversary
Post by: mkwong98 on August 15, 2017, 11:57:17 am
I put my Kung Fu pack here: http://www.emutalk.net/forums/137-Completed-Projects (http://www.emutalk.net/forums/137-Completed-Projects)
evgeny's Nuts & Milk: http://forums.nesdev.com/viewtopic.php?f=3&t=9935&hilit=nuts+milk&start=210#p138128
 (http://forums.nesdev.com/viewtopic.php?f=3&t=9935&hilit=nuts+milk&start=210#p138128)

BTW Sour, I found two problems with Mesen:
1. The previous glitch still exists between background layer and the back sprite layer. Try Double Dragon II, the "II" is made of sprites behind the Kanji characters.
(http://i.imgur.com/SH9jImo.png)


2. The pixels of the background tiles with colour 0 are not transparent pixels in the generated png file. This means if the above glitch is fixed and I do not modify the png file, then the back sprites will be blocked by the colour 0 pixels.
(http://i.imgur.com/rnDTdv2.png)
Title: Re: Other: Castlevania 30th anniversary
Post by: SourMesen on August 15, 2017, 04:37:36 pm
Thanks for letting me know!

I had chosen to not make the background color transparent because in many cases, the background color is used as an actual color rather than to represent transparency (in background tiles).
e.g in this screenshot, all the black is the background color, but it's clearly not meant to be transparent (the blue portions are not color 0):
(http://i.imgur.com/37jXXwf.png)

I need to fix the first bug (e.g no longer relying on the original pixel's color index when rendering) since it does cause the issue you mentioned. But I think it might be worth making the transparency on background tiles an option when using the builder tool?

EDIT: After thinking about this some more, I figured out a way to do this automatically without any option.  Whenever a background tile has a background priority sprite showing through its background color, it's marked as "needing a transparent background".  This way, only problematic tiles are rendered with the transparent background. With this change, the PNG for Double Dragon looks like this:
(http://i.imgur.com/GmnrPJc.png)

This way I can fix both issues you mentioned and cases like Mega Man above still render normally with solid colors.
 
Title: Re: Other: Castlevania 30th anniversary
Post by: mkwong98 on August 27, 2017, 01:06:10 pm
Sour, I want to try out the surrounding tiles condition feature of Mesen. Can you provide an example? Thanks.
Title: Re: Other: Castlevania 30th anniversary
Post by: SourMesen on August 27, 2017, 06:42:42 pm
I wrote a quick document about the format & conditions a few weeks ago: https://www.mesen.ca/HiresFileFormatSpec.txt
I also added a few more condition types since ("vmirror", "hmirror", "bgpriority" - all for use on sprites), but they aren't available in 0.9.1.

Here's a few actual examples I used when trying to port kya's CV1 skin:
Code: [Select]
#statue vs background
<condition>statueBlock,tileNearby,0,-8,D2C2C2C7CF2FFEFC2C3C3C3830D00000,0F100017
[statueBlock]<tile>0,0E0E079C1E3EA7076101586121010000,0F100017,176,912,1,N
<tile>0,0E0E079C1E3EA7076101586121010000,0F100017,176,1168,1,N

<condition>redDrape,tileNearby,-8,0,41C1C3C7C7C7470FE0E0E0C0C0C0C000,0F101625
[redDrape]<tile>0,071E3E3F3FBFFFFF0000000000000000,0F101625,184,1192,1,N
<tile>0,071E3E3F3FBFFFFF0000000000000000,0F101625,184,936,1,N

<condition>blueBricks,tileNearby,-8,0,0A80000000000000F57FFE00E0F7E300,0F100017
<condition>blueBricks2,tileNearby,-8,0,00400000040000007F3F6D00C3F7F700,0F100017
[blueBricks]<tile>0,3F1F07170F0F0F0FC060F8E87090D0D0,0F100017,192,1168,1,N
[blueBricks2]<tile>0,3F1F07170F0F0F0FC060F8E87090D0D0,0F100017,192,1168,1,N
<tile>0,3F1F07170F0F0F0FC060F8E87090D0D0,0F100017,192,912,1,N

Let me know if you need more info.
Title: Re: Other: Castlevania 30th anniversary
Post by: mkwong98 on August 31, 2017, 10:33:43 am
I'm making a HD Pack editor at the moment to work with conditions.

When working with conditions, I need to find out how the tiles are placed on the screen. I'm using the PPU viewer to do that but the tile info on the Nametable Viewer doesn't include the CHR ROM address of the tiles. So I have find the tile by going through the Chr selection in the CHR Viewer. The same is true for Sprite Viewer too. So is it possible to add the CHR ROM address to the tile info?

Also when I right click a tile in the PPU Viewer, the is an option to copy tile in HD pack format. But the data is the raw pattern of the tile even when the game is a CHR ROM game so it wouldn't work in the HD pack.

Currently the only way to go back to a particular screen when using PPU Viewer is to use save states. However there aren't that many slots to work with. So is it possible to have a "Save As" option to save state? Or is it possible to dump the data of PPU Viewer into a file?

Thank you very much for your hard work.
Title: Re: Other: Castlevania 30th anniversary
Post by: SourMesen on August 31, 2017, 04:29:29 pm
When working with conditions, I need to find out how the tiles are placed on the screen. I'm using the PPU viewer to do that but the tile info on the Nametable Viewer doesn't include the CHR ROM address of the tiles. So I have find the tile by going through the Chr selection in the CHR Viewer. The same is true for Sprite Viewer too. So is it possible to add the CHR ROM address to the tile info?
I added the ability to double-click on tiles in the nametable & sprite viewers to view them in the CHR viewer tab (with the NT/Sprite's palette automatically selected) a few days ago, would that be enough for what you need to do?

Also when I right click a tile in the PPU Viewer, the is an option to copy tile in HD pack format. But the data is the raw pattern of the tile even when the game is a CHR ROM game so it wouldn't work in the HD pack.
Yes, this is a bug in 0.9.1 - it's already fixed.  In the next version, it will copy the data as [tile index],[palette data] for CHR ROM games

Currently the only way to go back to a particular screen when using PPU Viewer is to use save states. However there aren't that many slots to work with. So is it possible to have a "Save As" option to save state?
I'll see what I can do about this - I will probably add this and keep the feature "hidden" behind the "Developer Mode" option that I added a couple of weeks ago (to keep the standard UI as simple as possible)

Nice to know you're working on an editor for this - looking forward to seeing it!
Title: Re: Other: Castlevania 30th anniversary
Post by: mkwong98 on September 02, 2017, 07:43:25 am
I added the ability to double-click on tiles in the nametable & sprite viewers to view them in the CHR viewer tab (with the NT/Sprite's palette automatically selected) a few days ago, would that be enough for what you need to do?

What the editor does is to reconstruct the objects in the game, identify which tiles in the objects are not unique and use conditions to distinguish them so that the user can replace them with unique tiles.

So besides copy the tile which the user double clicks, I suggest adding an option to copy the whole Nametable or OAM (as lines of tile id, palette, x, y). This way I can paste it to a textbox in the editor, the editor will reconstruct and display the Nametable or sprites, allowing the user to select tiles and group them into an object.

Don't worry about it if it takes too much to put in. Keep up the good work!
Title: Re: Other: Castlevania 30th anniversary
Post by: niuus on September 05, 2017, 07:18:07 pm
Does anybody know if there is a raw build of this Nestopia emulator that you could compile for example as a retroarch core?

In any case, are there any other NES emulators that allow for this kind of color patching?

This is way too awesome!
It would be incredible to patch this 'Castlevania HD' support unto the Nestopia core for Retroarch (Wii / Wii U)
Title: Re: Other: Castlevania 30th anniversary
Post by: bogaabogaa on September 10, 2017, 03:39:18 am
Hey niuus did you look into the zip file? There is a src.zip file. And the read me has infos too that I mentioned multiple times in this thread already. I never tried to compile it myself though.
I think it would make more sense to make mesen emulator a part of the RetroPie. It has HDNES support and it works very well. I guess this HD CV1 will be ported soon too. Is anybody actually working on this?
Title: Re: Other: Castlevania 30th anniversary
Post by: Sephirous on September 27, 2017, 12:51:14 am
I am a little late coming into the thread but figured I would ask anyway,
Are there any plans for updated graphic releases of Castlevania II and III?
Title: Re: Other: Castlevania 30th anniversary
Post by: bogaabogaa on October 01, 2017, 07:11:11 am
I have plans to do CV3. I did do the skins made by Jorge D. Fuentes as you see here. https://clips.twitch.tv/FlirtyHyperWormPanicBasket
But my skill at drawing is not really there yet as you see with grant.. and I was thinking of doing a CV1 first since it is shorter and a gory version may be welcome on the fans.

I would do the Anniversary CV1 for mesen and open a page to share skins. I was thinking someone is doing it already though I am waiting for some response.

It is a side project for me though it may take a while. I really hope to play some games with skins in the future.
I am realy impressed by the work of mesen giving us a great platform to create them.
Title: Re: Other: Castlevania 30th anniversary
Post by: SourMesen on October 02, 2017, 07:05:32 pm
I haven't had the time to work on it lately, but I do have a partially working CV1 skin based on kya's work (created by using a script to convert his Nestopia skin to Mesen's format)
All I have left to do is to go through the game & setup some conditions to remove a number of problems with the tile replacements (because CV1 reuses the same tiles in different contexts, etc.)
I don't really have any ETA as I'm generally working on something else at the moment, but I should be able to get it done eventually.

So besides copy the tile which the user double clicks, I suggest adding an option to copy the whole Nametable or OAM (as lines of tile id, palette, x, y). This way I can paste it to a textbox in the editor, the editor will reconstruct and display the Nametable or sprites, allowing the user to select tiles and group them into an object.
Sorry, I completely missed that! This shouldn't be too hard to add - I'll try to get it done soon-ish.
Title: Re: Other: Castlevania 30th anniversary
Post by: mkwong98 on October 05, 2017, 09:29:22 am
Sorry, I completely missed that! This shouldn't be too hard to add - I'll try to get it done soon-ish.
That is great! Take your time, I haven't made much progress with the pack editor yet. So far I only made a ROM viewer similar to the CHR viewer in Mesen.
Title: Re: Other: Castlevania 30th anniversary
Post by: bogaabogaa on October 18, 2017, 06:43:14 pm
I had a sound issues with 10x up scaling on CV1. Did not test much and I don't intend to use the high resolution. But I thought I say it anyway.
https://clips.twitch.tv/ThoughtfulJoyousGnatTF2John
Title: Re: Other: Castlevania 30th anniversary
Post by: AxlRocks on December 16, 2017, 07:21:11 pm
Any news from anyone else working with this stuff? I've finished a 16-bit-ish pack for Megaman 1 myself. (Also a 30th Anniversary release!)

(https://i.imgur.com/wJPTYf6.png)(https://i.imgur.com/ox9wJJR.png)
(https://i.imgur.com/qbwLSzY.png)(https://i.imgur.com/KnAXNs6.png)(https://i.imgur.com/iJW8OBw.png)
(https://i.imgur.com/cwWqc7B.png)(https://i.imgur.com/5rQTODi.png)(https://i.imgur.com/vOVxx1N.png)
No idea where to post such a thing though. Anyway, I'm pretty happy with the results. You can see some Wily Wars graphics in it, though the WW color palette has been almost entirely thrown out in favor of more vibrant colors and the vast majority of graphics are adapted versions of the original designs.

What a ton of work though. Definitely 2 or 3 things I'd like to change, but they're minor and I'm a bit drained for working on this game after several months. (Plus my PC is hanging on by a thread at this point, but that's another story.) I also need a couple conditional graphics setup, but again, very minor in the case of Megaman.
Title: Re: Other: Castlevania 30th anniversary
Post by: Zynk on December 16, 2017, 09:19:01 pm
No idea where to post such a thing though.
You could make a standalone thread for this. Use Dropbox to store and share files.

BTW nice work. Would be nice to play that today (Dec 17)  :cookie:
Title: Re: Other: Castlevania 30th anniversary
Post by: AxlRocks on December 16, 2017, 09:46:03 pm
You could make a standalone thread for this. Use Dropbox to store and share files.

BTW nice work. Would be nice to play that today (Dec 17)  :cookie:

Probably in the Personal Projects forum? I hesitated doing that being it's not actually hacking of anything, but then again, this thread was for a front page News article so I guess it's a welcome subject.

Thanks, glad you like it! I'll post a thread in a bit.
Title: Re: Other: Castlevania 30th anniversary
Post by: SourMesen on January 22, 2018, 05:40:59 pm
I finally got around to converting this to the HD Pack format that Mesen supports.
You can grab it here: https://gofile.io/?c=Z1mJLo

You need to place the contents of the zip file into the HdPacks\[CastlevaniaRomName]\ folder (e.g "HdPacks\Castlevania\" if you are loading "Castlevania.nes") and enable HD packs in Mesen for it to load properly.  This should work on both the standalone version of Mesen and the libretro port as well.

Many thanks to kya for his work on the original Nestopia hack and for his invaluable help when I was writing the script that I used to convert most of his Castlevania skin automatically.
Title: Re: Other: Castlevania 30th anniversary
Post by: kya on April 05, 2018, 06:09:29 am
Ignoring Heraclitus I'm stepping into the same river twice and releasing once again a facelift patch for Castlevania. The rules are the same - the NES version of the game is updated with KONAMI-authored graphics. But this time most of the graphics are taken from the third generation of Castlevania for mobile phones.

The patch is available here:
https://yadi.sk/d/XXkso2kp3U7sjz?lang=en

As in the previous patch some of the graphics come from Vampire Killer for MSX to honor that great game which started  it all for me 30 years ago in 1988.

This time the patch does not come as a hacked Nestopia. Instead it is in a form of an "HDPack" for the excellent Mesen NES emulator. Many thanks go to its author Sour! Without his support this pack would've never existed.
 
Using his emulator allowed me to replace not just the graphics, but also the music of the game. The tracks are taken from various sources indicated in respective ogg tags. If you do not like these exact tracks, you may replace them with your own.

In order to use this patch you have to download the latest Mesen emulator (0.9.5 and up) from

http://www.mesen.ca

Then you should unzip and run it. Mesen will greet you with a configuration window. Pay attention what folder will be specified there as a "Data Storage Location". You need to place the contents of this HDPack zip file into the
[Data Storage Location]\HdPacks\[CastlevaniaRomName]\ folder
(e.g "HdPacks\Castlevania (USA)\" if you are loading "Castlevania (USA).nes")

Please note that unlike my previous patch which was compatible with any Castlevania or Akumajou Dracula ROM (and even with some custom level hack ROMs) this patch requires exactly the Castlevania (USA) ROM (SHA1 a31b8bd5b370a9103343c866f3c2b2998e889341)! Even Rev.A won't work.

After extracting the HDPack you should enable HDPacks in Mesen. Tick the box at
Options->Video->Enable HDNes HD Packs.

Now load the ROM into Mesen. If the game retains the original look, something went wrong. Check the location of the pack. Check the version of your ROM.

Note that you have to run the pack on a more or less powerful modern PC or laptop. Don't try it on your Celeron or Atom. If you have got a modern quad core CPU, I recommend enabling VSync for a silky smooth scrolling (Options->Video->Enable vertical sync).

P.S.
Please drop me a line on kya199 at yandex.ru, if you ever stuble upon a part 2 or 3 of the mobile phone Castlevania generation II:

http://www.vgmuseum.com/mrp/NewCV/screen-cvcphone2.htm
Title: Re: Other: Castlevania 30th anniversary
Post by: Psycho Fox on April 05, 2018, 10:38:32 am
^
This update looks lovely.  I wonder, is it possible to make version that's compatible with or contains the "improved controls" patch?  I'd love to play the game looking like this but with less stiff controls and no fecking backwards knock! :P
Title: Re: Other: Castlevania 30th anniversary
Post by: kya on April 05, 2018, 03:57:17 pm
^
This update looks lovely.  I wonder, is it possible to make version that's compatible with or contains the "improved controls" patch?  I'd love to play the game looking like this but with less stiff controls and no fecking backwards knock! :P

Yes it's possible. Grab this patch:
https://yadi.sk/d/bYezcx3-3U8yoZ

and put it into an HDPack folder overwriting the old one.
Title: Re: Other: Castlevania 30th anniversary
Post by: GeneralFailer on April 06, 2018, 09:52:22 am
The original X68000 version (not the classic mode on chronicles) is much easier. Almost everything does only 1 damage.
Who told you that? Longplays don't show any difference and even TCRF doesn't list any substantial balance tweaks. I don't think Konami has fought Western rentals much since PlayStation days.
Title: Re: Other: Castlevania 30th anniversary
Post by: Whipon on April 06, 2018, 05:48:49 pm
Hello Kya!.
I'm playing your hack and it looks great.
Congratulations! :thumbsup:
However for some reason, the music of the game is the classic one, and not your new ogg files.
I tried searching an option to enable alternate audio in Mesen, but could'n find anything.
Do you know how I can fix it?.
I'm running Mesen 0.9.5 under Win 10 x64.
Thanks a lot.

EDIT: It seems I had a wrong version of the ROM. I just fixed it. Thanks again.
Title: Re: Other: Castlevania 30th anniversary
Post by: Psycho Fox on April 06, 2018, 06:47:13 pm
Thank you, kya, for replying - and with a great answer. :)
Title: Re: Other: Castlevania 30th anniversary
Post by: Aclectico on April 10, 2018, 09:05:32 am
Great work on the patch Kya!

I especially like the sprite work on Simon Belmont. Are you open to any friendly suggestions? If so, I made a slightly altered version with a new title screen and entrance screen. The entrance does have a minor bug where the Simon sprite arrives half a second before the background. I couldn't figure out how to avoid this without removing the cloud animation or causing a more noticeable glitch at the end of the screen. Since I like the cloud animation, I decided to leave it. If you are aware of a fix, I'd be interested to know. In any case, feel free to use anything from this version in your main repository if you like. Again, great work. I hope more are to come!

Link to alternate CastlevaniaHD patch:
https://drive.google.com/file/d/1f7G6I9QubWV7o090iyuLCYwj9Ofl-TSK/view?usp=sharing

Low resolution screenshots:
(https://imgur.com/a/7lExY)
https://imgur.com/a/7lExY
Title: Re: Other: Castlevania 30th anniversary
Post by: Aclectico on April 21, 2018, 03:13:35 pm
Thank you Kya for all your help on the alternate patch I posted a few days ago. With your assistance, the cloud animation has been improved and the glitch at the beginning of the gate scene is gone. I also adjusted the animation a bit to resolve the "hiccup" issue you mentioned to me earlier. In my opinion, the result is much smoother. For anyone interested in the Castlevania HD pack with a new title screen and entry screen, feel free to use the link below:

https://yadi.sk/d/0zE50gqu3ZECcj

Happy Gaming!
Title: Re: Other: Castlevania 30th anniversary
Post by: mkwong98 on April 24, 2018, 12:51:15 pm
I made a new version of the prologue which matches the length of the scene and vampire killer which loops smoothly:
https://drive.google.com/open?id=1Jzt1SZXuhkXZeaSJedQhP0-iGpWWCPdd (https://drive.google.com/open?id=1Jzt1SZXuhkXZeaSJedQhP0-iGpWWCPdd)