questions about chaos engine/soldiers of fortune graphics

Ask anything your want about Megadrive/Genesis programming.

Moderator: BigEvilCorporation

chaos_theory
Interested
Posts: 15
Joined: Sun Jun 15, 2008 6:47 pm
Location: D-town of us of a

Post by chaos_theory »

notaz wrote:I've tested this on Gens Linux port and it works. You probably placed it in wrong function or in wrong loop.
gensx.cpp you posted before is not related to emulation much, it's just xbox specific code, you don't need to modify it.
ok notaz, i am not trying to sound completely helpless here. lol. yea that cpp file is the gensx.cpp. i noticed that there were other gens.cpp files in my source, which .cpp file did you edit? i beleive mine was something like /source/gens or something to that effect.

hmm, this really should not be hard. i will give this another go today. better beleive it. 8)


CT-
chaos_theory
Interested
Posts: 15
Joined: Sun Jun 15, 2008 6:47 pm
Location: D-town of us of a

Post by chaos_theory »

thanks guys for all your help!! successful compile! plays great. i want to thank everyone for all their help and patience. I am glad to be a member of this gens dev forum!!

you guys rock!!! 8)

CT-
Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef »

chaos_theory wrote:thanks guys for all your help!! successful compile! plays great. i want to thank everyone for all their help and patience. I am glad to be a member of this gens dev forum!!

you guys rock!!! 8)

CT-
gens dev ???
Initially it's a genesis dev forum but i'm glad you finally solved your problem ;)
chaos_theory
Interested
Posts: 15
Joined: Sun Jun 15, 2008 6:47 pm
Location: D-town of us of a

Post by chaos_theory »

Stef wrote:
chaos_theory wrote:thanks guys for all your help!! successful compile! plays great. i want to thank everyone for all their help and patience. I am glad to be a member of this gens dev forum!!

you guys rock!!! 8)

CT-
gens dev ???
Initially it's a genesis dev forum but i'm glad you finally solved your problem ;)
lol i guess thats what i been calling it without realizing it. :lol: and once again i appreciate everyone's help.

i tested the build compiled extensively over the past couple of days and it runs well. The only thing i see is the slowdown from the cpu skipping cycles.

I have another small question to you coders out there...Is there a way to put specific code in the gens.cpp to execute the cpu correctly for this game without using a hack?

notaz you had stated about The best solution would be adding VDP FIFO support to Gens, could you please let me know a little more information about that?? :wink: i would love to try to add that and see how it goes.

Here is ultimately what i want to do. Make a version of neogenesis that runs this game correctly, (the option would be in the menu) dont need help in that area by the way. But make a version which has a special option to change the cpu for that specific game to run the way it needs to without having any cpu slowdown. One thing i wish i could do is look at the source for kega for the particular code for vdp write latency and fifo timing but no source is out for that emu.

Just to let you guys know i am not trying to be greedy, i am very happy to have what i do have, i just want to try to make this emu the best way i can and being low level coder i really do not know too much about genesis emus, its a lot different than my experience with nes emus. I dont need help compiling or what not, so i dont want it to seem like i am asking anyone to do it for me persay.

if i can somehow get this emu to run this game correctly, id say that its just about perfect, only a couple small things here and there. I already adjusted the palette brightness to display correctly from the xbox to the tv since gens was made brighter for monitors. at least thats what i have read and seen from my experimenting and testing. Im at the end of the race and i can see that this is my last hurdle. (bad analogy i know)


CT-
chaos_theory
Interested
Posts: 15
Joined: Sun Jun 15, 2008 6:47 pm
Location: D-town of us of a

Post by chaos_theory »

hey guys, ive been tirelessly trying to hack the rom to make this playable without the graphic glitches, does anyone have any info or could direct me to some documents?

It seems like such a small thing and none of the people doing things for xbox wants to take a look at the code for this small fix, it's in assembly and i dont know anything about going how to add it. I know i could easily get a pc emu, but i really want this on neogenesis for xbox.

sorry to bother you guys but if someone has any additional info or willing to work with me so i could add VDP FIFO support to Gens and learn something from someone, please do let me know.

As always, thanks for putting up with me t and all the advice in the past. :lol: i can be reached on msn joepogo82@hotmail.com

CT-
Eke
Very interested
Posts: 885
Joined: Wed Feb 28, 2007 2:57 pm
Contact:

Post by Eke »

the cheapest solution (not *exactly* accurate but enough to make this game working fine and not breaking others) would be to add some 68 cycles delay if display is ON at the start of the .WR_VRAM routine (in vdp_io.asm)

in pseudo-C code this would be:

Code: Select all

if ((VDP_Status & 8) || !(VDP_Reg.Set_2 & 0x40))
{
   main68k_addCycles(30);
}

maybe something like:

Code: Select all

test byte [VDP_Reg.Set_2], 0x40
jz short .cont
test [VDP_Status], 0x0008
jnz short .cont

mov ecx [Cycles_M68K]
add ecx 30
mov [Cycles_M68K] ecx

.cont
// original code


might do the job (someone will probably correct this since I never really coded in x86 asm ;-) )
AamirM
Very interested
Posts: 472
Joined: Mon Feb 18, 2008 8:23 am
Contact:

Post by AamirM »

Hi,

Code: Select all

test [VDP_Status], 0x0008
Should be

Code: Select all

test [VDP_Status], byte 0x0008
Everything else seems fine.

stay safe,

AamirM
chaos_theory
Interested
Posts: 15
Joined: Sun Jun 15, 2008 6:47 pm
Location: D-town of us of a

Post by chaos_theory »

thanks for all your info, i will give this a try, i don't mean to seem like such a helpless idiot, coding is something i don't excel at, lol. ( i even bought a C++ for dummies last week,) :lol:

i will give this a try and post some results for you. I thank everyone that has took their time out to try to help me. :D

CT-
chaos_theory
Interested
Posts: 15
Joined: Sun Jun 15, 2008 6:47 pm
Location: D-town of us of a

Post by chaos_theory »

Thanks for the bit of code, was tested today and it did work to some extent, now it's just a small amount of "Tearing" in the middle of the screen.

I received a helpful email from someone telling maybe i should patch it with gensplus, but i think theres still an issue with the vdp code being in assem and i think gensplus has its vdp code in C++.

Either way id like to thank everyone again for helping me out, its oh so close to being perfect and without the screen glitches. I thank everyone for their patience.

If anyone has any further tips please feel free to post them here. Happy New Year! :D

:D CT-
Post Reply