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

Offline Romhack

  • Expert
  • *****
  • Posts: 94
  • 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))

Online Treble Winner

  • FBA Dev
  • ******
  • Posts: 1814
  • Karma: +105/-0
  • FB Alpha Team
    • http://www.barryharris.me.uk
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

Offline Romhack

  • Expert
  • *****
  • Posts: 94
  • 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: 2677
  • Karma: +227/-0
  • feed the horse yumyum
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

Online Treble Winner

  • FBA Dev
  • ******
  • Posts: 1814
  • Karma: +105/-0
  • FB Alpha Team
    • http://www.barryharris.me.uk
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.

Offline SeiferAlmasy

  • Newbies
  • *
  • Posts: 44
  • 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: 94
  • 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: 2677
  • Karma: +227/-0
  • feed the horse yumyum
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: 94
  • 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: 2677
  • Karma: +227/-0
  • feed the horse yumyum
Re: Romhack's WIP thread
« Reply #69 on: October 20, 2015, 06:05:32 pm »
Looks good so far! :D

Offline gamez fan

  • Expert
  • *****
  • Posts: 517
  • Karma: +13/-1
  • 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: 94
  • 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: 2677
  • Karma: +227/-0
  • feed the horse yumyum
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

  • Advanced Member
  • *****
  • Posts: 546
  • Karma: +20/-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: 2677
  • Karma: +227/-0
  • feed the horse yumyum
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.