Author Topic: Gens KMod modifications for mapping  (Read 81303 times)

0 Members and 1 Guest are viewing this topic.

Offline TerraEsperZ

  • Hero Member
  • *****
  • Posts: 2315
RE: Gens KMod modifications for mapping
« Reply #15 on: August 02, 2007, 09:59:23 pm »
Hey Maxim, do you think there could be an easy way to change the magic pink background color to something else, as in could it be changed by the user? Because in one level of Sonic CD, there is a  color that keeps cycling between three values, two which are used elsewhere on the level, and the third which looks best but has exactly the same RGB value as your pink, so it disappears when I remove it...



---

"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
Current project that are on hold because job burnout :
-Drill Dozer (GBA)
-Sonic 3D Blast (Genesis)
-Naya's Quest (PC)

Offline Maxim

  • Hero Member
  • *****
  • Posts: 974
RE: Gens KMod modifications for mapping
« Reply #16 on: August 03, 2007, 04:07:36 am »
"Magic pink" is normally used in these things because nobody in their right mind would use it in their graphics :) I can try, when I get time - I've literally not had a spare minute in the last few weeks - but until then, try replacing the instances of 1F F8 (that's binary 01111100000011111 for 5-6-5 magic pink, by the way) in the .exe until you find the one that changes it.



I'm sure there's a unique fixed colour I could use that's impossible to be produced by a game, but I'd need to figure out the shadow/highlight operations to understand it. With the 32X added on it gets even harder.

Offline TerraEsperZ

  • Hero Member
  • *****
  • Posts: 2315
RE: Gens KMod modifications for mapping
« Reply #17 on: August 03, 2007, 06:09:52 am »
Sure. I hate asking people to do work just for my benefit, so knowing how to change it myself is more than enough :)



---

"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
Current project that are on hold because job burnout :
-Drill Dozer (GBA)
-Sonic 3D Blast (Genesis)
-Naya's Quest (PC)

Offline Maxim

  • Hero Member
  • *****
  • Posts: 974
RE: Gens KMod modifications for mapping
« Reply #18 on: August 06, 2007, 12:18:15 am »
Configurable colour key version

The readme explains how to make a decimal representation of a 565 or 555 colour, and it defaults to a colour no game can ever use.

Offline TerraEsperZ

  • Hero Member
  • *****
  • Posts: 2315
RE: Gens KMod modifications for mapping
« Reply #19 on: August 06, 2007, 10:39:45 am »
Thanks Maxim! I hadn't counted on you actually doing it since I figured you had better things to spend you time on. I'll be testing it tonight on that problematic Sonic CD map I was working on.



---

"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
Current project that are on hold because job burnout :
-Drill Dozer (GBA)
-Sonic 3D Blast (Genesis)
-Naya's Quest (PC)

Offline Maxim

  • Hero Member
  • *****
  • Posts: 974
RE: Gens KMod modifications for mapping
« Reply #20 on: August 06, 2007, 11:05:58 am »
Well, other things - disabling palette fades, and also trying to disable raster effects - weren't going too well so I knocked out a relatively easy one. Again, it'll be making Gens a bit slower than it was before (memory copy instead of hard-wired constant) but it's hardly noticeable (for me, at least).



It might also have a bugfix for the palette disabling from KMod which I seemed to have broken at some point.

Offline Maxim

  • Hero Member
  • *****
  • Posts: 974
RE: Gens KMod modifications for mapping
« Reply #21 on: December 22, 2007, 04:37:03 pm »
I implemented a new option for the "full-range screenshots". It's to do with how you may the 5-or-6-bit-per-channel to 8. My code was using a slow(ish) integer multiply/divide, like



value = value * 255 / 248



where value is in the range 0..248 and we want it in the range 0..255. But there's another school of thought for these things that says you should instead do the fast bitwise operation



value = value | value >> 3



so we fill in the 3 extension padding bits with the 3 high bits of the same number. The effect is much the same but will differ by (I think) at most 1 from the previous algorithm. This might bother you. Hopefully this will help me match so other emulators' output.



Screenshots:



User posted image - Old Gens

User posted image - Full range - old way

User posted image - Full range - new way



Download

Offline TerraEsperZ

  • Hero Member
  • *****
  • Posts: 2315
RE: Gens KMod modifications for mapping
« Reply #22 on: February 17, 2008, 02:48:52 pm »
By the way Maxim, I never got to try your latest version of Gens KMod until now since I've started mapping Sonic CD again. Being able to change the background color is really saving the whole thing for me :)



