Myself086 / Project-Nested

MIT License
505 stars 17 forks source link

Nested 1.5 works but,,, #54

Open johneymute opened 2 years ago

johneymute commented 2 years ago

With nested 1.5 i was finally able to get castlevania 1 to work by using the same settings BUT i also changed vqram 0x4000 into 0x8000 sothat it will no longer crash during the demo session, I also do get metroid finally working on the powerpak wich beforehand only worked on the everdrive with version 1.4, HOWEVER i don’t get xevious to work all because of the mission option “memory emulation” wich are present in version 1.4.1 and 1.4.2 Because disabling memory emulation is required to get the game running,however with it’s previous versions of nested i got no sound,but somebody somehow manages to get it fully working with both 1.4.2 and 1.5 without changing anything complete with sound,i don’t understand that,

now the biggest icing on the cake is this,i tried mario 3 along with the recorded sram files from previous the version of nested hoping to get the game fully running with improvements,BUT nope despite it sees those calls,the game just has to reteach nested at how to run it(could it be that nested 1.5 only could deal with sram files from it’s own revision,could it not deal with generated sram files from nested 1.4 and beyond???) Also mario 3 still does crash and the spade card game so why is that? Unless there are certain settings needed not listed in the compatibility list yet,in fact no mentions about nested 1.5 in the compatibility list yet, BUT despites all that it’s a good start and let’s hope that dpcm audio is gonna be the next big thing.

Myself086 commented 2 years ago

The removed “memory emulation” settings were originally implemented to boost performance for mapper 0. Despite that, a few games saw improvement when disabling them. Investigating why they were helpful is going to be a focus for v1.6.

SRAM files are not forward compatible. Each one has a signature containing "Nested Emulator", version number and game profile name. Since the version number changed, the SRAM file is ignored by the different version. However, the profiles are forward compatible.

Spade game was fixed via patch available on the spreadsheet. I don't know how many versions SMB3 had but if the patch doesn't work, it's possible that you're using the wrong version.

johneymute commented 2 years ago

WooooW these are interesting mentions, Now for what i do know is there’re 2 revisions of ntsc super mario 3 in wich some languange issues were fixed that’s it, But can you link me to the patch fix of mario 3? Also are you working to implement the dpcm channel update for version 1.6? Again Thanks alot.

Myself086 commented 2 years ago

But can you link me to the patch fix of mario 3?

I already said where the patch is located. Please pay attention to what I'm saying.

Also are you working to implement the dpcm channel update for version 1.6?

Unlikely, I will be working on Project Nested more casually from now as I'll be focusing on a new project.

johneymute commented 2 years ago

Well yes i do understand that that patch is in the spreadsheet but the ultimate question is were can i find that spreadsheet,is it on the website or is it inside nested 1.5 or wherever? Or i may lived under a rock for a few day’s but Am spinning my head at were to find the spreadsheet to track down that smb3 patch ,mmmm.

Myself086 commented 2 years ago

There's a button titled "Compatibility" in the bottom left corner when you open the exe file.

johneymute commented 2 years ago

Well i guess i found that patch of smb3 in the compatibility list of the website, saying something with a weird number on it,i guess i have to copy paste it to edit patch option,so i tryed that but i do got an error massage saying error on line 1,i tried it with both nested 1.4.1 ,nested 1.4.2 and nested 1.5 but i got the same error massage ,but i guess i did something wrong,phew

f3bandit commented 2 years ago

Well i guess i found that patch of smb3 in the compatibility list of the website, saying something with a weird number on it,i guess i have to copy paste it to edit patch option,so i tryed that but i do got an error massage saying error on line 1,i tried it with both nested 1.4.1 ,nested 1.4.2 and nested 1.5 but i got the same error massage ,but i guess i did something wrong,phew

remove the quotation marks in the code, some of the patch codes have quotes that aren't part of the patch code.

johneymute commented 2 years ago

Well i tried to remove all quotation marks but that did not help,i tried to remove all symbols such as //#_ etc,, as well but no luck, i also tried to remove the http://www.google.com at the beginning of the code but no luck either,i tried nested 1.5 for that, So i am starting to feel me desperate and how to deal with this.

Myself086 commented 2 years ago

I tried copying from a different browser, one where I'm not allowed to edit, and I can't recreate the faulty copy-paste.

