Welcome!

Final Burn Neo => FBN Development => Topic started by: Romhack on February 04, 2015, 06:44:59 PM

Title: Romhack's WIP thread
Post by: Romhack on February 04, 2015, 06:44:59 PM
Current:
Qt port


Killer Instinct (I & II):


Planned:
Midway Wolf Unit (UMK3 first  :D):



--------
I've been working on a MIPS III cpu core to emulate Killer Instinct (I really want to see it running on FBA  :smilie: ). I have tried to port cpu from MAME, but have had no success, so I wrote this standalone application to debug my cpu and when it's done I'll port to FBA.
By now it can boot ki-l15d.u98, but doesn't pass disk test, because my ATA IDE driver is very simple at moment. There is still much work to get to the title screen.

http://i.imgur.com/MKBZMDI.png
Title: Re: MIPS III wip (for Killer Instinct)
Post by: dink on February 04, 2015, 06:51:12 PM
Killer!! Looking forward to this one :)
Title: Re: MIPS III wip (for Killer Instinct)
Post by: iq_132 on February 04, 2015, 07:23:51 PM
Holy whoa. Nice work man! If there's anything I can do to help, let me know.
Title: Re: MIPS III wip (for Killer Instinct)
Post by: csmart on February 04, 2015, 08:27:55 PM
Killer Instinct on FBA. Wow hopefully you'll have it running someday.
Title: Re: MIPS III wip (for Killer Instinct)
Post by: Romhack on February 05, 2015, 02:14:06 PM
Thanks guys.
Now with my ATA/IDE driver working (and some runtime patchs on debugger for DCS stuff), it passed disk test, now:

