Author Topic: Fix for HK Models and Models that won't play Native & Community apps & emulators  (Read 19668 times)

kswildside

  • Guest
Do you have a dreaded HK Model that won't let you play any Native or Community based APPS or Games or Emulators welp I have a fix for you with MTH's help we solved the issue and now it works for them. Not sure if it works on NON HK or NON working A320's need testers to try it out and let me know. But here is the fix enjoy ;) Oppsss I forgot Two emulators when I made the first HK-Fix.zip file so I forgot to adde WonderSwan and also didn't patch the newest version of the Atari 800 that is now fixed as the newest version was released yesterday also.... So changing the MegaUpload url...

http://www.megaupload.com/?d=X836J9DB

Ok some requests for a mirror here is a FileFront mirror:

http://www.filefront.com/15850183/HK-Fix.zip
« Last Edit: March 17, 2010, 12:20:11 am by dingoo-digital-usa »

Harteex

  • * Administrator
  • Posts: 713
    • Harteex Productions
Not sure if it works on NON HK or NON working A320's need testers

I have an old non-hk with paw, and I tried one of the apps, and it works fine.

Btw, great work!

kswildside

  • Guest
I didn't do the programming of the script to fix the issue ... I just did as I normally do in my day job as a project manager find the flaw look at old ones files and issues try to have my programmers and techs look and see differences and simularitys.

MTH found that they all had a same area in the code that was similar for all Native APPS that did work on the HK models. Once we found that piece of code we tried to patch it to non working native apps and it worked.

At the point I said lets stretch the test and see if I can not only fix native apps but also community based apps. It worked again at that point I said lets really stretch it and see if I can fix Community based *.SIM files or emulators as everyone knows them and bam it worked also.

The one thing I didn't know that it would fix was GNUBoy it no longer locks up when you exit a game and reload another now. Like before with NON PAWED models if you played a game on GNUBoy and exited and went to play another game it would lock up.

This no longer seems to happen with this new patch on NON PAWED or HK models. I seem to think this patch is UNIVERSAL but unitl I have a complete spectrum of testing I won't be sure.

So end of the DAY you can thank MTH for writting the script and finding the simularities in new APPS and the fact old APPS didn't have this one key piece so they wouldn't run.

 All I did was provide the files and point him to the fact there had to be something different and a reason in the actual app that was preventing it from running. So more so KUDOS to MTH I was just the one who envisioned the plan and the project manager so to speak.

Harteex

  • * Administrator
  • Posts: 713
    • Harteex Productions
I spoke to mth on IRC about it and he showed me his script.
flatmush went ahead and fixed it in the SDK we're working on, http://boards.dingoonity.org/dingoo-development/platform-independant-dingoo-sdk/

btw, it seems like it also gave apps a speedup :)

But as you say, let's now wait for more tests.

kswildside

  • Guest
Ya seems to have speed up the apps and community based emulators dunno why it did but like I said more testing needed to see if that is truly the case or not?

I have mirrored the FIX and all the files needed for the A320 on my Support Blog for Dingoo-Digital-USA.com here is the link for those who don't have it...

http://dingoo-digital-usa.blogspot.com/2010/03/dingoo-digital-a320-support-files.html

mth

  • *
  • Posts: 317
As dingoo-digital-usa explained, we are not the ones who actually fixed the problem, we just made a way to easily apply the fix to more apps. For those interested, here is the script. It runs in Python 2.6 (probably Python 2.4 or higher is good enough, but it is not compatible with Python 3.x).

Code: [Select]
import sys

def parseHex(hexString):
assert len(hexString) % 2 == 0
return ''.join(
chr(int(hexString[i : i + 2], 16))
for i in xrange(0, len(hexString), 2)
)

signature = parseHex('50ffbd279000b0af')
replacement = parseHex('010002240800e0030000000000000000')