Can you explain what you did to copy the text in the patch column?

johneymute commented 2 years ago

Well i tried to copy and paste the patch by copying the cell to it’s link by clicking the right mouse button then then pasted that in the edit patches option,BUT as expected that was the wrong way,so thois time i did hit control c instead to copy it,then i pasted it in the edit patches option and wallaah,now i finally got it to work😁

johneymute commented 2 years ago

1 question,are you about to give up on dpcm sound support or is that something you may consider for version 1.7? for what i can remember is that you said a while back that you wanted to use 2 soundchannels of the snes to emulate 7bit pcm audio to allow dpcm,adpcm and pcm playback,despite most games don’t use 7bit pcm, Bome games seems to also use a form of adpcm streaming , But i was thinking,what if the snes lacks the bandwide and processor power to support 7bit pcm,i was thinking,how about just redigitize 1bit dpcm and 4bit adpcm samples from supported games into BRR instead (same treatment as psg audio)and leave 7bit pcm support at all,am mean better having 1bit dpcm or 4bit adpcm then no digital audio at all,sure that will take alot of time and it probably will make nested huge in size wich may could have impact on the performance of running games,but if trunscating those supported games,then only all used samples should be put into the rom and not those unused once,but again that would probably also take long since nested then also has to know wich samples belonges to wich game in order to allow trunscating those games,but who ever knows.

Myself086 commented 2 years ago

I'm not giving up but changing where I put my time. I am working on a different project so the time I put on Project Nested will diminish. If you desperately want DPCM support now, just pay me. Otherwise wait for me to update it the way I want and the way my Patreon supporters want.

As for your last paragraph, there are a lot of misconceptions.

