News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - SourMesen

Pages: [1] 2
1
Personal Projects / Re: NES Metroid HD Pack
« on: February 24, 2019, 12:39:20 pm »
Sorry for the late reply (been rather engrossed in a "little" side project that has been taking every single minute of my spare time for the past 2 weeks :p)

Am I understanding properly that the black leg showing up is likely a bug in the replacement logic?  e.g making the original leg transparent in the ROM makes the leg go away in the HD version? If so, I'll add it to my list of things to check before the next release (I was originally planning on releasing 0.9.8 a couple of weeks ago, but got sidetracked by said side project, might be a few more weeks before I get around to releasing it, so I can investigate this before doing that)

2
Personal Projects / Re: NES Metroid HD Pack
« on: February 19, 2019, 10:39:19 am »
Whoops, haven't been following this thread as much as I should have been.
I'm amazed at how good the animation looks now!

.. I'm also amazed that Mesen doesn't die from having that many conditions setup :p

If you've noticed patterns that often get repeated in terms of conditions that could be reduced by some additional HD Pack functionality, let me know and I'll see what I can do (or if there's anything else related to HD packs, really)

3
Personal Projects / Re: NES Metroid HD Pack
« on: January 20, 2019, 09:19:56 pm »
As is, I can't think of any way to get this done with conditions alone, unfortunately.
Allowing replacement tiles to be bigger than their original versions, while probably not impossible, would probably be rather tricky to get right (when considering sprite priority, draw order, etc.) and would either be limited to overflowing in a specific direction (e.g right and bottom), or would require additional syntax to specify how the oversized replacement would align itself over the original tile, etc.

With the way the code is right now, it probably wouldn't be simple to implement.  Since the pixel replacement process is done pixel by pixel, rather than tile by tile, it makes it harder to draw outside the bounds of the original tile.

I'll keep it in mind for now, and maybe I'll come up with an easy solution eventually!

4
Is there a general way to preserve compatibility with HdPacks while editing/hacking the intended source ROM, or is it entirely specific to the ROM and HdPack involved?
This specific pack contains a small IPS patch to change the music - this patch is only applied when the ROM matches the SHA1 hash that's written in the hires.txt file.  This is why applying another patch to the ROM makes the music revert to the original soundtrack.  The simplest way to fix it on your end at the moment would be to apply the IPS patch contained in the pack to your rom manually, this should force the sound patch to work with any other patch (assuming the patches don't conflict with each other).

For graphic-only packs, this should never be a problem in general.

5
I also hear some digital crackling noise in the audio, as though it is being played on an 8-bit vinyl record player... Maybe that is just Mesen.
You can try increasing the "Latency" setting in Options->Audio to see if it helps, some computers might have trouble with the default 50ms latency?  Also, if you're using an old/slow laptop, it's possible the HD Pack is a bit too demanding for it - simplest way to check this would be to disable HD Packs and see if you still hear crackling.

6
But OGG music doesnt work, i need to enable another option for that?
According to someone in another thread, this happens if you didn't use the correct version of the Castlevania 1 ROM.  You probably used Rev A, which won't work for this.

7
News Submissions / Re: Other: Castlevania 30th anniversary
« 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.

8
There is no tutorial as of yet - the process is essentially playing through the game while recording the tiles, and then editing the PNG files to draw "HD" tiles on top of them instead. (Docs: https://www.mesen.ca/docs/hdpacks/).

Also, AxlRocks briefly mentions it in his opening post, but you can also overclock MM1 in Mesen to remove all the game's slowdowns.

9
I said this to you a few months ago already, but this looks amazing, in my opinion!

About the sound crackling or performance issues, this is likely an indicator of performance issues. HDPacks do require quite a bit more performance than normal emulation. The pack runs at around 160fps on my desktop, but barely gets 63-65fps and some static on my (much slower) laptop. Adding some overclocking drops it to ~58fps, which makes the sound distort constantly.

To see if it's a performance issue on your end, show the FPS counter (F10 by default) and speed up the emulation to the maximum speed (F9) - if you don't get 60fps, or barely above 60fps, that explains the sound issues.  If you get just a bit above 60fps, increasing the audio latency setting may help fix the sound issues.

I'll try to profile the HDpack code using this pack to see if there are any obvious performance bottlenecks that I can fix, but I've already spent a decent amount of time optimizing hdpacks in the past, so I can't promise anything.

For key bindings, you can remove by clicking to bind a key and then clicking "X" on the popup window to close it.

10
Personal Projects / Re: The Guardian Legend - SRAM Saving Edition
« on: November 27, 2017, 05:53:26 pm »
Pretty much what KingMike said, except the 2k banks ignore the lowest bit, so you would need to set registers 0 to 5 to be: 0, 2, 4, 5, 6, 7
Which should give a continuous 8kb worth of CHR banks and fix the issue in Mesen.

The 2x 2k + 4x 1k vs 4x 1kb + 2x 2k toggle is bit 7 ($80) of $8000.
So this sequence of writes should work:
Code: [Select]
$8000 = $00
$8001 = $00
$8000 = $01
$8001 = $02
$8000 = $02
$8001 = $04
$8000 = $03
$8001 = $05
$8000 = $04
$8001 = $06
$8000 = $05
$8001 = $07

11
Personal Projects / Re: The Guardian Legend - SRAM Saving Edition
« on: November 24, 2017, 10:54:17 pm »
Hmmm...interesting. I'll take a look at this when I have time to see if I can fix this. But I've checked the game on other emulators including the original NES/AVS hardware via an Everdrive, and they all worked without any problems. But thanks again and I'll take a look later. :)
As far as I can tell, your hack does not initialize the CHR banking registers at all, relying on the emulator's default state. I imagine FCEUX, Nestopia and the Everdrive all use the same default state. On a real MMC3 cart, there is no guaranteed bootup state, as far as I know. I'm not a hardware expert, but I haven't seen any documentation stating that the MMC3's bootup state is fixed and reliable on a real cart, so relying on this is probably a bad idea.  Mesen mostly tries to avoid making assumptions about bootup state - in the MMC3's case, all registers are initialized to 0, which makes the default CHR banking relatively useless (and forces the coder to initialize the MMC3 registers themselves).

12
News Submissions / Re: Other: Castlevania 30th anniversary
« 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.

13
News Submissions / Re: Other: Castlevania 30th anniversary
« 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!

14
News Submissions / Re: Other: Castlevania 30th anniversary
« 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.

15
News Submissions / Re: Other: Castlevania 30th anniversary
« 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):


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:


This way I can fix both issues you mentioned and cases like Mega Man above still render normally with solid colors.
 

16
News Submissions / Re: Other: Castlevania 30th anniversary
« on: August 06, 2017, 08:00:22 pm »
I just released version 0.9.1 (link) 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.

17
News Submissions / Re: Other: Castlevania 30th anniversary
« 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

18
News Submissions / Re: Other: Castlevania 30th anniversary
« 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
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

19
News Submissions / Re: Other: Castlevania 30th anniversary
« 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:


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.

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.

20
News Submissions / Re: Other: Castlevania 30th anniversary
« 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
screenshot 2

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.

Pages: [1] 2