VGMaps
November 19, 2017, 05:31:20 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1] 2 3 4   Go Down
  Print  
Author Topic: Gens KMod modifications for mapping  (Read 30202 times)
0 Members and 1 Guest are viewing this topic.
Maxim
Hero Member
*****
Offline Offline

Posts: 972



« on: July 13, 2007, 08:11:23 AM »

I'm messing with the source to Gens KMod now. With a huge proviso that I can't guarantee to achieve anything, and I may not have much time to spend on it, what mapping features can you think of that I could add to it? On my list there is:



- better background colour when layers are disabled

- a better keyboard shortcut for screenshots, like PrintScreen perhaps
Logged
TerraEsperZ
Hero Member
*****
Offline Offline

Posts: 2225



« Reply #1 on: July 13, 2007, 06:40:32 PM »

Personally, only the first two would be of real use to me. Regarding the background color, it should either be an RGB value chosen by the user, or else a color whose RGB value could never be produced by the Genesis color palette, both in 16 and 32 bits color mode.



If you can do this, I'll have to think of some kind of prize to send you.



*searches piles of unsorted stuff*



...well, I have the first 3 or 4 volumes of the old Evangelion DVD edition, the one with shitty sound and image. It wouldn't be much, but nobody's willing to pay me more than 12$ for the lot (brand new too) so I say screw that. How's that for motivation Wink ?



---

"With the first link, the chain is forged. The first speech censored, the first thought forbidden, the first freedom denied, chains us all irrevocably." [...] The first time any man's freedom is trodden on, we're all damaged. - Captain Jean-Luc Picard



B*tch, meet reality. Reality, meet b*tch. - Me
Logged

Current project that I really should try to finish:
-Drill Dozer (GBA)
-Sonic 3D Blast (Genesis)
-Naya's Quest (PC)
-Lilly Looking Through (PC)

Pending project:
-A ton of stuff that will never be finished
DarkWolf
Hero Member
*****
Offline Offline

Posts: 621



« Reply #2 on: July 14, 2007, 04:29:25 AM »

The only thing I was going to do was change the color when you disabled a palette to something like 0xFF00FF, or something close to that.  So if you end up doing that then I won't have any need to swim through the code.



The other alternative is to dump an indexed image like Genecyst does, but I think Gens mostly deals with RGB colors, so that may be a harder route.
Logged
Maxim
Hero Member
*****
Offline Offline

Posts: 972



« Reply #3 on: July 14, 2007, 06:57:01 AM »

It works internally with a 256-colour palette, so an indexed dumper might be possible, but it'd die when you came to any game that changes the palette mid-frame.



I'm hoping to make the colour configurable, else something fixed that's impossible to get with the MD palette. It'll be a hack though, and probably a speed hit.



The palette disabling thing might be a way to go too. Hopefully I'll get time to mess with it today or tomorrow. Another option that might be good would be to allow you to edit the palette in a "forceful" way that would override any later updates. It might also solve the black-on-black problem.



I might get technical on this later if I'm in need of some ideas on how to approach it.
Logged
Maxim
Hero Member
*****
Offline Offline

Posts: 972



« Reply #4 on: July 14, 2007, 02:15:36 PM »

Hooray!



http://www.smspower.org/maxim/forumstuff/gens_kmod_maxim_001.zip



- Magic Pink background option when layer B disabled



And a few little things I fixed along the way:

- Auto screenshots no longer get slower as the number increases

- Nicer window title text

- Screenshot limit increased

- Screenshot, etc dump filename selection no longer screwed up by dots in the filename



http://www.smspower.org/maxim/forumstuff/gens_kmod_maxim_001.zip



I'll release source soonish.
Logged
DarkWolf
Hero Member
*****
Offline Offline

Posts: 621



« Reply #5 on: July 14, 2007, 03:00:47 PM »

I will use this on my next Genesis project.  I already started ToeJam & Earl with Genecyst and the two emulators interpret the colors a little differently.



Hey Terra, get back to work on Sonic CD, my special stage maps are lonely.
Logged
TerraEsperZ
Hero Member
*****
Offline Offline

Posts: 2225



« Reply #6 on: July 14, 2007, 03:24:05 PM »

I won't have time to try it until tomorrow, but if this works as well for Sonic CD, I'll be resuming work on it as soon as I'm finished with my present project (Gradius: The Interstellar Assault), which  means probably by the end of the weekend. I can't wait Smiley !



---

"With the first link, the chain is forged. The first speech censored, the first thought forbidden, the first freedom denied, chains us all irrevocably." [...] The first time any man's freedom is trodden on, we're all damaged. - Captain Jean-Luc Picard



B*tch, meet reality. Reality, meet b*tch. - Me
Logged

Current project that I really should try to finish:
-Drill Dozer (GBA)
-Sonic 3D Blast (Genesis)
-Naya's Quest (PC)
-Lilly Looking Through (PC)

Pending project:
-A ton of stuff that will never be finished
TerraEsperZ
Hero Member
*****
Offline Offline

Posts: 2225



« Reply #7 on: July 14, 2007, 07:29:45 PM »

IT'S FREAKING WORKING!!! WOOHOO! LONG LIVE MAXIM!



*ahem*



With a good ISO, all the stages work perfectly and it looks like I can finally continue mapping Sonic CD! By the way Maxim, if you're interested, I wasn't joking about those DVDs you know. It's not worth much, but I'd prefer to give them to someone rather than to see them wasting space on my shelves Smiley



