Page 1 of 1

User defined layer

Posted: Wed Sep 06, 2017 6:12 am
by Staffan
One thing that I thought of being thereticly possible, was to make an emulator that loads different "user-defined" graphics than the original machine.

Suppose that you have something that loads an image from an adress. whenever this assembly instruction is interpreted by the emulator, he doesnt load whats on that adress but instead loads another image with higher resolution that someone has made....
This way you could play Sonic the hedgehog in HD if someone made the drawings.

Just a thought.... would require A LOT from the emulator coder...


Speaking of nothing I would also like to give you my admireation for the policy of this emulator. This is the reason I like it. As a computer scientist, I know the importance of structured code :)

Re: User defined layer

Posted: Wed Sep 06, 2017 6:57 am
by Sik
Which would completely backfire as a lot of games have most of their graphics compressed in ROM and so will decompress them to RAM and load those from there. Detecting them by address just won't work. You could try to detect by literally matching the whole tile, and even that isn't foolproof.

Re: User defined layer

Posted: Wed Sep 06, 2017 10:13 pm
by Miquel
Do it from VRAM address instead and some kind of checksum or crc per tile. This new VRAM only will be used for displaying tiles(/sprites).

Re: User defined layer

Posted: Thu Sep 07, 2017 7:13 am
by Sik
And that won't work for games that load tiles at arbitrary locations (e.g. because they do allocation at runtime as the player moves around the level - yes, there are games like that). I wouldn't rely on VRAM address honestly and just look exclusively at the tiles themselves.

Re: User defined layer

Posted: Thu Sep 07, 2017 1:10 pm
by Staffan
Well, just a thought.... :) Guess you have to get the emulator to be 100% compatible first before you give something like that a serious shot.

Re: User defined layer

Posted: Thu Sep 07, 2017 6:45 pm
by tryphon
isn't there an SMS emu which does exactly that ?

Games with dynamic tile loading mustn't be so frequent. I don't remember having seen one.

You can do it by comparing actual tile data after all : it's only 32 bytes.

Re: User defined layer

Posted: Thu Sep 07, 2017 9:24 pm
by Miquel
Sik wrote:
Thu Sep 07, 2017 7:13 am
And that won't work for games that load tiles at arbitrary locations (e.g. because they do allocation at runtime as the player moves around the level - yes, there are games like that). I wouldn't rely on VRAM address honestly and just look exclusively at the tiles themselves.
Then relay solely in the crc. I have worked on similar applications and it simply works.
Staffan wrote:
Thu Sep 07, 2017 1:10 pm
Well, just a thought.... :) Guess you have to get the emulator to be 100% compatible first before you give something like that a serious shot.
It's an extremly easy feature compared to writing an emulator. And nothing compared to redoing all the graphics in HD, how many years took Sonic 2 HD to do the very first level?