(http://i.imgur.com/CjjijQn.png)
Title: Re: MIPS III wip (for Killer Instinct)
Post by: Ashura-X on February 05, 2015, 02:22:55 PM
Very impressive man! Keep the good work  :biggrin:
Title: Re: MIPS III wip (for Killer Instinct)
Post by: JacKc on February 05, 2015, 04:15:53 PM
Well done Romhack !!!  :smilie:
Title: Re: MIPS III wip (for Killer Instinct)
Post by: Romhack on February 05, 2015, 04:41:03 PM
This is awesome \o/ but very slow :S
For in-game I'll need to implement COP1 (FPU). Inputs are working.

(http://i.imgur.com/fj9ECkl.png)
(http://i.imgur.com/k5pnQg5.png)
(http://i.imgur.com/QcUZn3p.png)
(http://i.imgur.com/Ihm9s5L.png)
(http://i.imgur.com/cmWphD1.png)
(http://i.imgur.com/Xl2Tccq.png)
Title: Re: MIPS III wip (for Killer Instinct)
Post by: Arcadez on February 05, 2015, 04:52:02 PM
@Romhack nice work ive enjoyed reading your progress in this thread
Title: Re: MIPS III wip (for Killer Instinct)
Post by: iq_132 on February 05, 2015, 08:23:05 PM
Rombase how are you dealing with the chd? Have you implemented support for it or are you using an uncompressed raw image?
Also, have you added support for dcs yet? Is this ported from the stand-alone killer instinct emulator or MAME?
Title: Re: MIPS III wip (for Killer Instinct)
Post by: Romhack on February 05, 2015, 08:55:33 PM
I am using uncompressed raw image because the game writes to it. AFAIK mame uses diff for this.
No DCS yet. Actually I don't know how to emulate sound chips and DCS seems to be very complex piece of hardware.
Title: Re: MIPS III wip (for Killer Instinct)
Post by: Romhack on February 06, 2015, 03:05:18 PM
KI II is running :)
(http://i.imgur.com/PcL8fP7.png)(http://i.imgur.com/Q6Alld3.png)
(http://i.imgur.com/LFACZwr.png)(http://i.imgur.com/WXGgFVc.png)
(http://i.imgur.com/5HODAfS.png)(http://i.imgur.com/l9CCCUh.png)
(http://i.imgur.com/0nYNWYn.png)
Title: Re: MIPS III wip (for Killer Instinct)
Post by: iq_132 on February 06, 2015, 04:18:41 PM
Nice!
Title: Re: MIPS III wip (for Killer Instinct)
Post by: kev on February 08, 2015, 06:15:29 AM
That's very cool.
Title: Re: MIPS III wip (for Killer Instinct)
Post by: Freddy on February 08, 2015, 09:46:56 AM
Great! A master piece game! Hope to see soon on FBA!
Thanks 4 your work, Romhack!  ;p
Title: Re: MIPS III wip (for Killer Instinct)
Post by: Haze on February 08, 2015, 01:03:21 PM
KI is basically 100% CPU (it draws to a framebuffer, all rendering is done b y the emulated CPU) so without a recompiler you'll struggle to get a good speed.
Title: Re: MIPS III wip (for Killer Instinct)
Post by: Romhack on February 08, 2015, 09:02:55 PM
I'll try to implement a recompiler, but for FBA this is a challenge, we don't have UML.
I could write an x86/64 recompiler, but this isn't portable :S
---
After some TLB fixes, and FPU emulated:

(http://i.imgur.com/aRMi2Aw.png)(http://i.imgur.com/biWM9sJ.png)
(http://i.imgur.com/nULB8Qt.png)(http://i.imgur.com/S8JWjmJ.png)
(http://i.imgur.com/alQereE.png)(http://i.imgur.com/QLMoz6P.png)
(http://i.imgur.com/cVmKkM0.png)(http://i.imgur.com/OEwNAe3.png)
(http://i.imgur.com/8EFZ0Tm.png)(http://i.imgur.com/nIgrXuJ.png)

KI2 has some bugs in background.
(http://i.imgur.com/v75tnAh.png)(http://i.imgur.com/P16hQGw.png)

KI2 runs faster than KI even with better graphics :O
Title: Re: MIPS III wip (for Killer Instinct)
Post by: Arcadez on February 08, 2015, 09:23:49 PM
@Romhack Lovely Work!!!!
Title: Re: MIPS III wip (for Killer Instinct)
Post by: Sturm on February 14, 2015, 08:59:54 AM
Romhack, your work on FB Alpha is really increasing the magnificence of this great emulator. Congrats. But let me be one these annoying users that are always asking the most hated questions of the emulator scene (hope not get to many "Smites", lol). Since you are working on more recent games (not focus on M68K e Z80) and (perhaps) dealing with some OpenGL instructions, what would the difficult to support games such Sega Model 2 and 3 on FBA, implementing the source code of Model 2 emulator" and "Supermodel", for example? http://www.supermodel3.com/About.html

Regards,
Sturm
Title: Re: MIPS III wip (for Killer Instinct)
Post by: Romhack on February 15, 2015, 10:02:46 PM
Romhack, your work on FB Alpha is really increasing the magnificence of this great emulator. Congrats. But let me be one these annoying users that are always asking the most hated questions of the emulator scene (hope not get to many "Smites", lol). Since you are working on more recent games (not focus on M68K e Z80) and (perhaps) dealing with some OpenGL instructions, what would the difficult to support games such Sega Model 2 and 3 on FBA, implementing the source code of Model 2 emulator" and "Supermodel", for example? http://www.supermodel3.com/About.html

Regards,
Sturm

This is just beyond my skills :(

----
I am writing an x86_64 (SysV ABI) recompiler . It's fun to write, but extremely hard to debug! It has two modes (defined at compile time), first is full recompiler (translate every opcode into x64 code) and second is full fallback where the generated code just calls the interpreted code. I am using std::unordered_map for recompiled block lookups, but with profiling this doesn't seems to be a good use for it.
Title: Re: MIPS III wip (for Killer Instinct)
Post by: Romhack on February 16, 2015, 05:33:07 PM
Test videos:
Killer Instinct I - Interpreter and Dynamic Recompiler
https://www.youtube.com/watch?v=xnJ-iSro-oE

Killer Instinct II  - Interpreter and Dynamic Recompiler
https://www.youtube.com/watch?v=aMsesi_TtyE

Title: Re: MIPS III wip (for Killer Instinct)
Post by: Sturm on February 17, 2015, 11:21:06 PM
That's awesome, Romhack. But please, just let me know. I am not a developer, so forgive me for my silly questions. The x86_64 recompiler that you are writing, will it be useful just for the KI games (what is awesome for itself) or it may be useful for some other games to be ported in the future?
Title: Re: MIPS III wip (for Killer Instinct)
Post by: Romhack on February 18, 2015, 11:16:23 AM
It will be useful for anything that uses MIPS emulator, mainly for those with high clocks, KI has an MIPS R4600 running at 100MHz. IIRC, the highest clock on FBA is 25MHz (CPS-3 with SH2)
Title: Re: MIPS III wip (for Killer Instinct)
Post by: Romhack on February 19, 2015, 01:59:53 PM
First image on FBA \o/
(http://i.imgur.com/thhSewZ.png)
Title: Re: MIPS III wip (for Killer Instinct)
Post by: lantus on February 19, 2015, 05:15:52 PM
hmm might be time to dust off the 360 again. Nice work :)
Title: Re: MIPS III wip (for Killer Instinct)
Post by: Romhack on February 19, 2015, 06:23:43 PM
It works. :biggrin:
(http://i.imgur.com/ezJa4pt.png)
(http://i.imgur.com/vkZQfS1.png)
Title: Re: MIPS III wip (for Killer Instinct)
Post by: dink on February 19, 2015, 06:53:27 PM
Congrats!  Great job :D

best regards,
- dink
Title: Re: MIPS III wip (for Killer Instinct)
Post by: Sturm on February 19, 2015, 07:52:02 PM
"One small step for a developer, one giant leap for FBA." Congrats! :)
Title: Re: MIPS III wip (for Killer Instinct)
Post by: Huggybaby on February 21, 2015, 01:39:59 PM
I think the KI series is the most requested for FBA, and I thought it couldn't be done!
Title: Re: MIPS III wip (for Killer Instinct)
Post by: Romhack on February 22, 2015, 08:48:54 PM
I think the KI series is the most requested for FBA, and I thought it couldn't be done!
Well, I think the MK series is the most requested for FBA, but TMS34010 is a very very very (VERY) complex piece of hardware.

----
KI running on FB Alpha, using dynamic recompiler.
https://www.youtube.com/watch?v=alC_RBiDP94

I hope someday we'll have real 3D hardware emulated on FBA, Killer Instinct uses software rasterizer on a dumb framebuffer :P.
But for now, we need DCS,
I already ported ADSP2100 from MAME (PinMAME) to FBA with adsp21xx_intf, but I don't know if it works...
Title: Re: MIPS III wip (for Killer Instinct)
Post by: Sturm on February 23, 2015, 01:32:04 AM
But talking about the simplest tasks, what are the games that use the MIPS emulator, with high clocks, that can be easily take advantage of the great work done by Romhack?
Title: Re: MIPS III wip (for Killer Instinct)
Post by: dink on February 23, 2015, 04:53:12 AM
Just watched the video - thats friggin' awesome :D  Just need sound now :D
Title: Re: MIPS III wip (for Killer Instinct)
Post by: Haze on February 23, 2015, 11:57:15 AM
But talking about the simplest tasks, what are the games that use the MIPS emulator, with high clocks, that can be easily take advantage of the great work done by Romhack?

Super Real Mahjong Part 5 and Super Eagle Shot Golf might be good FBA targets, both are very close to the type of hardware FBA emulates, but with a MIPS thrown in the mix.

I don't know if FBA does the other ST-0016 (Z80 with integrated gfx + sound) things, but really that's all they are, an ST0016 combined with a MIPS, and some extra video bits.


Title: Re: MIPS III wip (for Killer Instinct)
Post by: barbudreadmon on March 01, 2015, 04:36:32 AM
Pretty nice.
I'm the maintainer of the new libretro port of fba (https://github.com/libretro/libretro-fba), i suppose your dynarec won't support arm devices ? Did you wrote this dynarec from scratch or did you work from an existing one (like mupen64's) ?
Title: Re: MIPS III wip (for Killer Instinct)
Post by: Romhack on March 02, 2015, 05:46:50 PM
Pretty nice.
I'm the maintainer of the new libretro port of fba (https://github.com/libretro/libretro-fba), i suppose your dynarec won't support arm devices ? Did you wrote this dynarec from scratch or did you work from an existing one (like mupen64's) ?
Yes, it won't support arm devices, it's x64 only. In the future maybe I'll write an ARM recompiler (I don't have a testbed for it), but first I need to do this for x86. I wrote this dynarec from scratch, It only does basic optimization like basic block linking (if destiny is already recompiled) and eliminating useless opcodes...
----
I ported ADSP21xx from MAME 0135 (last C version), DCS rom is running but no sound for now...
Title: Re: MIPS III wip (for Killer Instinct)
Post by: Romhack on March 09, 2015, 01:15:19 PM
DCS is now working, actually emitting 3 tones as error message for wrong checksum of u11-l1 :)
Sample rate is hardcoded yet, KI uses 31250Hz.
Title: Re: MIPS III wip (for Killer Instinct)
Post by: Romhack on March 15, 2015, 05:04:21 PM
Sound working :)
https://www.youtube.com/watch?v=WH6D1zDIow4
Title: Re: MIPS III wip (for Killer Instinct)
Post by: Arcadez on March 15, 2015, 06:13:20 PM
Nice job!! games are better with sound  :wink:
Title: Re: MIPS III wip (for Killer Instinct)
Post by: Romhack on March 15, 2015, 07:28:07 PM
Nice job!! games are better with sound  :wink:
Thanks.

Well, it's time for KI II
(http://i.imgur.com/1yq41aM.png)

Title: Re: MIPS III wip (for Killer Instinct)
Post by: dink on March 15, 2015, 07:51:25 PM
Awesome job, Romhack! :)
Title: Re: MIPS III wip (for Killer Instinct)
Post by: iq_132 on March 15, 2015, 10:02:08 PM
Very cool indeed!
Title: Re: Romhack's WIP thread
Post by: Romhack on March 29, 2015, 07:41:26 PM
I am working on a new UI theme with Qt stylesheet:
(http://i.imgur.com/0zDyS1Y.png)
Title: Re: Romhack's WIP thread
Post by: Sturm on March 29, 2015, 09:24:42 PM
Awesome, Romhack!  :cool:
What do you think about a filter by "Year"? Sounds interesting?
Title: Re: Romhack's WIP thread
Post by: Romhack on April 06, 2015, 01:09:44 PM
Awesome, Romhack!  :cool:
What do you think about a filter by "Year"? Sounds interesting?
Filters doesn't work on Qt port yet :S anyway, great suggestion.
---

There's nothing better than writing new CPU core, you know. :p
(http://i.imgur.com/qobyEbP.png)

I can't wait to see some image on screen, but that seems to be far far away yet.
Title: Re: Romhack's WIP thread
Post by: Sturm on April 06, 2015, 05:18:39 PM
TMS34010... I can smell blood in the air... Mortal Kombat blood!  :biggrin:
Title: Re: Romhack's WIP thread
Post by: dink on April 06, 2015, 07:02:00 PM
TMS34020 is what Battle Toads uses, and FBA needs Battle Toads :)  Hopefully a possibility? :D

best regards,
- dink
Title: Re: Romhack's WIP thread
Post by: Romhack on April 07, 2015, 12:14:23 AM
TMS34020 is what Battle Toads uses, and FBA needs Battle Toads :)  Hopefully a possibility? :D

best regards,
- dink
Of course. TMS34020 has more opcodes (40+), MAME only implements 5 and Battletoads runs very well.
There's a lot of great games with TMS34010:

TMS34010 (http://www.mamedb.com/list.php?fuzzy_name=&category=&start_year=&end_year=&manufacturer=&cpu=TMS34010&control=&buttons=&players=&status=&emulation_status=&color_status=&sound+status=&graphic_status=)
TMS34020 (http://www.mamedb.com/list.php?fuzzy_name=&category=&start_year=&end_year=&manufacturer=&cpu=TMS34020&control=&buttons=&players=&status=&emulation_status=&color_status=&sound+status=&graphic_status=)
Title: Re: Romhack's WIP thread
Post by: CaptainCPS on April 07, 2015, 05:06:05 PM
First of all, hiyas everyone!!  :biggrin: I hope everyone is doing alright. I have been watching the progress of FBA through my email (Assembla notifications), even when I was not able to come and participate here as I used to. I am happy that FB Alpha project has continued growing and evolving.

Nice to meet you Romhack and dink, I been following your updates and man! they are awesome :D you guys are great! keep up your great work!

Congrats to everyone (JacKc, iq_132, Barry, dink, Romhack, and company!) on everything that has been implemented to FBA through all this time.

Take care guys!

SeeYa!
 :biggrin:
Title: Re: Romhack's WIP thread
Post by: dink on April 07, 2015, 06:19:07 PM
Hi CaptainCPS, nice to finally meet you :)  FBA is the greatest! :)

best regards,
- dink
Title: Re: Romhack's WIP thread
Post by: Romhack on April 08, 2015, 05:47:50 PM
Thanks and nice to meet you too, CaptainCPS  :biggrin:
----

Well, I think it's time to write some TM34010's video routines, MK3 already writes to these registers (also into DMA registers, MidwayPic, etc...)  ;p
https://bitbucket.org/zxmarcos/tms34010emu/src
Title: Re: Romhack's WIP thread
Post by: iq_132 on April 08, 2015, 08:43:36 PM
Nice to see you again Cap! I would love to see you active again, even just a little bit. :)

I always start to miss people like Jimmy_Page (http://http://neo-source.com/index.php?action=profile;u=12), Ferchogtx (http://http://neo-source.com/index.php?action=profile;u=13), and kenshiro (http://http://neo-source.com/index.php?action=profile;u=469) when I see someone who hasn't been active in a long time.
Title: Re: Romhack's WIP thread
Post by: JacKc on April 09, 2015, 06:38:05 AM
Welcome back Cap!

Like iq said, i will be happy to see you acive again  :smilie:
Title: Re: Romhack's WIP thread
Post by: dink on May 08, 2015, 07:04:58 PM
Romhack, I finally got Killer Instinct running on my PC :) (13 frames/sec on my p4!)
Theres a few problems, though...

in dcs2k.cpp, in Dcs2kRender() it overflows the soundbuffer (causing a crash):
Code: [Select]
    for (int i = 0; i < nSegmentLenght; i++) {
INT16 sample = pSoundBuffer->sample();
pSoundBuf[i * 2 + 0] = sample;
pSoundBuf[i * 2 + 1] = sample;
}
the * 2 should not be there, I think?

also, I get a division by zero crash on line 99:
Code: [Select]
    T sample() {
        int sum = 0;
        for (int x = 0; x < t2h_count; x++)
sum += next();
        return sum / t2h_count;
    }

I changed it to:
Code: [Select]
        return (t2h_count) ? sum / t2h_count : 0; and removed the * 2 from indexing pSoundBuf[].  Now it runs fine, but theres no sound at all.  Ideas? :)

best regards,
- dink
Title: Re: Romhack's WIP thread
Post by: Romhack on May 08, 2015, 08:01:27 PM
Romhack, I finally got Killer Instinct running on my PC :) (13 frames/sec on my p4!)
Theres a few problems, though...

in dcs2k.cpp, in Dcs2kRender() it overflows the soundbuffer (causing a crash):
Code: [Select]
    for (int i = 0; i < nSegmentLenght; i++) {
INT16 sample = pSoundBuffer->sample();
pSoundBuf[i * 2 + 0] = sample;
pSoundBuf[i * 2 + 1] = sample;
}
the * 2 should not be there, I think?
*2 is for stereo pBurnSoundOut (linux default configuration is 22kHz stereo). I don't know if FBA uses stereo sound on windows.

Quote
also, I get a division by zero crash on line 99:
Code: [Select]
    T sample() {
        int sum = 0;
        for (int x = 0; x < t2h_count; x++)
sum += next();
        return sum / t2h_count;
    }

I changed it to:
Code: [Select]
        return (t2h_count) ? sum / t2h_count : 0; and removed the * 2 from indexing pSoundBuf[].  Now it runs fine, but theres no sound at all.  Ideas? :)

best regards,
- dink

The problem is native sample rate of FBA. FBA SampleRate needs to be lower than 31250Hz (KI e KI2 samplerate), look at this code:
Code: [Select]
    void set_host_rate(int freq) {
        host_rate = freq;
        factor = static_cast<double>(host_rate) / static_cast<double>(target_rate);
        unused = target_rate * factor;
        t2h_count = target_rate / unused;
    }
I used a naive approach to downsample from 31250Hz to 22000Hz, It calculates the factor between fba samplerate (host_rate) and driver samplerate (target_rate), then I calculate how many samples it needs to "ignore". t2h_count is just how many samples to skip on driver original sound to match FBA sound output frequency. However, if host_rate < target_rate, then factor is <0, unused is an integer so it's truncated to 0.

Code: [Select]
T sample() {
        int sum = 0;
        for (int x = 0; x < t2h_count; x++)
            sum += next();
        return sum / t2h_count;
    }
It just calculates arithmetic mean of skipped samples, each FBA samples needs t2h_count driver samples  :smilie:.
Title: Re: Romhack's WIP thread
Post by: Barry Harris on May 09, 2015, 12:19:07 PM
Romhack,

I have the KI stuff building in MinGW (GCC4.9) and MSVC 2013 (x86 only).

I'm nearly there with the x64 DRC, but they both MinGW and MSVC are falling over at the same points;

mips3_x64_ew.h (lines 27 and 42, called via the macros)
Code: [Select]
F_ADR(mips3::translate)
and;

mips3_x64.cpp (line 458)
Code: [Select]
mov(rax, (size_t) (void*)f);
MSVC is complaining with the following;

Quote
Compiling src/cpu/mips3/x64/mips3_x64.cpp...
mips3_x64.cpp
d:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(59) : error C2440: 'type cast' : cann
ot convert from 'uint32_t (__cdecl mips::mips3::* )(mips::addr_t,mips::addr_t *)
' to 'void *'
        There is no context in which this conversion is possible
d:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(59) : error C2661: 'Xbyak::CodeGenera
tor::mov' : no overloaded function takes 1 arguments

and;

Quote
Compiling src/cpu/mips3/x64/mips3_x64.cpp...
mips3_x64.cpp
src/cpu/mips3/x64/mips3_x64.cpp(458) : error C2440: 'type cast' : cannot convert
 from 'void (__cdecl mips::mips3::* )(uint32_t)' to 'void *'
        There is no context in which this conversion is possible
src/cpu/mips3/x64/mips3_x64.cpp(458) : error C2661: 'Xbyak::CodeGenerator::mov'
: no overloaded function takes 1 arguments

If I remove the offending code, both GCC and MSVC compile and link fine (but crash on starting the driver).

Any ideas on how to do this in a more compliant, compiler friendly way?

Looks like there are some endian issues to resolve, but I can look at these when we are building ok!
Title: Re: Romhack's WIP thread
Post by: iq_132 on May 09, 2015, 01:53:12 PM
Romhack,

I have the KI stuff building in MinGW (GCC4.9) and MSVC 2013 (x86 only).

I'm nearly there with the x64 DRC, but they both MinGW and MSVC are falling over at the same points;

mips3_x64_ew.h (lines 27 and 42, called via the macros)
Code: [Select]
F_ADR(mips3::translate)
and;

mips3_x64.cpp (line 458)
Code: [Select]
mov(rax, (size_t) (void*)f);
MSVC is complaining with the following;

and;

If I remove the offending code, both GCC and MSVC compile and link fine (but crash on starting the driver).

Any ideas on how to do this in a more compliant, compiler friendly way?

Looks like there are some endian issues to resolve, but I can look at these when we are building ok!

Can you create a trampoline function that is void ?
Title: Re: Romhack's WIP thread
Post by: Romhack on May 09, 2015, 07:05:43 PM
Can you create a trampoline function that is void ?

I did not know but we can't take address of a member function on C++ standard  :eek: https://isocpp.org/wiki/faq/pointers-to-members#cant-cvt-memfnptr-to-voidptr (https://isocpp.org/wiki/faq/pointers-to-members#cant-cvt-memfnptr-to-voidptr).

I'm thinking of turning this code:
Code: [Select]
class cpu {
    int reg;
    void inc(uint32_t opcode) {
        reg++;
    }
}

into:

Code: [Select]
class cpu {
    int reg;
    static inline void add(cpu *p, uint32_t opcode) {
        p->reg++;
    }
}
Dolphin uses this style.


With MSVC, there's another issue: the ABI, current calling ABI (used on mips3_x64::fallback and mips3_x64_rw.h) is SysV AMD64: http://en.wikipedia.org/wiki/X86_calling_conventions (http://en.wikipedia.org/wiki/X86_calling_conventions).

Title: Re: Romhack's WIP thread
Post by: Barry Harris on May 12, 2015, 12:51:51 PM
I have x64 building with GCC now - but it crashes at driver start. GDB gives;

Code: [Select]
Program received signal SIGSEGV, Segmentation fault.
0x000000000101a92c in mips::mips3::tlb_translate(unsigned long long) ()
(gdb) bt
#0  0x000000000101a92c in mips::mips3::tlb_translate(unsigned long long) ()
#1  0x0000000007b09ec0 in ?? ()
#2  0x000000000022e768 in ?? ()
#3  0x8b4d07a85610bf41 in ?? ()
#4  0x0000000001078481 in std::__detail::_Map_base<unsigned long long, std::pair<unsigned long long const, void*>, std::allocator<std::pair<unsigned long long const, void*> >, std::__detail::_Select1st, std::equal_to<unsigned long long>, std::hash<unsigned long long>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true>, true>::operator[](unsigned long long const&) ()
#5  0x000000000022e7d0 in ?? ()
#6  0x0000000000eb2e09 in mips::mips3::translate(unsigned long long, unsigned long long*) ()
#7  0x000000000ec218c4 in ?? ()
#8  0x00000000000018c4 in ?? ()
#9  0x0000000007a85250 in ?? ()
#10 0x0000000007a84990 in ?? ()
#11 0x0000000007a84ab0 in ?? ()
#12 0x0000000000eb09cc in mips::mips3::SW(unsigned int) ()
#13 0x000000000ec218c4 in ?? ()
#14 0x00000000000018c4 in ?? ()
#15 0x000000000022e7f0 in ?? ()
#16 0x0000000000000004 in ?? ()
#17 0xffffffffbfc003cc in ?? ()
#18 0x00000000000018c4 in ?? ()
#19 0x000000000022e810 in ?? ()
#20 0x000000000ec2192e in ?? ()
#21 0x000000000ec218c4 in ?? ()
#22 0x000000000ec218c4 in ?? ()
#23 0x0000000000000000 in ?? ()
(gdb)

Any ideas?
Title: Re: Romhack's WIP thread
Post by: Romhack on May 12, 2015, 06:41:05 PM
Just ABI problems. Replace prolog, epilog and fallback functions on mips3_x64.cpp to:


mips3_x64::fallback()
Code: [Select]
void mips3_x64::fallback(uint32_t opcode, void (mips3::*f)(uint32_t))
{
#ifdef _WIN32
    // WIN64 ABI - MICROSOFT
    mov(rcx, (size_t) m_core);
    mov(edx, opcode);
#else
    // SysV AMD64 ABI - GNU
    mov(rdi, (size_t) m_core);
    mov(esi, opcode);
#endif
    mov(rax, (size_t) (void*)f);
    call(rax);
}


mips3_x64::prolog()
Code: [Select]
void mips3_x64::prolog()
{
    // R15 = cycle counter
    // RBX = cpu_state base
    push(rbp);
    push(rbx);
#ifdef _WIN32
    push(rsi);
    push(rdi);
#endif
    push(r15);
    mov(rbp, rsp);
    sub(rsp, 16);
    mov(rbx, ADR(m_core->m_state));
    mov(r15, ADR(m_icounter));
    mov(r15, ptr[r15]);

    check_icounter();
}

mips3_x64::epilog(bool do_ret)
Code: [Select]
void mips3_x64::epilog(bool do_ret)
{
    add(rsp, 16);
    mov(rax, ADR(m_icounter));
    mov(ptr[rax], r15);
    pop(r15);
#if _WIN32
    pop(rdi);
    pop(rsi);
#endif
    pop(rbx);
    pop(rbp);
    if (do_ret)
        ret();
}


Now it's running. I need to rewrite functions in mips3_x64_rw.h (even on linux they are disabled).
Title: Re: Romhack's WIP thread
Post by: Barry Harris on May 12, 2015, 07:15:30 PM
Thanks Romhack - MinGW64 is now running without crashing.

If we could just fix the compile errors for MSVC x64 we'd be sorted for building.
Title: Re: Romhack's WIP thread
Post by: Romhack on May 12, 2015, 07:53:41 PM
Please try this on MSVC:

Code: [Select]
void mips3_x64::fallback(uint32_t opcode, void (mips3::*f)(uint32_t))
{
    ...
    mov(rax, (size_t) ((void*&)f));
    call(rax);
}

And change F_ADR to:
Code: [Select]
#define F_ADR(f)    ((size_t)((void*&)&f))
Title: Re: Romhack's WIP thread
Post by: Barry Harris on May 12, 2015, 08:14:23 PM
Please try this on MSVC:

Code: [Select]
void mips3_x64::fallback(uint32_t opcode, void (mips3::*f)(uint32_t))
{
    ...
    mov(rax, (size_t) ((void*&)f));
    call(rax);
}

And change F_ADR to:
Code: [Select]
#define F_ADR(f)    ((size_t)((void*&)&f))

No dice.

Code: [Select]
Compiling src/cpu/mips3/x64/mips3_x64.cpp...
mips3_x64.cpp
d:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(59) : error C2102: '&' requires l-val
ue
d:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(59) : error C2661: 'Xbyak::CodeGenera
tor::mov' : no overloaded function takes 1 arguments
d:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(62) : error C2102: '&' requires l-val
ue
d:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(69) : error C2102: '&' requires l-val
ue
d:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(69) : error C2661: 'Xbyak::CodeGenera
tor::mov' : no overloaded function takes 1 arguments
d:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(72) : error C2102: '&' requires l-val
ue
d:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(79) : error C2102: '&' requires l-val
ue
d:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(79) : error C2661: 'Xbyak::CodeGenera
tor::mov' : no overloaded function takes 1 arguments
d:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(82) : error C2102: '&' requires l-val
ue
d:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(89) : error C2102: '&' requires l-val
ue
d:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(89) : error C2661: 'Xbyak::CodeGenera
tor::mov' : no overloaded function takes 1 arguments
d:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(92) : error C2102: '&' requires l-val
ue
d:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(113) : error C2102: '&' requires l-va
lue
d:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(113) : error C2661: 'Xbyak::CodeGener
ator::mov' : no overloaded function takes 1 arguments
d:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(130) : error C2102: '&' requires l-va
lue
d:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(153) : error C2102: '&' requires l-va
lue
d:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(153) : error C2661: 'Xbyak::CodeGener
ator::mov' : no overloaded function takes 1 arguments
d:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(170) : error C2102: '&' requires l-va
lue
d:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(194) : error C2102: '&' requires l-va
lue
d:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(194) : error C2661: 'Xbyak::CodeGener
ator::mov' : no overloaded function takes 1 arguments
d:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(211) : error C2102: '&' requires l-va
lue
d:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(247) : error C2102: '&' requires l-va
lue
d:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(247) : error C2661: 'Xbyak::CodeGener
ator::mov' : no overloaded function takes 1 arguments
d:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(264) : error C2102: '&' requires l-va
lue
d:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(285) : error C2102: '&' requires l-va
lue
d:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(285) : error C2661: 'Xbyak::CodeGener
ator::mov' : no overloaded function takes 1 arguments
d:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(287) : error C2102: '&' requires l-va
lue
d:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(298) : error C2102: '&' requires l-va
lue
d:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(298) : error C2661: 'Xbyak::CodeGener
ator::mov' : no overloaded function takes 1 arguments
d:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(300) : error C2102: '&' requires l-va
lue
d:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(310) : error C2102: '&' requires l-va
lue
d:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(310) : error C2661: 'Xbyak::CodeGener
ator::mov' : no overloaded function takes 1 arguments
d:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(312) : error C2102: '&' requires l-va
lue
d:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(339) : error C2102: '&' requires l-va
lue
d:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(339) : error C2661: 'Xbyak::CodeGener
ator::mov' : no overloaded function takes 1 arguments
d:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(341) : error C2102: '&' requires l-va
lue
d:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(353) : error C2102: '&' requires l-va
lue
d:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(353) : error C2661: 'Xbyak::CodeGener
ator::mov' : no overloaded function takes 1 arguments
d:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(355) : error C2102: '&' requires l-va
lue
d:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(366) : error C2102: '&' requires l-va
lue
d:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(366) : error C2661: 'Xbyak::CodeGener
ator::mov' : no overloaded function takes 1 arguments
d:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(368) : error C2102: '&' requires l-va
lue
d:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(380) : error C2102: '&' requires l-va
lue
d:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(380) : error C2661: 'Xbyak::CodeGener
ator::mov' : no overloaded function takes 1 arguments
d:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(382) : error C2102: '&' requires l-va
lue
mingw32-make[1]: *** [mips3_x64.o] Error 2
mingw32-make: *** [vc] Error 2
Title: Re: Romhack's WIP thread
Post by: Romhack on May 13, 2015, 02:20:53 PM
Okay, try this:
Code: [Select]
template<class C, class R, typename...Args>
inline size_t get_method_addr(R (C::*f)(Args...)) {
return reinterpret_cast<size_t>((void* &)f);
}

#define F_ADR(x) get_method_addr(&x)

----
EDIT:
I compiled drc with msvc, but MinGW binary is a lot faster than MSVC one   :eek:
I need to do some profiling.

Title: Re: Romhack's WIP thread
Post by: dink on May 14, 2015, 06:44:09 PM
Suggestion: proper fail / error message for missing hdd/kinst*.img in d_kinst

best regards,
- dink
Title: Re: Romhack's WIP thread
Post by: Barry Harris on May 15, 2015, 06:11:38 PM
Okay, try this:
Code: [Select]
template<class C, class R, typename...Args>
inline size_t get_method_addr(R (C::*f)(Args...)) {
return reinterpret_cast<size_t>((void* &)f);
}

#define F_ADR(x) get_method_addr(&x)

----
EDIT:
I compiled drc with msvc, but MinGW binary is a lot faster than MSVC one   :eek:
I need to do some profiling.

Nice work. I commited a fix for MSVC 2013.

Looks like the first Killer Instinct bombs out pretty early on in MSVC x64 as well as being slow.
Title: Re: Romhack's WIP thread
Post by: SeiferAlmasy on July 25, 2015, 10:21:48 PM
If FBA is compiled in DEBUG mode, some snes game appears and possible to play it, (but no sound)

I look the source code, and have one called d_kinst.cpp here, i try to execute fba.exe kinst, ki, and others but not work, why?
Title: Re: Romhack's WIP thread
Post by: Romhack on October 18, 2015, 08:41:07 PM
I am working again on TMS34010 emulator, I rewrote everything from scratch because it was completely broken by design (using 64bit memory reads when all access to memory needs to be 16bit), no opcode table for decoder, etc... I can't wait to see some image on screen, but it is very very far at this point.
Title: Re: Romhack's WIP thread
Post by: dink on October 18, 2015, 10:54:09 PM
Hi Romhack, its good to hear from you again -
Best of luck on your TMS34010 emu!  :smilie:

best regards,
- dink
Title: Re: Romhack's WIP thread
Post by: Romhack on October 20, 2015, 11:59:32 AM
Thanks dink :D

After a rudimentary implementation of opcode PIXBLT B,XY...
(http://i.imgur.com/SqsbRh8.png)
(http://i.imgur.com/Q7q2dBI.png)
Title: Re: Romhack's WIP thread
Post by: dink on October 20, 2015, 06:05:32 PM
Looks good so far! :D
Title: Re: Romhack's WIP thread
Post by: Arcadez on October 21, 2015, 11:56:15 AM
@Romhack it's getting there good work man
Title: Re: Romhack's WIP thread
Post by: Romhack on October 22, 2015, 02:19:32 PM
Some progress with Rampage, I'll try to implement inputs do pass this screen.
(http://i.imgur.com/z08amZp.png)
Title: Re: Romhack's WIP thread
Post by: dink on October 23, 2015, 08:20:27 AM
very nice :) I can't wait to see the title screen!
Title: Re: Romhack's WIP thread
Post by: Gab75 on October 24, 2015, 04:20:01 AM
Without doubt the TMS34010 core implementation will be a great addition to FBA! I hope it will be used to emulate all related Midway/Williams hardwares (as well as "Wolf unit" also "T unit", "Y unit" and "Z unit")...  :wink:
Title: Re: Romhack's WIP thread
Post by: dink on October 24, 2015, 10:07:22 AM
Without doubt the TMS34010 core implementation will be a great addition to FBA! I hope it will be used to emulate all related Midway/Williams hardwares (as well as "Wolf unit" also "T unit", "Y unit" and "Z unit")...  :wink:

hey, slow down buddy.
Title: Re: Romhack's WIP thread
Post by: Gab75 on October 24, 2015, 11:54:36 AM
hey, slow down buddy.

Obviously a long-term wish!  :p
Title: Re: Romhack's WIP thread
Post by: Romhack on October 24, 2015, 02:45:23 PM
After Ctrl+C, Ctrl+V from mame's DMA-blitter (video/midtunit.c).

Title: Re: Romhack's WIP thread
Post by: Arcadez on October 24, 2015, 03:45:33 PM
Nice progress to get something on screen BTW that looks like Raiden..???
Title: Re: Romhack's WIP thread
Post by: Romhack on October 24, 2015, 04:03:27 PM
This looks much better. I just need to figure out how to fix colors '-'
Title: Re: Romhack's WIP thread
Post by: dink on October 24, 2015, 09:17:37 PM
looking good :)
Title: Re: Romhack's WIP thread
Post by: Gab75 on October 25, 2015, 01:19:59 AM
Nice... everything is beginning to "take shape" !  :smilie:
Title: Re: Romhack's WIP thread
Post by: Romhack on October 25, 2015, 06:59:33 AM
Colors are 16bit indexed  :biggrin:
Title: Re: Romhack's WIP thread
Post by: dink on October 25, 2015, 09:35:56 AM
awesome! :)
Title: Re: Romhack's WIP thread
Post by: Arcadez on October 25, 2015, 09:43:59 AM
Fantastico!!!
Title: Re: Romhack's WIP thread
Post by: Romhack on October 25, 2015, 06:47:21 PM
Trying T-Unit


All games freeze before title screen :(
Title: Re: Romhack's WIP thread
Post by: dink on October 25, 2015, 07:25:02 PM
Maybe its dip/input related - Something stuck that shouldn't be?
Title: Re: Romhack's WIP thread
Post by: Romhack on October 25, 2015, 10:19:06 PM
Maybe its dip/input related - Something stuck that shouldn't be?
MK3 is disabling interrupts (maybe it's a bad timing problem), forcing IRQs manually works when game stuck.
Title: Re: Romhack's WIP thread
Post by: dink on October 25, 2015, 10:36:07 PM
Nice job buddy!! pure genius :)
Maybe we can hack the game to dispense dollar bills? ;)

best regards,
- dink
Title: Re: Romhack's WIP thread
Post by: Gab75 on October 26, 2015, 01:33:16 AM
Wonderful, you're making progress one after the other!  :smilie:
Title: Re: Romhack's WIP thread
Post by: Arcadez on October 26, 2015, 10:26:16 AM
@Romhack all i can say is Magnifico!!! :D
Title: Re: Romhack's WIP thread
Post by: iq_132 on October 26, 2015, 11:06:35 AM
Is this in assembly or c?
Title: Re: Romhack's WIP thread
Post by: Romhack on October 26, 2015, 11:13:33 AM
It's C++. Code is here: https://bitbucket.org/zxmarcos/tmsemu/
Title: Re: Romhack's WIP thread
Post by: iq_132 on October 26, 2015, 11:30:55 AM
It's C++. Code is here: https://bitbucket.org/zxmarcos/tmsemu/
Oh good! I was hoping it would be portable. Thanks. :)
Title: Re: Romhack's WIP thread
Post by: Romhack on October 26, 2015, 03:57:30 PM
It will be easily ported to FBA when it's ready  :smilie:.
I like to write standalone emulators first because I can have a full featured debugger to find bugs :D Debugging new core on FBA is really hard.
Title: Re: Romhack's WIP thread
Post by: Romhack on October 27, 2015, 11:35:02 AM
I fixed the IRQ problem, it was a bugtypo in a opcode that change processor status.
(http://i.imgur.com/bfYLsHx.png)(http://i.imgur.com/sSnBXMV.png)
(http://i.imgur.com/NnOFAzg.png)(http://i.imgur.com/41SFhf7.png)
(http://i.imgur.com/QHyulxD.png)

T-Unit
(http://i.imgur.com/OyP0bNz.png)
(http://i.imgur.com/dMz5mS5.png)

The game isn't clearing the screen before drawing... probably my implementation of FILL XY.
The game also refuses to accept coins, but on test menu it works fine  :S
Title: Re: Romhack's WIP thread
Post by: Romhack on October 27, 2015, 03:50:12 PM
The game is now playable! the problem with coins was wrong cmos read handler.
(http://i.imgur.com/Q1SNNeH.png)(http://i.imgur.com/oYfTg4A.png)
(http://i.imgur.com/JAiIhFF.png)(http://i.imgur.com/krJcEDS.png)
(http://i.imgur.com/3VNTO3m.png)
Title: Re: Romhack's WIP thread
Post by: dink on October 27, 2015, 04:35:47 PM
Niiice!  How about Battle Toads?
Title: Re: Romhack's WIP thread
Post by: Romhack on October 28, 2015, 09:44:26 AM
Niiice!  How about Battle Toads?
I definitely should give it a try, but atm I'm focusing on W/T-Unit because they are simpler.
btoads has a more complex video hardware.
Title: Re: Romhack's WIP thread
Post by: Arcadez on October 28, 2015, 03:38:49 PM
I definitely should give it a try, but atm I'm focusing on W/T-Unit because they are simpler.
btoads has a more complex video hardware.

The Midway Y Unit Driver has some nice games more classics at any rate certainly worth considering
Title: Re: Romhack's WIP thread
Post by: iq_132 on October 28, 2015, 03:50:49 PM
Sheesh! Let the poor man finish what he's working on first! Excellent work Romhack. :)
Title: Re: Romhack's WIP thread
Post by: Gab75 on October 28, 2015, 04:39:34 PM
Niiice!  How about Battle Toads?

Battle Toads should use a TMS34020 as main CPU... this microprocessor should have an enhanced instruction set compared to the TMS34010 (though I could be wrong).
Title: Re: Romhack's WIP thread
Post by: Romhack on October 28, 2015, 06:38:11 PM
Battle Toads should use a TMS34020 as main CPU... this microprocessor should have an enhanced instruction set compared to the TMS34010 (though I could be wrong).
True, it has more 40 opcodes, however MAME implements only 5 of them. not a big deal. Opcodes implemented: https://docs.google.com/spreadsheets/d/1htNoyDN9m4psQpyl7AtJJxAdcPlzQDZ4aek6GaZ3LqQ/edit?usp=sharing

I think the hardest problem with this processor family is the graphics operations,  there are 10 operations, but they are very customizable like raster operations, etc.
Title: Re: Romhack's WIP thread
Post by: Gab75 on October 29, 2015, 02:07:10 AM
I think the hardest problem with this processor family is the graphics operations,  there are 10 operations, but they are very customizable like raster operations, etc.

They should be the first processors which include graphics oriented instructions, a kind of "pioneers-ancestors" for the current GPUs...

I'm looking forward to see the TMS340x0 processors emulated by FBA, but, obviously, there is no hurry... you're doing an excellent work, thanks a lot! :)
Title: Re: Romhack's WIP thread
Post by: Romhack on October 29, 2015, 02:55:56 PM
Well...  :biggrin:
(http://i.imgur.com/PBDhV8i.png)
Title: Re: Romhack's WIP thread
Post by: Arcadez on October 29, 2015, 04:12:19 PM
Well...  :biggrin:
(http://i.imgur.com/PBDhV8i.png)

In a Mortal Kombat like voice all i can say is Flawless Victory ;)
Title: Re: Romhack's WIP thread
Post by: csmart on October 29, 2015, 09:16:37 PM
Great job Rom Hack
Title: Re: Romhack's WIP thread
Post by: Sturm on October 29, 2015, 11:25:48 PM
Quote from: Shang Tsung link=https://www.youtube.com/watch?v=5reTrUCxMbU&t=0m9s
Now, release the new FBA and let the Mortal Kombat begin!
Title: Re: Romhack's WIP thread
Post by: samo79 on October 29, 2015, 11:52:31 PM
Well...  :biggrin:
(http://i.imgur.com/PBDhV8i.png)

Wow that's what i can say ... simply awesome !
Looking forward for the first 2 episodes too, having all 3 episodes of Mortal Kombat running under FBA will be a real dream come true  :-)
Title: Re: Romhack's WIP thread
Post by: Romhack on October 30, 2015, 07:44:30 AM
Calm down  :smilie:. The driver is in pre-alpha state yet.
Title: Re: Romhack's WIP thread
Post by: Romhack on November 11, 2015, 08:07:18 AM
After implementation of VRAM bulk initialization (VRAM -> ShiftRegister):
(http://i.imgur.com/Es7SXDg.png)
(http://i.imgur.com/tgHLHYE.png)
(http://i.imgur.com/xIkHFJq.png)
(http://i.imgur.com/vV0qEA6.png)
(http://i.imgur.com/s4tZNdB.png)

I don't know why BG isn't being rendered, the video routines is ported direct from MAME without any modifications....
There is some obscure bug on cpu core that I can't find, collisions in game only works on throws movements.
Title: Re: Romhack's WIP thread
Post by: Romhack on November 11, 2015, 08:30:41 PM
I found the nasty bug!!!  And now...

(http://i.imgur.com/myNzH9s.png)

MK2 no damage (another bug  :p)
(http://i.imgur.com/BX6Bqvf.png)
(http://i.imgur.com/iaaceeV.png)
(http://i.imgur.com/7qA8Ui8.png)
(http://i.imgur.com/E24f8lT.png)
(http://i.imgur.com/IsjiZUD.png)

NBA HT a little bit more correct...
(http://i.imgur.com/HQ1o2XB.png)

Rampage is working well.
(http://i.imgur.com/xaKQK3p.png)
(http://i.imgur.com/fRpTQme.png)
(http://i.imgur.com/sCeEuRd.png)
(http://i.imgur.com/mu94KDs.png)
(http://i.imgur.com/bfudRM8.png)
Title: Re: Romhack's WIP thread
Post by: dink on November 11, 2015, 10:59:42 PM
Niiiicee!!!!
Title: Re: Romhack's WIP thread
Post by: Gab75 on November 12, 2015, 12:43:27 AM
Wonderful... you have achieved so much in such a short time! :)
Title: Re: Romhack's WIP thread
Post by: samo79 on November 12, 2015, 04:55:53 AM
Outstanding !  :cool:
Title: Re: Romhack's WIP thread
Post by: Romhack on November 12, 2015, 01:35:37 PM
I will make some tests with DCS that already exists in FBA (for Killer Instinct), the mais problem is that I don't know how FBA sound cores does downsampling. ATM resampling code is very buggy and only works when DCS sample rate > FBA sample rate.
Title: Re: Romhack's WIP thread
Post by: Romhack on November 13, 2015, 07:30:39 AM
UMK3 running on FBA, there's strange glitch on FBA driver with VRAM Bulk Initialization.

https://www.youtube.com/watch?v=6qXnxHzfSl8
Title: Re: Romhack's WIP thread
Post by: Romhack on November 15, 2015, 04:26:58 PM
With dink's help:
https://www.youtube.com/watch?v=7pGiYipZzUU
Title: Re: Romhack's WIP thread
Post by: Arcadez on November 15, 2015, 05:16:54 PM
Top class job guys!!!
Title: Re: Romhack's WIP thread
Post by: Romhack on November 17, 2015, 11:31:43 AM
Wow great progress with this.  Excuse my ignorance but does the work you have done on the TMS34010 CPU core driver mean 'Trog' is a possibility in future?

I am assuming there is still a chunk of work involved but is the plan to add other TMS34010 games?

Yes, Midway Z/W/Y are very similar, only sound hardware are very different.
ATM I am focusing on W-Unit because the TMS34010 CPU core still has bugs and they are hard to find. While I don't fix them, I can't move to another midway unit.
I also need to rewrite DCS code to W-Unit, and IMHO sound emulation is much harder than CPU emulation  :p
Title: Re: Romhack's WIP thread
Post by: Gab75 on January 24, 2016, 01:40:01 AM
Hi Romhack,
are there news about your TMS34010 core emulation? :)
Title: Re: Romhack's WIP thread
Post by: Romhack on January 25, 2016, 04:10:25 PM
I'm stuck on a silly bug :S

MAME:
(http://i.imgur.com/KVtQNm5.png)

FBA:
(http://i.imgur.com/r7NayZT.png)

 :redface:
Title: Re: Romhack's WIP thread
Post by: Gab75 on January 26, 2016, 10:41:15 AM
I'm stuck on a silly bug :S

I hope you will be able to fix the bug soon! :)
Title: Re: Romhack's WIP thread
Post by: marvirrasta on January 27, 2016, 02:28:39 PM
good stuff romhack you are a guy from brazil who upload videos?
Title: Re: Romhack's WIP thread
Post by: Romhack on January 27, 2016, 09:46:12 PM
good stuff romhack you are a guy from brazil who upload videos?
Sim.
Title: Re: Romhack's WIP thread
Post by: Combone on January 29, 2016, 02:28:28 PM

Awesome Romhack  :cool:

Excellent work  :smilie:
Title: Re: Romhack's WIP thread
Post by: isamu on March 17, 2016, 11:23:05 AM
I just wanted to say Romhack you are the MAN!!! Thank you so much for FINALLY, AFTER ALL THESE YEARS.......porting the Wolf Unit Driver to FBA, consequently the MK games. You have made a lot of us MK fans very happy.

How is progress going on the driver at this point? Since it's been almost two months since your last post I figured I'd just ask out of curiosity. Have you been able to squash the last remaining bugs in the MK games?
Title: Re: Romhack's WIP thread
Post by: Gab75 on March 20, 2016, 02:41:53 AM
How is progress going on the driver at this point? Since it's been almost two months since your last post I figured I'd just ask out of curiosity. Have you been able to squash the last remaining bugs in the MK games?

Obviously I can't say for sure, but you need to consider that, in addition to the TMS34010 CPU core, there is also the ADSP2105 core (the microprocessor for the audio sub-system), so, probably, there's still much work to be done... we need to be patient and to thank Romhack for the work he's doing! :)

PS: apart from the MK games, there are many other interesting titles related to the TMS34010 CPU, like the little known Art & Magic's games (Cheese Chase, Stone Ball and Ultimate Tennis).
Title: Re: Romhack's WIP thread
Post by: marvirrasta on April 19, 2016, 12:31:23 AM
I dont know why, there is alot of expectation about the official Ultimate Mortal Kombat 3 for Sega to be officialy released on fightcade. Arcade is 10 times better. Imagine if they release the arcade games  :biggrin:
Title: Re: Romhack's WIP thread
Post by: isamu on May 05, 2016, 11:35:12 AM
Thanks for the reply guys. GO ROMHACK!!!  :biggrin:
Title: Re: Romhack's WIP thread
Post by: Combone on May 08, 2016, 07:39:11 PM

Hi Romhack.

Possible put/port your Taito Type X Monitor inside of Final Burn Alpha?.

Test it please ^^...2D games looks better in FBA.

Thanks :)
Title: Re: Romhack's WIP thread
Post by: marvirrasta on July 09, 2016, 12:27:22 AM
I saw this at MKsecrets.net. Don't know if it is real or not. And If it is related to that project, prototype project or noone.

(http://i.imgur.com/9EazcIp.png)
Title: Re: Romhack's WIP thread
Post by: Gab75 on July 09, 2016, 06:29:51 AM
As far as I know, the FB Alpha "Midway Wolf Unit" emulation is still in the preliminary stage... in any case Romhack should be able to give a better answer! :)
Title: Re: Romhack's WIP thread
Post by: dink on July 09, 2016, 08:39:03 AM
The game works fine in the debug version of fba except for sounds/music in the debug version.  If you'd like to try it, compile the debug version.
Title: Re: Romhack's WIP thread
Post by: Combone on November 16, 2016, 05:46:48 PM
Any progress in Midway Wolf Unity and Killer Instinct  :S ?.
Title: Re: Romhack's WIP thread
Post by: Romhack on November 17, 2016, 05:17:15 PM
Any progress in Midway Wolf Unity and Killer Instinct  :S ?.
I did a full review (opcode by opcode) of TMS34010 and did not find anything wrong :S DCS refuses to work on WUnit.  :redface:
So, I'm now working on KI again. KI driver needs a proper CHD reader.
Title: Re: Romhack's WIP thread
Post by: Combone on November 17, 2016, 05:39:17 PM
I did a full review (opcode by opcode) of TMS34010 and did not find anything wrong :S DCS refuses to work on WUnit.  :redface:
So, I'm now working on KI again. KI driver needs a proper CHD reader.

Ok :( Good Luck/Work in CHD reader :)
Title: Re: Romhack's WIP thread
Post by: dink on November 17, 2016, 08:49:35 PM
Possible put PlayStation/Nintendo 64 (MESS/UME/MAME Emulator) in FBA  :S ?

I think its an insult to even ask such a thing...
Title: Re: Romhack's WIP thread
Post by: Combone on November 17, 2016, 10:25:41 PM
I think its an insult to even ask such a thing...

Ok deleted T_T

Sorry  :redface: without intention.
Title: Re: Romhack's WIP thread
Post by: Gab75 on November 18, 2016, 01:13:13 AM
I did a full review (opcode by opcode) of TMS34010 and did not find anything wrong :S DCS refuses to work on WUnit.  :redface:

So, no sound for Midway Wolf Unit games... when and if you have time, you could try with Midway T Unit and Y Unit games, they should have a different audio sub-system ("more conventional")... in any case, thanks a lot for your work! :)

Title: Re: Romhack's WIP thread
Post by: barbudreadmon on November 18, 2016, 05:34:20 AM
I think its an insult to even ask such a thing...
By the way, i had a discussion with someone about how you choose the systems you add, and i was unable to answer properly because i didn't find any information on the website, so could you confirm :
- FBA is 2D only (and "false 3D" in games like Killer Instinct) ?
- You add consoles only if you have cpu/spu/gpu already emulated for an arcade system ?

On a side note, N64 is a mess to emulate, i think the best emulator for that right now is libretro-parallel (http://www.libretro.com/index.php/nintendo-64-vulkan-low-level-emulator-parallel-pre-alpha-release/), it is far from perfect and need vulkan to run.
Title: Re: Romhack's WIP thread
Post by: dink on November 18, 2016, 08:17:03 AM
By the way, i had a discussion with someone about how you choose the systems you add, and i was unable to answer properly because i didn't find any information on the website, so could you confirm :
- FBA is 2D only (and "false 3D" in games like Killer Instinct) ?
- You add consoles only if you have cpu/spu/gpu already emulated for an arcade system ?

Yea, those are the 2 main points, of course.  Then there's personal favorites and/or stuff  the driver writer always wanted to add, which naturally get a little more effort thrown at them.  I probably wont add anymore consoles/computers, but super cassette vision is on the maybe list.

best regards,
- dink
Title: Re: Romhack's WIP thread
Post by: synnchan on November 18, 2016, 04:49:38 PM
Yea, those are the 2 main points, of course.  Then there's personal favorites and/or stuff  the driver writer always wanted to add, which naturally get a little more effort thrown at them.  I probably wont add anymore consoles/computers, but super cassette vision is on the maybe list.

best regards,
- dink

I'm not very familiar with Super Cassette Vision, but looking at some game screenshots, it seems to be an interesting second generation system. :)
Title: Re: Romhack's WIP thread
Post by: Gab75 on November 19, 2016, 01:13:14 AM
I'm not very familiar with Super Cassette Vision, but looking at some game screenshots, it seems to be an interesting second generation system. :)

Yes, the Epoch Super Cassette Vision was a third (not second) generation console, almost unknown in Europe... it has a little software library, about 30 games, with some interesting japanese titles! A "funny" info: the main CPU, a NEC PD7801G, was also used in some old electronic cash registers ('80s), like the SHARP ER-2540 ! :P
Title: Re: Romhack's WIP thread
Post by: Romhack on November 21, 2016, 11:05:19 AM
With some hardcoded values for sample generation interval (IRQ) and a proper resampler, killers instinct now sounds much better, not perfect yet.
https://www.youtube.com/watch?v=LB91jB5KocY
Title: Re: Romhack's WIP thread
Post by: dink on November 21, 2016, 01:43:01 PM
With some hardcoded values for sample generation interval (IRQ) and a proper resampler, killers instinct now sounds much better, not perfect yet.
https://www.youtube.com/watch?v=LB91jB5KocY

nice!!!
:D
Title: Re: Romhack's WIP thread
Post by: Gab75 on November 22, 2016, 12:53:09 AM
With some hardcoded values for sample generation interval (IRQ) and a proper resampler, killers instinct now sounds much better, not perfect yet.
https://www.youtube.com/watch?v=LB91jB5KocY

Nice work! Finally Killer Instint is closer to be "fully emulated" by FBA! :)
Title: Re: Romhack's WIP thread
Post by: Gab75 on March 01, 2017, 10:06:42 AM
Hi Romhack,
have you news about Wolf Unit audio driver and/or Killer Instint driver?
Title: Re: Romhack's WIP thread
Post by: isamu on May 17, 2017, 07:22:14 AM
Hi guys, any progress on the Wolf Unit driver, particularly the sound in the MK games?
Title: Re: Romhack's WIP thread
Post by: Gab75 on May 17, 2017, 08:06:11 AM
The last Romhack's post said:
I did a full review (opcode by opcode) of TMS34010 and did not find anything wrong :S DCS refuses to work on WUnit.  :redface:
So, I'm now working on KI again. KI driver needs a proper CHD reader.

The DCS (Digital Compression System) was a sound sub-system of various Midway/Williams arcade boards (including Wolf Unit)... I hope I'm wrong, but probably there's no progress...
Title: Re: Romhack's WIP thread
Post by: dink on December 03, 2018, 12:33:58 AM
"Treble Winner vs. dink: Romhack's midway spiffing championship"

The other day Barry made some nice changes to Midway - he fixed the screen offsets and changed video over to pTransDraw instead of direct buffer, to work with all palette depths, etc.

I thought: wouldn't it be really nice to complete the emulation by adding sound?
after a couple days and many hours of derping around, Wolf Unit games have sound! - yay -!

best regards,
- dink
Title: Re: Romhack's WIP thread
Post by: barbudreadmon on December 03, 2018, 05:58:31 AM
That's a great news ! It would be awesome for portability if the c++11 requirement got removed too :). Btw, you might be interested in this code if you need something to read CHD : https://github.com/libretro/fbalpha/tree/master/src/burner/libretro/libretro-common/formats/libchdr.
Title: Re: Romhack's WIP thread
Post by: dink on December 03, 2018, 07:21:26 AM
I think the deal was that if I got sound working in wunit that me and iq_132 would have a de c++ification codenight coming up...
I'm not too interested in chd support though.  feel free :)

best regards,
- dink
Title: Re: Romhack's WIP thread
Post by: barbudreadmon on December 03, 2018, 07:40:42 AM
I'm not too interested in chd support though.

The drivers don't require the chd hdd dumps from the MAME romsets ? What's the "kinst.img" file for killer instinct then ? I assumed it was the chd hdd dump.
Title: Re: Romhack's WIP thread
Post by: dink on December 03, 2018, 09:51:00 AM
It's the uncompressed hdd dump - to make it I used chdman.exe from MAME 0.155*.  I think the commandline was something like:
chdman extracthd -i kinst.chd -o kinst.img
The image file goes into "[directory where fba*.exe resides]\hdd"
Treble Winner changed this to "d:\downloads\kinst.img" the other day on github, I think by accident.  Feel free to change this location in burn/drv/midway/d_kinst.cpp
Then the kinst.zip romset goes into your usual romsets location.

* because I did this many many moons ago.

best regards,
- dink
Title: Re: Romhack's WIP thread
Post by: barbudreadmon on December 03, 2018, 10:39:58 AM
Thanks for the explanation !

Well, chd support is something i'll try to add to fba then, since looking at this chd stuff is in my TODO list for Kronos anyway.
Title: Re: Romhack's WIP thread
Post by: dink on December 03, 2018, 11:28:10 AM
Rampage World Tour soundtest in FBAlpha VIDEO

https://www.youtube.com/watch?v=a2VtpY7Fzdg

thanks to:
Romhack for everything
Barry for spiffing up the drivers

Code will be on github tonight (Detroit time), there is a bit of clean-up to do!

best regards,
- dink
Title: Re: Romhack's WIP thread
Post by: Romhack on December 03, 2018, 01:28:04 PM
Rampage World Tour soundtest in FBAlpha VIDEO

https://www.youtube.com/watch?v=a2VtpY7Fzdg

thanks to:
Romhack for everything
Barry for spiffing up the drivers

Code will be on github tonight (Detroit time), there is a bit of clean-up to do!

best regards,
- dink
Nice work! Thanks you guys for this.

It just needs a better resampler, in this video https://www.youtube.com/watch?v=LB91jB5KocY (https://www.youtube.com/watch?v=LB91jB5KocY) IIRC it used higan cubic resampler: https://gist.github.com/zxmarcos/5bd9c32bb290a71a18dfffeef79bfbb5 (https://gist.github.com/zxmarcos/5bd9c32bb290a71a18dfffeef79bfbb5)
I don't know if FBA has any driver that sound chip can be configured to output at any samplerate like DCS2k.
Does FBA have a resampler like MAME (streams)?
Title: Re: Romhack's WIP thread
Post by: hursit on December 03, 2018, 04:43:23 PM
Huhuuuw, it is great news.
I hope we will see Cave "cv1k.cpp" core too someday :P
After you release the GitHub code, I think Retroarch will update the FBA core soon. So what romset we will use to play UMK3. Will it synch with Mame 0.204 romset ?

Thanks...
Title: Re: Romhack's WIP thread
Post by: dink on December 03, 2018, 06:20:18 PM
Romhack, yes, I can add cubic easily. But right now due to time and cpu constraints, I'm going to use copy and update style resampling.  Adding cubic resampling and on-the-fly rate changes to FBA soundcore is kinda tricky if you've never done it before, but after doing it dozens of times its simple for me.  (although I couldn't say this a few years back..)

best regards,
- dink
Title: Re: Romhack's WIP thread
Post by: dink on December 03, 2018, 06:22:29 PM
Hursit, IIRC it won't be available in retroarch until we remove the c++11 dependencies, and this might take a while (a few days to a week or so). 

Huhuuuw, it is great news.
I hope we will see Cave "cv1k.cpp" core too someday :P
After you release the GitHub code, I think Retroarch will update the FBA core soon. So what romset we will use to play UMK3. Will it synch with Mame 0.204 romset ?

Thanks...
Title: Re: Romhack's WIP thread
Post by: dink on December 05, 2018, 09:03:43 PM
This project is taking a lot longer than I had planned, but after many, many, many trials/errors and rewrites everything is solid :)
Sorry to those whom I've said "code will be on git tonight" on several occasions - I had really underestimated the complexities involved with this one.  :p

best regards,
- dink
Title: Re: Romhack's WIP thread
Post by: dink on December 06, 2018, 10:00:35 AM
Hi guys, just an update:
latest code is on git - dcs sound is perfect in wolf unit games :)
Here's a new video of Rampage WT (some slight gfx issues were fixed as well)

https://www.youtube.com/watch?v=2Ca9JTBAfbc

Mortal Kombat 3 and Ultimate Mortal Kombat 3 work perfectly as well!  With perfect framerate on my ancient P4 machine  :biggrin:

UMK3 test-video:

https://www.youtube.com/watch?v=BOs4rtgya5w

Still have a few very small issues to iron out regarding the finishing stage of the driver, but the main problems (no sound, running too slow, etc etc) are gone!

best regards,
- dink
Title: Re: Romhack's WIP thread
Post by: Ashura-X on December 06, 2018, 11:12:29 AM
WoW Nice work on those stuff guys :D
Title: Re: Romhack's WIP thread
Post by: Gab75 on December 06, 2018, 02:38:48 PM
Excellent work... thanks a lot! :)
Title: Re: Romhack's WIP thread
Post by: samo79 on December 06, 2018, 06:10:38 PM
Wow great stuff guys, as for now that means we are close to have also support for MIDWAY T UNIT hardware ?
Me hope to play Mortal Kombat 1 and 2 one day ...  :cool:
Title: Re: Romhack's WIP thread
Post by: Diabolus on December 11, 2018, 03:17:25 AM
Hi guys, just an update:
latest code is on git - dcs sound is perfect in wolf unit games :)
Here's a new video of Rampage WT (some slight gfx issues were fixed as well)

https://www.youtube.com/watch?v=2Ca9JTBAfbc

Mortal Kombat 3 and Ultimate Mortal Kombat 3 work perfectly as well!  With perfect framerate on my ancient P4 machine  :biggrin:

UMK3 test-video:

https://www.youtube.com/watch?v=BOs4rtgya5w

Still have a few very small issues to iron out regarding the finishing stage of the driver, but the main problems (no sound, running too slow, etc etc) are gone!

best regards,
- dink

That's awesome, thanks for all the work that everyone has done onthe wolf and t unit for FBA.
Title: Re: Romhack's WIP thread
Post by: barbudreadmon on December 11, 2018, 08:03:23 AM
@Romhack btw, do you know if there are similarities between the mips r4600 and the r4300i used in N64 ? I saw one of the N64 devkit using the r4600 cpu so i would expect this is the case ? If so, there might be some interesting resources to write alternative r4600 interpreters at https://github.com/libretro/parallel-n64/tree/master/mupen64plus-core/src/r4300 (i think this emulator is providing several interpreters, including dynarecs for various arch and a cross-platform cached interpreter)
Title: Re: Romhack's WIP thread
Post by: Haze on December 11, 2018, 09:43:40 AM
Mupen is GPL2 licensed.

FBA uses code based on old MAME code so has the same non-commercial clause as old MAME (the choice to use that code meant accepting the license it was under)

Due to various reasons (including the non-commercial clause) FBA is not GPL2 compatible, and really can't be without a massive purge of old cores + drivers and rewriting them from scratch or going through the same process as MAME, tracking down every single contributor for every single line of code in order to gain permission to relicense it.

GPL2 code cannot be used in FBA for that reason.  Just allowing your code to be influenced by the GPL code (if it ends up looking very similar for example) is a problem.

Just because RA / LR do their best to actually hide the licenses from people doesn't mean they can be ignored.  Mixing incompatible licenses just creates a product nobody, not even the authors are allowed to distribute.

Sorry to be negative here, but proper software licensing is important to keep your product legal and legitimate.
Title: Re: Romhack's WIP thread
Post by: Barry Harris on December 11, 2018, 09:57:34 AM
Mupen is GPL2 licensed.

FBA uses code based on old MAME code so has the same non-commercial clause as old MAME (the choice to use that code meant accepting the license it was under)

Due to various reasons (including the non-commercial clause) FBA is not GPL2 compatible, and really can't be without a massive purge of old cores + drivers and rewriting them from scratch or going through the same process as MAME, tracking down every single contributor for every single line of code in order to gain permission to relicense it.

GPL2 code cannot be used in FBA for that reason.  Just allowing your code to be influenced by the GPL code (if it ends up looking very similar for example) is a problem.

Just because RA / LR do their best to actually hide the licenses from people doesn't mean they can be ignored.  Mixing incompatible licenses just creates a product nobody, not even the authors are allowed to distribute.

Sorry to be negative here, but proper software licensing is important to keep your product legal and legitimate.

The original Final Burn license also prohibited commercial use - so completely no go, unless writing everything from scratch!
Title: Re: Romhack's WIP thread
Post by: barbudreadmon on December 11, 2018, 10:39:19 AM
Sorry to be negative here, but proper software licensing is important to keep your product legal and legitimate.

No problem, it's kinda sad we can't use this code to help, but thanks for the explanation :).
Title: Re: Romhack's WIP thread
Post by: Romhack on December 11, 2018, 11:10:14 AM
Beside licensing issues...

I want to create something like UML (Universal Machine Language from MAME) because crafting a dynamic recompiler for each arch is really hard (to debug, to write, to test). Midway's stuff runs at very high speed compared to other drivers in FBA.
People want cave1k on FBA, but without DRC, it's just waste of time.
Title: Re: Romhack's WIP thread
Post by: barbudreadmon on December 11, 2018, 11:53:13 AM
I want to create something like UML (Universal Machine Language from MAME) because crafting a dynamic recompiler for each arch is really hard (to debug, to write, to test). Midway's stuff runs at very high speed compared to other drivers in FBA.
People want cave1k on FBA, but without DRC, it's just waste of time.
Yeah, having something like that for mips3 and sh3/4 would be great !
Title: Re: Romhack's WIP thread
Post by: Haze on December 11, 2018, 02:14:44 PM
Beside licensing issues...

I want to create something like UML (Universal Machine Language from MAME) because crafting a dynamic recompiler for each arch is really hard (to debug, to write, to test). Midway's stuff runs at very high speed compared to other drivers in FBA.
People want cave1k on FBA, but without DRC, it's just waste of time.

I wouldn't take too many hints from the way the UML is done in MAME tho, there was a general consensus a while back that it's a pretty poor example of how to do a recompiler, and that's why the C backend for it is slower than a standard interpreter core while at the same time being far less accurate than an interpreter.  Not sure of the specifics myself tho.
Title: Re: Romhack's WIP thread
Post by: barbudreadmon on December 12, 2018, 12:23:06 PM
Btw, there was a non UML mips3 dynarec for x86_32 in mame 0.78 : https://github.com/libretro/mame2003-plus-libretro/tree/master/src/cpu/mips . I guess porting this one would be ok since it is under mame license.
Title: Re: Romhack's WIP thread
Post by: Arcadez on December 12, 2018, 06:07:32 PM
Btw, there was a non UML mips3 dynarec for x86_32 in mame 0.78 : https://github.com/libretro/mame2003-plus-libretro/tree/master/src/cpu/mips . I guess porting this one would be ok since it is under mame license.

Some MAME dev's have a real bee in their bonnet when it comes to this core, so i fully expect the answer to the above being no
but hey we could be surprised :)
Title: Re: Romhack's WIP thread
Post by: barbudreadmon on December 13, 2018, 04:39:26 AM
Some MAME dev's have a real bee in their bonnet when it comes to this core, so i fully expect the answer to the above being no
but hey we could be surprised :)
Besides a few fixes you applied, i think most of it is actually their original code under MAME license ? Actually it might be a backport from MAME 0.139 ?
Title: Re: Romhack's WIP thread
Post by: cliobrando on December 21, 2018, 02:51:53 PM
Hi,
I've compiled the latest commit from github (7bc737d14fd6504136b953ec9af2e84e5dbd7f9d), using:
- nasm 2.14
- tdm64-gcc-5.1.0-2
- ActivePerl-5.26.1.2601
- gnu utils from fba site
- X64 build
- make mingw510

And I've converted my kinst and kinst2 chd to img format using the mame chdman utility, I've checked the crc32 of both files and is correct.
Now my question, I don't know where to put the img files, I've tried the roms folder, the support/hdd folder, the fba root folder, fba root/hdd folder, and nothing. When I try to load the game a message telling me that the rom file is correct, but no HDD data was found is displayed (I've configured the paths manually too). Am I doing something wrong?

Thanks.
Title: Re: Romhack's WIP thread
Post by: Barry Harris on December 21, 2018, 04:05:13 PM
You're probably missing the set folder. eg, support/hdd/kinst/kinst.img.
Title: Re: Romhack's WIP thread
Post by: cliobrando on December 21, 2018, 04:11:12 PM
You're probably missing the set folder. eg, support/hdd/kinst/kinst.img.

 :redface: :redface: :redface: Thanks! now it works!  :biggrin:
Title: Re: Romhack's WIP thread
Post by: littlebear on December 23, 2018, 11:31:23 AM
can you tell me which version of chdman and command line to use? because i use chdman 204 but crc came up not matching the FBA needed img. thank you
Title: Re: Romhack's WIP thread
Post by: cliobrando on December 24, 2018, 08:05:11 AM
can you tell me which version of chdman and command line to use? because i use chdman 204 but crc came up not matching the FBA needed img. thank you
'

I've used the chdman from mame 0.155:
chdman.exe extracthd -i kinst.chd -o kinst.img
Title: Re: Romhack's WIP thread
Post by: barbudreadmon on December 24, 2018, 11:01:44 AM
I used chdman 0.204 with kinst.chd from a mame 0.204 romset, and got the right crc.
Title: Re: Romhack's WIP thread
Post by: littlebear on December 24, 2018, 11:29:18 AM
thank cliobrando

some how i did not do it right the first time and i did not make a folder for each .img file in the support hdd folder.

they both working now.

i use .204 chd and .204 chdman.