I'm not going to use the new color algorithms for now because doing so while in the middle of a project would mean that all the separate sprites and tiles I've saved wouldn't match anymore, but I'll certainly try if I ever try another Genesis game again.



---

"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



Current projects: Mega Man V (GB), Mega Man Zero (GBA), Battletoads (NES), Sonic CD (Sega CD)
Current project that are on hold because job burnout :
-Drill Dozer (GBA)
-Sonic 3D Blast (Genesis)
-Naya's Quest (PC)

Offline Maxim

  • Hero Member
  • *****
  • Posts: 974
RE: Gens KMod modifications for mapping
« Reply #23 on: February 28, 2008, 03:25:41 am »
There's a bug in my "new way" code that is quite obvious if you look at the above examples on a better monitor than the one I use at home, so don't use that option. The "old way" is unaffected. I'll post a fix when I get time. When it's done right (shifts are not 3 bits, they are 5) the results do in fact differ by at most 1 bit per channel from the "old way" and are probably more accurate overall.

Offline ReyVGM

  • Jr. Member
  • **
  • Posts: 78
  • Game Endings Master
RE: Gens KMod modifications for mapping
« Reply #24 on: March 02, 2008, 12:14:21 am »
Hey Maxim, I don't know how good are your skills when it comes to modifying Gens, but is it possible to allow us to change the screenshot key to another one? Or you could you let the user change ALL the emulator keys to wherever they want?


I find the pause key to be very inconveniently placed (ESC), not to mention having to hold SHIFT to take a screenshot is annoying too.


The earlier Gens had the screenshot key mapped just to Backspace. I don't know why the author changed it to holding shift first.


In addition, could you allow us to map the emulator keys to a joystick too?


Having the option of setting the emulator pause on a joystick button would be very much appreciated :)





You are my last hope for these features, because all the other authors from all the Gens versions are either gone or don't care about requests.

Offline Special T

  • Newbie
  • *
  • Posts: 18
RE: Gens KMod modifications for mapping
« Reply #25 on: March 02, 2008, 05:32:57 am »
Why not try Xpadder I have been using it for a while and it works great for me, you can map almost any key to a joypad.



http://xpadder.com/

Offline ReyVGM

  • Jr. Member
  • **
  • Posts: 78
  • Game Endings Master
RE: Gens KMod modifications for mapping
« Reply #26 on: March 02, 2008, 09:09:05 am »
Yeah I have a keyboard to joystick emulator, but it's better if the emulator itself offers such features ;)

Offline Maxim

  • Hero Member
  • *****
  • Posts: 974
RE: Gens KMod modifications for mapping
« Reply #27 on: March 02, 2008, 01:42:52 pm »
Email me (maxim at smspower) on a semi-regular basis to maximise your chances of getting anything done, but realise I have a lot of items on my stuff-to-do backlog.

Offline ReyVGM

  • Jr. Member
  • **
  • Posts: 78
  • Game Endings Master
RE: Gens KMod modifications for mapping
« Reply #28 on: March 02, 2008, 06:26:05 pm »
Haha, ok. I will email you my post so you can see it each time you log in your email and feel bad if you haven't done anything :P

Offline TerraEsperZ

  • Hero Member
  • *****
  • Posts: 2315
RE: Gens KMod modifications for mapping
« Reply #29 on: April 02, 2008, 10:45:43 pm »
Hey Maxim. I certainly don't want to add too much on your plate , but I figured I might as well ask anyway since your coding skills are really impressive and useful.



Do you think it might be possible in any way to prevent some graphical effects from taking place? You've talked about stopping palette changes, but I'm actually thinking about VDP functions, such as  Raster Effect, Shadow/Hightlight,  Pixel/Pixel H Scrolling (where scrolling values are assigned to individual scanlines), Tile/Tile H Scrolling (same thing but with tiles instead of single lines, etc.



I know that would probably require a lot of time and using those might break many, *many* games, so I'm not holding my breath. But in the unlikely event where you felt like doing something like that, I would be very, *very* happy as it would facilitate mapping a great deal. But know that I'm   really grateful for what you've done so far :)



---

"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



Current projects: Sonic CD (Sega CD), Mega Man V (GB), Mega Man Zero (GBA), Battletoads (NES)
Current project that are on hold because job burnout :
-Drill Dozer (GBA)
-Sonic 3D Blast (Genesis)
-Naya's Quest (PC)