def patchFiles(fileNames):
for fileName in fileNames:
print 'Loading %s...' % fileName
inp = open(fileName, 'rb')
try:
data = inp.read()
finally:
inp.close()
print 'Analyzing %s...' % fileName
index = data.find(signature)
if index == -1:
print 'Signature not found; skipping file'
else:
print 'Signature found at index %08X' % index
outFileName = fileName + '.patched'
print 'Saving %s...' % outFileName
out = open(outFileName, 'wb')
try:
out.write(data[ : index])
out.write(replacement)
out.write(data[index + len(replacement) : ])
finally:
out.close()

if len(sys.argv) >= 2:
patchFiles(sys.argv[1 : ])
print 'Done.'
else:
print >>sys.stderr, 'Usage: python apppatch.py file1.app [file2.app [...]]'
sys.exit(2)

The signature this script looks for is the first two instructions of a routine. They are replaced by "return 1". I have no idea what the routine does. It would be interesting if someone could disassemble and analyze it.

Shred

  • * Former Staff
  • Posts: 139
Tested this on my UnPawed Dingoo. (non-HK)

Gnuboy now works properly, managed to load various roms without any locking up or freezing whatsoever.

Many thanks guys!

xdpirate

  • * Former Staff
  • Posts: 490
Hi, thanks for this amazing news. Any way this script could be compiled into a command-line tool that takes a .app-file as an argument, to apply the patch? Would be great if I could just run my unpatched programs through this :)

Thanks for this, this has made my life much better :)

flatmush

  • *
  • Posts: 288
It is a commandline tool:
Code: [Select]
python apppatch.py <appname>
Also all native apps compiled with my the new native sdk (v1.1.4) should be automatically patched.

RodrigoCard

  • *
  • Posts: 314
    • Mac Joystick Apps
Very Good D.D.U.
I hope someday all dingoos will work the same way.... :)
This is a nice step :)

Badboyluc

  • *
  • Posts: 29
very nice pack.

work great in new revision of the dingoo (tested on HK and Worlwide version).

But the SMSGGOO not work the Save State/Load State on this pack.

Please fix it  :'(

kswildside

  • Guest
No problem with it here maybe you need to re copy it again. Able to load and save states and no one else has brought up the issue..

Badboyluc

  • *
  • Posts: 29
No problem with it here maybe you need to re copy it again. Able to load and save states and no one else has brought up the issue..

sorry, is a bug from SMSGGOO 3.3.

Please fix the SMSGGOO 3.2 to work with new revision of the dingoo.

Thanks  :'(
« Last Edit: March 24, 2010, 02:27:48 pm by Badboyluc »

kswildside

  • Guest
I will see if Akemaul will fix the bug for me and release it as a new version  with HK patch

boxpressed

  • Guest
I have a Dingoo from Thinkgeek that's unpawed and has no HK in the serial number.  It freezes switching games with Gnuboy.

I haven't yet installed Dingux.  Should I install this fix before installing Dingux?  For that matter, should I update the original firmware to POF 1.2 before installing Dingux?  Or does the order of updates not matter?  Thanks in advance.

kswildside

  • Guest
Do the 1.2 POF and install the fix and then do Dingux would be best

cambosam

  • Guest
it doesn't work for me either. at least we found the root of the problem, the dingoo hardware itself and not the roms or .sim. and recently dingo digital usa was able to work out a fix for the hk dingoo's i'll forward this thread to them and hopefully they can figure something out.

cambosam

  • Guest
opps just sent the wrong post to the wrong thread.

anyway dingoo digital usa can you look into to this too. check out http://boards.dingoonity.org/dingoo-emulation/neo-geo-graphic-issues/.

you guys have done great work in fixing the hk dingoo's i've found another problem for you guys to tackle.

after this fix my dingoo will be perfect!

Metallian

  • Guest
A new emulator was released - unrealspeccy portable for native firmware (version 1.2). And it doesn't work on my dingoo - console just freezes. My dingoo is not HK series (4G a320wh9709209 with ILI9331_3 controller), but i have same problems with running new apps before i installed HK fix (Thank you!), so can you make a fix for a new emulator?

Here it is
http://code.google.com/p/unrealspeccyp/downloads/list

P.S. Sorry for my English.  :)
« Last Edit: May 23, 2010, 11:10:26 am by Metallian »