As I explained before (please take some notes so I don't have to repeat myself), each DPCM sample can be converted to BRR to be played in 2 channels not because I want to play 7-bit samples but because I want more than 4-bit samples. Using a single channel is an option and I recently decided to go with 1 channel at first. Samples only need to be translated once because there's a lot of unused ARAM (Audio RAM) on Project Nested.

BRR samples for DPCM will be cached. A cache is a limited memory used to access data at a faster rate than where the original is located. Since the cache memory is limited, each set of data in the cache is dated as to when it was last used. If new data needs to come into the cache but the cache is full, the oldest data is deleted until enough space is present for the new data. The SPC700's memory is isolated in both directions so the cache approach is the most viable option.

johneymute commented 2 years ago

Hi, i have played today both versions of mario 3 to generate some extra srm files and i can confirm that both do get indeed passed 5-7 and both do got the roulette game work,HOWEVER i have discovered that the pal version of mario 3 still does crash on the memory game,all other versions just do get working fine once entering the momery,i say this so you will know that,once again thanks for the hard work,and if i know how to pay you,i will definitely pay you some day to courage you to keep on this project more and more😁

Myself086 commented 2 years ago

HOWEVER i have discovered that the pal version of mario 3 still does crash on the memory game

I told you that these patches would likely not work on other versions. However, you can fix spade game by disabling "native return address" but 5-7 executes a BRK which is the only unsupported official opcode. The game executes a BRK because of a mistake in their own code which went unnoticed due to having no visible side effects.

if i know how to pay you,i will definitely pay you some day to courage you to keep on this project more and more

There's a button titled "Patreon" just below "Compatibility" on the exe's main window.

johneymute commented 2 years ago

Oh am sorry, i didn’t remember that that you told me that the patch would likely not work on other regions of that game,oh well now i am aware of it,

yes i saw that petreon button below compatibility,who ever knows i will try it someday to pay.

f3bandit commented 2 years ago

Oh am sorry, i didn’t remember that that you told me that the patch would likely not work on other regions of that game,oh well now i am aware of it,

yes i saw that petreon button below compatibility,who ever knows i will try it someday to pay.

Just curious but how does one create patches or search for them? is there a procedure that can be followed to find them?

f3bandit commented 2 years ago

Oh am sorry, i didn’t remember that that you told me that the patch would likely not work on other regions of that game,oh well now i am aware of it, yes i saw that petreon button below compatibility,who ever knows i will try it someday to pay.

Just curious but how does one create patches or search for them? is there a procedure that can be followed to find them?

To find the patch,1,open the nested emulator and 2,click on the “compatibility” button wich will lead you to the compatibility list of the website,another option is to clock on the code button next to issue button on this website, then click on compatibility list below to go to that compatibility list, 3,Now click on game list and search for the game you want,on the right side you can see a spreadsheet wich possibly contains a patch for that game,4,if so click with the mouse on it,5,then hit control C to make a copy of it,6,now click on edit patches in nested and paste that copy of that patch into it and click on oke,7,then change the setting in accordance to the compatibility list of that game if needed,then hit save,hit make a profile,click on oke to confirm and you have a patched nes game to run on snes😁🙏

No I mean how to find patches for games not listed in the compatibility page?!?

johneymute commented 2 years ago

Oh am sorry, i didn’t remember that that you told me that the patch would likely not work on other regions of that game,oh well now i am aware of it, yes i saw that petreon button below compatibility,who ever knows i will try it someday to pay.

Just curious but how does one create patches or search for them? is there a procedure that can be followed to find them?

To find the patch,1,open the nested emulator and 2,click on the “compatibility” button wich will lead you to the compatibility list of the website,another option is to clock on the code button next to issue button on this website, then click on compatibility list below to go to that compatibility list, 3,Now click on game list and search for the game you want,on the right side you can see a spreadsheet wich possibly contains a patch for that game,4,if so click with the mouse on it,5,then hit control C to make a copy of it,6,now click on edit patches in nested and paste that copy of that patch into it and click on oke,7,then change the setting in accordance to the compatibility list of that game if needed,then hit save,hit make a profile,click on oke to confirm and you have a patched nes game to run on snes😁🙏

No I mean how to find patches for games not listed in the compatibility page?!?

Phew,that’s a good question,maybe trough a google search or a certain website

Myself086 commented 2 years ago

Just curious but how does one create patches or search for them? is there a procedure that can be followed to find them?

I'm using a private SNES emulator to debug Project Nested. There's really nothing special about my SNES emulator so I never released it and it's bad in a lot of ways. One tool in particular is only found on my private emulator but someone can easily port it to Lua for Mesen-S, I can give directives if you're interested. I'm bad at Lua.

If you're familiar with reverse engineering games, find the address that you want to change and the new value that you want at this address. There are 3 addressing modes for patches, all 3 refer to the NES game but from different perspectives. I prefer the third option (NES address format) which is an address from the NES's perspective. For example, "[16:c8ef] = 62" is "[bank:address] = value". Where bank is determined by the mapper, each mapper may have different bank sizes. All 3 numbers are in hex.

The value "62" in the patch above is actually a repurposed opcode. There are 12 repurposed opcodes in total, each one overrides an illegal opcode that locks (STOP) an original 6502 so they're guaranteed useless for programming on a 6502. Every opcode with a low nibble of 0 that affects the PC register (ie. 0x60) will change into a STOP if you change the low nibble to a 2.

I haven't documented the repurposed opcodes but I can do it today if you're interested.

f3bandit commented 2 years ago

Just curious but how does one create patches or search for them? is there a procedure that can be followed to find them?

I'm using a private SNES emulator to debug Project Nested. There's really nothing special about my SNES emulator so I never released it and it's bad in a lot of ways. One tool in particular is only found on my private emulator but someone can easily port it to Lua for Mesen-S, I can give directives if you're interested. I'm bad at Lua.

If you're familiar with reverse engineering games, find the address that you want to change and the new value that you want at this address. There are 3 addressing modes for patches, all 3 refer to the NES game but from different perspectives. I prefer the third option (NES address format) which is an address from the NES's perspective. For example, "[16:c8ef] = 62" is "[bank:address] = value". Where bank is determined by the mapper, each mapper may have different bank sizes. All 3 numbers are in hex.

The value "62" in the patch above is actually a repurposed opcode. There are 12 repurposed opcodes in total, each one overrides an illegal opcode that locks (STOP) an original 6502 so they're guaranteed useless for programming on a 6502. Every opcode with a low nibble of 0 that affects the PC register (ie. 0x60) will change into a STOP if you change the low nibble to a 2.

I haven't documented the repurposed opcodes but I can do it today if you're interested.

yes please I would like to read all of that ty

Myself086 commented 2 years ago

yes please I would like to read all of that ty

https://github.com/Myself086/Project-Nested/blob/master/Documentation/Repurposed%20opcodes.txt

If you're interested in making patches, I'd like to see Kung Fu patched for proper scrolling splits.