---

"With the first link, the chain is forged. The first speech censored, the first thought forbidden, the first freedom denied, chains us all irrevocably." [...] The first time any man's freedom is trodden on, we're all damaged. - Captain Jean-Luc Picard



B*tch, meet reality. Reality, meet b*tch. - Me
Logged

Current project that I really should try to finish:
-Drill Dozer (GBA)
-Sonic 3D Blast (Genesis)
-Naya's Quest (PC)
-Lilly Looking Through (PC)

Pending project:
-A ton of stuff that will never be finished
Maxim
Hero Member
*****
Offline Offline

Posts: 972



« Reply #8 on: July 15, 2007, 02:28:15 AM »

I have no idea what they are, and I don't have a DVD player (apart from the one in the computer)... <wikipedia> Aha, anime... not my thing, sadly.



Anyway, the exe is small because I tend to UPX compress programs that look scarily big, even though it's kind of pointless.



Regarding colour differences between emulators: it might be something I can mod. Gens is producing its 24bpp screenshots by left-shifting the internal 15- or 16-bit image, which means for example that a full-on 5-bit red value becomes an 8-bit %11111000 = 0xf8, when you might hope for 0xff. It would be relatively easy to modify it to do that, but it would make it incompatible with any older images you have.



Using PSP7's "Curves" dialog, I mapped input red and blue 0..248 to 0..255, and green 0..252 to 0..255, which gives the result I would expect. Does that match what you'd want?



Before:

User posted image

After:

User posted image



Does the second match what Genecyst produces? Should I make Gens only produce that? Maybe I can make it optional...
Logged
DarkWolf
Hero Member
*****
Offline Offline

Posts: 621



« Reply #9 on: July 15, 2007, 06:37:28 AM »

I can get you a PCX shot from Genecyst, but don't worry about coding something just for me.  Only if you want to do it.  I've got an old Win98 machine next to my modern one and they are on a KVM switch, so it's no problem for me to use Genecyst. Gens will just be a little easier in the future.  Since I can run it on the same machine and don't have to deal with PCX.
Logged
Maxim
Hero Member
*****
Offline Offline

Posts: 972



« Reply #10 on: July 15, 2007, 08:25:38 AM »

Well, I added it as an option.



http://www.smspower.org/maxim/forumstuff/gens_kmod_maxim_002.zip



If you enable colour masking with layer B on, you get this secret message in Sonic 1. I wonder if the Sonic fanboys know about it?



User posted image
Logged
Maxim
Hero Member
*****
Offline Offline

Posts: 972



« Reply #11 on: July 26, 2007, 03:59:15 AM »

So it turns out the secret credits screen can be shown, in the original Japanese release (the one with the double-spike-death bug), with a certain keypress (CCCCCCUDLR, wait for demo, A+B+C+D+Start, apparently). Never mind.



Anywho, I had a stab at mapping a stage from Sonic 1 using my autostitcher a few days ago. It worked fairly well but the palette rotation for waterfalls confused it (since when that's all you can see, it looks like scrolling). So, my solution is to try to modify Gens again with a checkbox that will, when checked, disable all palette changes (ie. maintain the current palette and ignore updates). I imagine this will be useful for a lot of other games too, but if you reply here with encouragement it'll increase the probability that I'll actually persevere with it.



Technical note: the palette (CRAM) can be updated in four or five different ways on the Mega Drive, and unfortunately some of those ways are things like DMA which will be a bitch to filter (and also probably slow things down a bit). My first approach was to neuter the code that updates the internal 16-bit palette lookup table based on the current CRAM contents, but it never quite worked right and it's hell to debug because it's in assembler. I may persevere with this a bit. My next approach will probably be to take a palette snapshot and force-apply it at the start of every rendered line, but that adds up to 3.5MB/s of writing...
Logged
TerraEsperZ
Hero Member
*****
Offline Offline

Posts: 2225



« Reply #12 on: July 26, 2007, 05:14:58 AM »

Oh, that would be nice! It's been a while since I've hit a stage with a changing palette, but they slow my work considerably since I pretty much have to adjust all the changing colors by hand before pasting every screenshot.



Looks like you just created more work for yourself Cheesy !



---

"With the first link, the chain is forged. The first speech censored, the first thought forbidden, the first freedom denied, chains us all irrevocably." [...] The first time any man's freedom is trodden on, we're all damaged. - Captain Jean-Luc Picard



B*tch, meet reality. Reality, meet b*tch. - Me
Logged

Current project that I really should try to finish:
-Drill Dozer (GBA)
-Sonic 3D Blast (Genesis)
-Naya's Quest (PC)
-Lilly Looking Through (PC)

Pending project:
-A ton of stuff that will never be finished
DarkWolf
Hero Member
*****
Offline Offline

Posts: 621



« Reply #13 on: July 26, 2007, 11:46:28 AM »

I just open the VDP Debug Window and pause the emulation when the colors cycle to the correct position.  The real challenge is games that don't use a palette cycle for animated water, etc.



How about a cheat finder Maxim?
Logged
Maxim
Hero Member
*****
Offline Offline

Posts: 972



« Reply #14 on: July 26, 2007, 03:31:10 PM »

That's hard work, and Kega works fine for that already. It seems you have to tweak its codes a bit when transferring to Gens, though; I'm not sure who's to blame.
Logged
Pages: [1] 2 3 4   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.20 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!