Author Topic: Romhack's WIP thread  (Read 73297 times)

Offline Romhack

  • Expert
  • *****
  • Posts: 92
  • Karma: +49/-0
Re: Romhack's WIP thread
« Reply #60 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))

Offline Barry Harris

  • dontbeabarry
  • *
  • Posts: 1785
  • Karma: +0/-65535
  • I'm Barry Harris and I like to f*** people over
Re: Romhack's WIP thread
« Reply #61 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
Account of Barry Harris; the traitor.
Send me an e-mail at barry@fbalpha.com letting me know how big of a piece of sh** I am.

Offline Romhack

  • Expert
  • *****
  • Posts: 92
  • Karma: +49/-0
Re: Romhack's WIP thread
« Reply #62 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.

« Last Edit: May 14, 2015, 12:17:43 AM by Romhack »

Offline dink

  • Administrator
  • *****
  • Posts: 5014
  • Karma: +449/-1
  • pie? I nearly bought one!
Re: Romhack's WIP thread
« Reply #63 on: May 14, 2015, 06:44:09 PM »
Suggestion: proper fail / error message for missing hdd/kinst*.img in d_kinst

best regards,
- dink

Offline Barry Harris

  • dontbeabarry
  • *
  • Posts: 1785
  • Karma: +0/-65535
  • I'm Barry Harris and I like to f*** people over
Re: Romhack's WIP thread
« Reply #64 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.
Account of Barry Harris; the traitor.
Send me an e-mail at barry@fbalpha.com letting me know how big of a piece of sh** I am.

Offline SeiferAlmasy

  • Jr. Member
  • **
  • Posts: 53
  • Karma: +1/-0
  • MAME's FAN (Since 1997)
    • vgBR - Videogames Brasil
Re: Romhack's WIP thread
« Reply #65 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?

Offline Romhack

  • Expert
  • *****
  • Posts: 92
  • Karma: +49/-0
Re: Romhack's WIP thread
« Reply #66 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.

Offline dink

  • Administrator
  • *****
  • Posts: 5014
  • Karma: +449/-1
  • pie? I nearly bought one!
Re: Romhack's WIP thread
« Reply #67 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

Offline Romhack

  • Expert
  • *****
  • Posts: 92
  • Karma: +49/-0
Re: Romhack's WIP thread
« Reply #68 on: October 20, 2015, 11:59:32 AM »
Thanks dink :D

After a rudimentary implementation of opcode PIXBLT B,XY...

« Last Edit: October 20, 2015, 12:39:01 PM by Romhack »

Offline dink

  • Administrator
  • *****
  • Posts: 5014
  • Karma: +449/-1
  • pie? I nearly bought one!
Re: Romhack's WIP thread
« Reply #69 on: October 20, 2015, 06:05:32 PM »
Looks good so far! :D

Offline Arcadez

  • Expert
  • *****
  • Posts: 558
  • Karma: +15/-0
  • Arcade Addict
Re: Romhack's WIP thread
« Reply #70 on: October 21, 2015, 11:56:15 AM »
@Romhack it's getting there good work man

Offline Romhack

  • Expert
  • *****
  • Posts: 92
  • Karma: +49/-0
Re: Romhack's WIP thread
« Reply #71 on: October 22, 2015, 02:19:32 PM »
Some progress with Rampage, I'll try to implement inputs do pass this screen.


Offline dink

  • Administrator
  • *****
  • Posts: 5014
  • Karma: +449/-1
  • pie? I nearly bought one!
Re: Romhack's WIP thread
« Reply #72 on: October 23, 2015, 08:20:27 AM »
very nice :) I can't wait to see the title screen!

Offline Gab75

  • FBNeo Contributor
  • *****
  • Posts: 1481
  • Karma: +33/-0
  • All games deserve to be emulated, more or less! :P
Re: Romhack's WIP thread
« Reply #73 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:

Offline dink

  • Administrator
  • *****
  • Posts: 5014
  • Karma: +449/-1
  • pie? I nearly bought one!
Re: Romhack's WIP thread
« Reply #74 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.