Welcome!

Miscellaneous => Projects => Topic started by: iq_132 on December 04, 2004, 11:05:58 PM

Title: IQ's neogeo Tools
Post by: iq_132 on December 04, 2004, 11:05:58 PM
Just a thread with some programs i've written for the benefit of all humanity (or just you guys :P)
Title: IQ's neogeo Tools
Post by: iq_132 on December 04, 2004, 11:07:37 PM
Crouching Tiger, Hidden Dragon 2003 "C" rom decrypter

You need these C roms:

5003-c1.bin 0x800000 0x68f54b67
5003-c2.bin 0x800000 0x2f8849d5
5003-c3.bin 0x800000 0xac4aff71
5003-c4.bin 0x800000 0xafef5d66
5003-c5.bin 0x800000 0xc7c1ae50
5003-c6.bin 0x800000 0x613197f9
5003-c7.bin 0x800000 0x64ddfe0f
5003-c8.bin 0x800000 0x917a1439

You should get these Cs:

5003-c1d.bin 0x800000 0x29fd9108
5003-c2d.bin 0x800000 0xf58d4d3e
5003-c3d.bin 0x800000 0x71b3172d
5003-c4d.bin 0x800000 0x564c70c1
5003-c5d.bin 0x800000 0x8ef8aef9
5003-c6d.bin 0x800000 0x8a0fd440
5003-c7d.bin 0x800000 0x6f1effab
5003-c8d.bin 0x800000 0x39550d3a
Title: IQ's neogeo Tools
Post by: iq_132 on December 05, 2004, 01:32:42 AM
Here's a tool to encrypt/decrypt pnyaa, mslug4, and rotd's V roms
A simple command line replacement for that crappy v2v tool
Title: IQ's neogeo Tools
Post by: FerchogtX on December 07, 2004, 07:59:29 PM
How do you make this exes man? (for example the pcm2.exe) I'd like to make one for the s1 of cthd2003 super plus XD...
See ya!!!!!! :D
Title: IQ's neogeo Tools
Post by: iq_132 on December 08, 2004, 09:47:50 AM
Here's my source for the neopcm2 program.  Feel free to use it in any way you wish.
Title: IQ's neogeo Tools
Post by: FerchogtX on December 08, 2004, 06:05:54 PM
Thansk a lot man, in RomShare is a result of your help XD
Thanks alot!!!
See ya!!!!! :D
Title: IQ's neogeo Tools
Post by: iq_132 on December 12, 2004, 02:54:23 AM
I don't know if you've all noticed, but Halrin's site has been updated.
http://www52.tok2.com/home/foge/

Quote
2004/12/11
ごちゃごちゃになってきたので色々と整理
掲示板を復活させようか検討中


Basically, it says he's added a tool to make the correct svchaosa P roms from the svcchaos one.
The only downside is that he didn't add the source, so here's my version ;)

Quote
This program will convert:

svcchaos:
269-p1.bin CRC(432cfdfc)

to svchaosa:
269-p1.bin CRC(38e2005e)
269-p2.bin CRC(6d13797c)
Title: IQ's neogeo Tools
Post by: hotaru on December 13, 2004, 07:21:34 PM
thanks iq_132 :D :D btw, what program are you using to build your .exe?  i'm not savy in this arena - do you think it possible to use HalRIN's code (or some variation of) to build an .exe to decrypt 268-px.bin, 269-p1.bin, and           271-px.bin?  arigato ;)
Title: IQ's neogeo Tools
Post by: iq_132 on December 13, 2004, 11:17:46 PM
I'm using the mingw compiler.  
The command is this:

gcc input.c -o output

btw, yes, I can do that ;)
Title: IQ's neogeo Tools
Post by: iq_132 on December 14, 2004, 01:23:48 AM
here you go hotaru :)
Title: IQ's neogeo Tools
Post by: iq_132 on December 15, 2004, 04:56:13 AM
Here's one :)

Quote
SVCCHAOS C decryption program by IQ_132 - http://neosource.1emu.net/
Some source from:
Halrin - http://www52.tok2.com/home/foge/
MAME - http://www.mame.net
FBA - http://fba.emuunlim.com

you should start with these Cs (from svcchaos)
269-c1.bin 32mb crc(1b608f9c)
269-c2.bin 32mb crc(5a95f294)


you should get these Cs (from svcnd)
269-c1d.bin 8mb crc(465d473b)
269-c2d.bin 8mb crc(3eb28f78)
269-c3d.bin 8mb crc(f4d4ab2b)
269-c4d.bin 8mb crc(a69d523a)
269-c5d.bin 8mb crc(ba2a7892)
269-c6d.bin 8mb crc(37371ca1)
269-c7d.bin 8mb crc(56ac5fb9)
269-c8d.bin 8mb crc(de99e613)

You should also get this completely decrypted and descrambled S rom
269-s1d.bin 512kb crc(772B18DC)


btw, source is included. ;)
Title: IQ's neogeo Tools
Post by: hotaru on December 15, 2004, 11:33:38 AM
thanks for the info on exe. build iq_132 :D
Title: p_dec
Post by: hotaru on December 19, 2004, 03:03:24 PM
iq_132, the p_dec tool you posted a page back may (through no fault of your own) contain a bug in handling of 269-p1.bin.  i suspect this b/c it has given numerous different crc32 as output none of which were cited in the included text file :confused: could there be a problem w/ HalRIN's code?  off to do some testing - see what regions of 269-p1d.bin are affected.

[edit] ok, heres the skinny - the first 25165824 bytes in 269-p1d.bin contain no differences when compared to conflicting crc32 values.  the differences can be found in the remaining 8388608 bytes and amount to ~5,000,000+.  funky :p  could anyone post a fixed source even though this segment isn't usable?

arigato ;)
Title: IQ's neogeo Tools
Post by: KaNyErO on January 16, 2005, 08:47:35 AM
it would be interesting a S1 rom decrypter for all known bootlegs and original protections :D
Title: IQ's neogeo Tools
Post by: iq_132 on January 18, 2005, 10:40:24 PM
Quote from: KaNyErO
it would be interesting a S1 rom decrypter for all known bootlegs and original protections :D


Well, he's a quick, slapped-together version of an s decryption tool.
Some of the decryption methods may or may not be right (I donno, haven't tested them)


@hotaru -- I'll look into it right now.

*edit*
What crc are you looking for hotaru??  The last chunk shouldn't be changed at all.
Title: IQ's neogeo Tools
Post by: KaNyErO on January 20, 2005, 10:03:50 AM
thanks iq   ;)

btw..... how does it work?
Title: IQ's neogeo Tools
Post by: iq_132 on January 20, 2005, 05:34:37 PM
lol, forgot instructions....
decrypt xxx-s1.bin x
the xxx-s1.bin can be any name and the x needs to be the decryption type.
You can check what types there are by looking at the included source.
Title: IQ's neogeo Tools
Post by: hotaru on January 25, 2005, 03:26:35 PM
@iq_132 - p_dec.exe seems to alter the last 8mb of 269-p1.bin, though doesn't alter the 2nd and 3rd 8mb segments.  had i checked this earlier i'd've written it off as an error - thought it to be something more :o did playmore include the last 24mb of code in this rom as garbage or are these segments used in decryption?

thanks iq_132 :)
Title: IQ's neogeo Tools
Post by: iq_132 on January 25, 2005, 03:53:02 PM
The last 3 8mb chunks are just dummy data -- garbage.  They serve no purpose.
Title: IQ's neogeo Tools
Post by: Death Metal on March 25, 2005, 02:40:19 AM
Hey IQ, I know this is very old, but I'd like to check something with you about encrypted/decrypted Vs.

We all know FBA produces internal decrypted V data from the encrypted V sets via pieces of code for each driver, from which you can get physical files using that "Save decrypted Vs" method (remember?). I've done this (extracted decrypted Vs) with all my games that use encrypted V ROMs, and then threw the encrypted ones away. However, I'd like to go back to using the official encrypted ROMs I had before, but, as it currently stands, I can't get the correct encrypted files out of the decrypted ROMs that were generated by FBA -- for example, I could use that v2v program to encrypt the ROMs I get, but the CRCs would not match the official encrypted files anymore (I've tested it).

Because of that, I'd like to know if there is a way to make an inversion of those decryption codes FBA uses. I mean, is it possible to create some code which would be the exact inversion of what it currently does, in order to encrypt V ROMs with their previously correct CRC (matching the latest Neo-Geo Logiqx dat) from the ROMs I currently have? I know I'm stupid, but I didn't think I'd want those ROMs back before I deleted them. :/

I'd be so greatful if you could help me in this. Thanks a lot.

EDIT: Oh, BTW, just to clarify, I only need to encrypt those newer PCM2 ROMs, since Metal Slug 4, Rage of the Dragons and Poochy & Nyaa have been taken care of already (with that other code that you posted here :)).
Title: IQ's neogeo Tools
Post by: iq_132 on May 06, 2005, 06:26:30 AM
Quote


   What is neoconv?
 -----------------------------------------

    Neoconv is a tool to encrypt/decrypt V (sample) roms for Neo-Geo.
    It can process Neo-PCM2, 1999, SNK Corp. type encryption, and also
    Neo-PCM2, 2002, Playmore Corp. type encryption.



   How do I use it?
 -----------------------------------------

   If you have any questions, just run the program.  It will tell you
   what commands it supports.


   Who write this code? (Credits, please do not remove!)
 -----------------------------------------
   Most of the code for this program was written by IQ_132, but large,
   very important chunks of it were written by Fataku, Aquasync, Halrin,
   and the MAME Team.


Here ya go Death Metal
Title: IQ's neogeo Tools
Post by: Death Metal on May 06, 2005, 01:28:50 PM
Thank you so much, IQ! Owe you a big one! :)
Title: IQ's neogeo Tools
Post by: iq_132 on May 06, 2005, 03:21:28 PM
Np :)

Quote
s1grab by iq_132

This program will "grab" 512k of "S" data from the end of decrypted C roms.
You MUST use DECRYPTED C roms.  

To use the program, unzip your last two C roms (usually xxx-c7d.rom and xxx-c8d.rom) to
the same directory as s1grab.exe and then from the command line, type this:

s1grab xxx-c7d.rom xxx-c8d.rom

Please note that your file names may be different and also note that some S1 roms may require some decryption code or other processing.
Title: Re: IQ's neogeo Tools
Post by: iq_132 on May 25, 2005, 04:29:47 AM
Quote

   What is ptcrt?
 -----------------------------------------

    ptcrt is a tool that can batch output patch code for roms.  This is
    useful if you have a rom you know is bad, but it is the best un-hacked
    one known.  You can compare that rom with a fixed version and use
    the patches created to fix the rom "on-the-fly"



   How do I use it?
 -----------------------------------------

    If you have any questions, just run the program.  It will tell you
    what commands it supports.


   
   How about an example?
 -----------------------------------------

 Sure:

    To compare the p1 from kof2002 to kf2k2pls and get patches for fba (new):

        ptcrt F 265-p1.bin 265-p1p.bin

    To compare the p1 from kof2002 to kf2k2pls and get patches for MAME:

        ptcrt M 265-p1.bin 265-p1p.bin


   Who wrote this code? (Credits, please do not remove!)
 -----------------------------------------

    This code was written entirely by me, IQ_132
        http://neosource.1emu.net
Title: Re: IQ's neogeo Tools
Post by: iq_132 on May 25, 2005, 05:32:05 AM
Quote

   What is bswap8?
 -----------------------------------------

    bswap is a tool that can compare a file encrypted with a bitswap8 with a
    decrypted version of it and tell you what to use for the bitswap.



   How do I use it?
 -----------------------------------------

    If you have any questions, just run the program.  It will tell you
    what commands it supports.


   
   How about an example?
 -----------------------------------------

 Sure:

    To compare an encrypted version of the svcplus s1 rom to the decrypted version:

        bswap8 svc-s1pd.bin svc-s1p.bin


   Who wrote this code? (Credits, please do not remove!)
 -----------------------------------------

    Most of this code was written by iq_132 (me)
        http://neosource.1emu.net/

    A small, but very vital, piece comes from the FBA (Final Burn Alpha) source
   http://fba.emuunlim.com/


THIS VERSION IS OUTDATED! CHECK BELOW FOR A NEWER ONE!
Title: Re: IQ's neogeo Tools
Post by: iq_132 on May 29, 2005, 06:14:05 AM
Filling a request from Neo ;)

Quote
Make sure your SVC Chaos (home) P roms are named - 269-p1a.bin and 269-p2a.bin

Note that this program can only reproduce the first half of the svc p1 rom.
The second half is filled with ramdom(?) data.
Title: Re: IQ's neogeo Tools
Post by: neo04 on May 29, 2005, 08:34:17 AM
thank you very much iq!  :biggrin:
Title: Re: IQ's neogeo Tools
Post by: iq_132 on May 29, 2005, 09:35:46 PM
Quote
   What is bswap8?
 -----------------------------------------

       bswap is a tool that can compare a file encrypted with a bitswap8 with
    a decrypted version of it and tell you what to use for the bitswap.
       You may not have to use a decrypted rom that is completely the same as
    The file you are comparing.  Different versions of files may be similar
    enought to give you correct results. (bswap8 now has the ability to give
    you the best fitting bitswap if no bitswap is a perfect match).



   How do I use it?
 -----------------------------------------

    If you have any questions, just run the program.  It will tell you
    what commands it supports.


   
   How about an example?
 -----------------------------------------

 Sure:

    To compare an encrypted version of the kof2002 "Super" s1 rom to kof2002 (265-s1d.bin) version:

        bswap8 265-s1sp.bin 265-s1d.bin

    It will also work with this:

   bswap8 265-s1d.bin 265-s1sp.bin



   Who wrote this code? (Credits, please do not remove!)
 -----------------------------------------

    Most of this code was written by iq_132 (me)
        http://neosource.1emu.net/

    A small, but very vital, piece comes from the FBA (Final Burn Alpha) source
   http://fba.emuunlim.com/



   Changelog
 -----------------------------------------


    1.0.1

   - Now gives a "best match" bitswap if no perfect one is found.
    - If a file isn't bitswapped, but is only a few bytes different, a
          diff log is created.

    1.0.0

   - Everything


I've updated the bswap8 from above. ;)
Title: Re: IQ's neogeo Tools
Post by: robber804 on June 10, 2005, 12:01:53 AM
Here's my source for the neopcm2 program.  Feel free to use it in any way you wish.

Thanks for the tool, without this baby the mslug5 V rom fix would not have been possible.
Title: Re: IQ's neogeo Tools
Post by: hotaru on June 10, 2005, 12:17:01 AM
@iq_132- also wish to pay my respects :D
Title: Re: IQ's neogeo Tools
Post by: FerchogtX on July 10, 2005, 07:52:39 PM
IQ... Now that I see this tools, i was wondering if you can wite a tool that can add the s data to the end of the C-ROMs, i mean... suppose that i modify the s1 of kof2k2nd, but instead of using that rom, It can be posibble to create the nesesary tool for adding the s1 rom data in the end of the C-ROMs?...
See ya!!!! :biggrin:
Title: Re: IQ's neogeo Tools
Post by: iq_132 on July 11, 2005, 02:39:51 AM
Quote
   What is cxencs1?
 -----------------------------------------

    cxencs1 allows you to take a regular S1 rom, scramble it, and split it
    so that it can easily be added to the end of the last two C roms in a
    set.  This will allow for creating hacks that have S data in the Cx
    roms as opposed to including just a S1 rom.



   How do I use it?
 -----------------------------------------

    If you have any questions, just run the program.  It will tell you
    what commands it supports.


   
   How about an example?
 -----------------------------------------

 Sure:

    To convert the S1 from kof2002, use this command:

        cxencs1 265-s1d.bin 265-c7d.bin 265-c8d.bin

    It will write the C data to the two C roms listed.


   Who wrote this code? (Credits, please do not remove!)
 -----------------------------------------

    Most of this code was written entirely by me, IQ_132
        http://neosource.1emu.net

    But a very vital part was written by the MAME team
   http://www.mamedev.com

Here ya go Ferch :)
Title: Re: IQ's neogeo Tools
Post by: FerchogtX on July 12, 2005, 01:08:21 AM
Wow!!! you're so way fast!!! Thanks alot I'll test inmedia :D
See ya!!!!! :biggrin:
Title: Re: IQ's neogeo Tools
Post by: fernando2 on July 24, 2005, 10:47:14 AM
hi do you have a tool that removes bankswitch or do you could tell how to do it

thanks
Title: Re: IQ's neogeo Tools
Post by: iq_132 on July 24, 2005, 04:35:51 PM
Well, it's a pretty involved process to remove a bankswitch.  I don't think I could write a tool to do it or even give you a simple way of doing it.

You need to know 68000 assembly and have quite a bit of experience with it or you can take a bootleg/hack of it with the bankswitch removed and compare the two's differences.
I did something like that for svcchaos, comparing a decrypted P1 to a bootleg with the bankswitch removed.
Title: Re: IQ's neogeo Tools
Post by: fernando2 on August 03, 2005, 12:40:27 PM
hi iq_132 could you post your p_dec source please?

thanks for your help
Title: Re: IQ's neogeo Tools
Post by: rock23 on August 03, 2005, 02:08:58 PM
Hello iq_132 exists a tool that allows me to pass of the format ROM to spr for neogeo roms C of 8 MB.
 I want to visualize the tiles with sprview of neogeo CD  :wink:
 
 
Title: Re: IQ's neogeo Tools
Post by: iq_132 on August 03, 2005, 05:42:22 PM
hi iq_132 could you post your p_dec source please?

thanks for your help

Check the attachment

Hello iq_132 exists a tool that allows me to pass of the format ROM to spr for neogeo roms C of 8 MB.
 I want to visualize the tiles with sprview of neogeo CD  :wink:
 
 


I'm not sure I understand what you're saying... mind rephrasing that?
Title: Re: IQ's neogeo Tools
Post by: rock23 on August 03, 2005, 09:05:22 PM
hi! i just want to know if you could make an
neogeo utility or tool to change Format or extension.
ROM to SPR supporting big roms sizes of 8 mbs
 because your tool mvs2ngcd (convert Neo-Geo MVS roms to Neo-Geo CD)
 just accept romsizes from 2 to 4 mbs for the graphics as máximum 

Bye :rolleyes:
Title: Re: IQ's neogeo Tools
Post by: iq_132 on August 03, 2005, 09:22:11 PM
Ah, I understand now ;)

here's your program.

BTW,  Would you mind posting that sprview prog or linking to it?
Title: Re: IQ's neogeo Tools
Post by: FerchogtX on August 03, 2005, 10:31:05 PM
IQ... i have a lil' prob here... it seems that cencex1 doesn't save the s1 data in the C roms for certain games... especifically it cannot handle 512 KB roms and neither 1 MB ones (like kof2003 text layers) can you fix that? It could be the best thing for me, I'll kiss your feet if you do it.
See ya!!!!! :biggrin:
Title: Re: IQ's neogeo Tools
Post by: rock23 on August 03, 2005, 11:14:57 PM

thanks for your help :biggrin:

Download sprview :wink: :wink:

[attachment deleted by admin]
Title: Re: IQ's neogeo Tools
Post by: rock23 on August 04, 2005, 01:12:07 AM
fixview source download

Bye

Title: Re: IQ's neogeo Tools
Post by: iq_132 on August 20, 2005, 10:36:49 PM
IQ... i have a lil' prob here... it seems that cencex1 doesn't save the s1 data in the C roms for certain games... especifically it cannot handle 512 KB roms and neither 1 MB ones (like kof2003 text layers) can you fix that? It could be the best thing for me, I'll kiss your feet if you do it.
See ya!!!!! :biggrin:

I'll try to fix this soon :)
Title: Re: IQ's neogeo Tools
Post by: iq_132 on August 20, 2005, 10:41:33 PM
Quote
    This program allows you to compare two files and compare the occurances
    of bytes in each file.  This is helpful for such things as discovering what
    exactly you are missing in one file.

This was written specifically for robber804 so he can do a few checks on m1/m1d files :)
Title: Re: IQ's neogeo Tools
Post by: fernando2 on August 24, 2005, 02:18:48 PM
hi iq_132 could you post your source for decrypt kof2002 magic plus please

sorry about my engish im from mexico

thanks
Title: Re: IQ's neogeo Tools
Post by: iq_132 on August 24, 2005, 02:55:19 PM
Here ya go. :)
Title: Re: IQ's neogeo Tools
Post by: rock23 on September 08, 2005, 05:17:08 PM

hi ! iq_32. could you make a tool to change file
 format spr (neogeocd) from 16mb into 2 files format .
rom (neogeo) of 8 mb each ?

Thanks! :wink:
Title: Re: IQ's neogeo Tools
Post by: KaNyErO on September 08, 2005, 08:16:20 PM
hi ! iq_32. could you make a tool to change file
 format spr (neogeocd) from 16mb into 2 files format .
rom (neogeo) of 8 mb each ?

Thanks! :wink:

you can do it by yourself with winhex

first do a byteswap 16
then do a disect file wordwise 16 bits and voila...
Title: Re: IQ's neogeo Tools
Post by: rock23 on September 09, 2005, 09:00:29 PM
It does not work
continuous badly the tiles :biggrin:
Title: Re: IQ's neogeo Tools
Post by: robber804 on September 09, 2005, 11:41:33 PM
Kany if i remember correctly (you may have been the one that told me this) but neocd loads the sprites as it needs them, i am not sure what would have to be done to the p rom to correct this so the game can run correctly, i dont think zintrick suffers from that since the sprites are small, im not sure but i think the neocd hardware can  only has 4mb of ram for sprites..  but i could also be totally wrong since i lost what info i had on the hardware :)

but anyway... using winhex for those that need a little help

mark the beginning and end of your file

ctrl+t select 16 byte swap

then to split into 2 files so it can be loaded by the mame driver select file manager and then dissect, select wordwise then save your 2 new files.  I tried to take some screen shots but they were not helpful at all :P

hope this helps... i will be out of town until monday evening, see ya later

Title: Re: IQ's neogeo Tools
Post by: KaNyErO on September 10, 2005, 06:46:57 AM
Kany if i remember correctly (you may have been the one that told me this) but neocd loads the sprites as it needs them, i am not sure what would have to be done to the p rom to correct this so the game can run correctly, i dont think zintrick suffers from that since the sprites are small, im not sure but i think the neocd hardware can  only has 4mb of ram for sprites..  but i could also be totally wrong since i lost what info i had on the hardware :)

but anyway... using winhex for those that need a little help

mark the beginning and end of your file

ctrl+t select 16 byte swap

then to split into 2 files so it can be loaded by the mame driver select file manager and then dissect, select wordwise then save your 2 new files.  I tried to take some screen shots but they were not helpful at all :P

hope this helps... i will be out of town until monday evening, see ya later



Yep, ngcd only can load 4 mb of sprites at the same time, because ngcd only hast 4 mb of ram for that pourpose. even if it were possible, Hacking a Program rom to make diferent loads may be a pain in the ass :S.

Im still waiting someone that understand to fix the final romance 2 conversion that was released a long time ago , the program rom must be modified to avoid it hang , i think there could be some calls to bios or cd that do that. Anyone could help  :confused: :confused: :confused:
Title: Re: IQ's neogeo Tools
Post by: fernando2 on September 13, 2005, 10:56:00 PM
hi iq_132 do you have a source to decrypt kf10thep?

could you post it here?

thanks for your help

bye
Title: Re: IQ's neogeo Tools
Post by: robber804 on September 15, 2005, 01:53:37 AM
Yep, ngcd only can load 4 mb of sprites at the same time, because ngcd only hast 4 mb of ram for that pourpose. even if it were possible, Hacking a Program rom to make diferent loads may be a pain in the ass :S.

Im still waiting someone that understand to fix the final romance 2 conversion that was released a long time ago , the program rom must be modified to avoid it hang , i think there could be some calls to bios or cd that do that. Anyone could help  :confused: :confused: :confused:

NeoCD has these patches in place
Code: [Select]
/*** Patch BIOS exit ***/
*((short*)(neogeo_rom_memory+0x55e)) = 0xFABE;
*((short*)(neogeo_rom_memory+0x560)) = 0x4E75;

/*** Patch BIOS load files w/ now loading message ***/
*((short*)(neogeo_rom_memory+0x552)) = 0xFABF;
*((short*)(neogeo_rom_memory+0x554)) = 0x4E75;

/*** Patch BIOS load files w/out now loading ***/
*((short*)(neogeo_rom_memory+0x564)) = 0xFAC0;
*((short*)(neogeo_rom_memory+0x566)) = 0x4E75;

/*** Patch BIOS CDROM Check ***/
*((short*)(neogeo_rom_memory+0xB040)) = 0x4E71;
*((short*)(neogeo_rom_memory+0xB042)) = 0x4E71;

/*** Patch BIOS upload command ***/
*((short*)(neogeo_rom_memory+0x546)) = 0xFAC1;
*((short*)(neogeo_rom_memory+0x548)) = 0x4E75;

/*** Patch BIOS CDDA check ***/
*((short*)(neogeo_rom_memory+0x56A)) = 0xFAC3;
*((short*)(neogeo_rom_memory+0x56C)) = 0x4E75;

/*** Full reset, please ***/
*((short*)(neogeo_rom_memory+0xA87A)) = 0x4239;
*((short*)(neogeo_rom_memory+0xA87C)) = 0x0010;
*((short*)(neogeo_rom_memory+0xA87E)) = 0xFDAE;

/*** Trap exceptions ***/
*((short*)(neogeo_rom_memory+0xA5B6)) = 0x4AFC;
Title: Re: IQ's neogeo Tools
Post by: KaNyErO on September 15, 2005, 04:58:36 AM
thanks robber but im not sure how that will help to fix the fr2 conversion to aes/mvs


 :confused:
Title: Re: IQ's neogeo Tools
Post by: iq_132 on September 16, 2005, 01:08:41 AM
hi iq_132 do you have a source to decrypt kf10thep?

could you post it here?

thanks for your help

bye
Sure, here you go.
Title: Re: IQ's neogeo Tools
Post by: iq_132 on November 14, 2005, 02:10:57 PM
FILE *FP; // define FP

FP = fopen ("output.bin", "wb"); // define file name and what to do with it

fwrite (memory_region( REGION_CPU1 ), 1, memory_region_length( REGION_CPU1 ), FP); // write program data

fclose (FP); // close the file, you must do this or your program will crash.
Title: Re: IQ's neogeo Tools
Post by: iq_132 on November 14, 2005, 08:08:19 PM
lol, np :cool:
Title: Re: IQ's neogeo Tools
Post by: James33 on November 15, 2005, 06:20:28 AM
These are IQ's codes in use .

Code: [Select]
/* Rom decrypt codes */
static void save_dec_p(void)
{
FILE* PROM = fopen("xxx_p_bin", "wb");
if (PROM) {
fwrite(memory_region(REGION_CPU1), 1, memory_region_length(REGION_CPU1), PROM);
fclose(PROM);
}
}

static void save_dec_s(void)
{
FILE* SROM = fopen("xxx_s_bin", "wb");
if (SROM) {
fwrite(memory_region(REGION_GFX1), 1, memory_region_length(REGION_GFX1), SROM);
fclose(SROM);
}
}

static void save_dec_vs(void)
{
FILE* V1ROM = fopen("xxx_v1d.bin", "wb");
if (V1ROM) {
fwrite(memory_region(REGION_SOUND1), 1, 0x800000, V1ROM);
fclose(V1ROM);
}
FILE* V2ROM = fopen("xxx_v2d.bin", "wb");
if (V2ROM) {
fwrite(memory_region(REGION_SOUND1)+0x800000, 1, 0x800000, V2ROM);
fclose(V2ROM);
}
}
Title: Re: IQ's neogeo Tools
Post by: iq_132 on January 04, 2006, 06:24:40 AM
Posted this a few weeks ago at RomShare...

Quote
This program requires these files:

271-p1.bin   size 4194304 crc b9da070c sha1 1a26325af142a4dd221c336061761468598c4634
271-p2.bin   size 4194304 crc da3118c4 sha1 582e4f44f03276adecb7b2848d3b96bf6da57f1e
271-bios.bin size 262144  crc c521b5bc sha1 c9a5db63523191dedd1b39baab8772f64f09b77f

and will output these files:

271-p1c.bin  size 4194304 crc 530ecc14 sha1 812CF7E9902AF3F5E9E330B7C05C2171B139AD2B
271-p2c.bin  size 4194304 crc fd568da9 sha1 46364906A1E81DC251117E91A1A7B43AF1373ADA


Just put the required files in the same directory as 2k3toa.exe and run it.  The
program will even tell you the steps it is taking to create the output files.

IQ_132

This DOES NOT deal with the p3
Title: Re: IQ's neogeo Tools
Post by: iq_132 on January 04, 2006, 07:04:15 AM
Quote
These roms have been tested and work fine as input:

268-p1d.bin size 8388608 crc 16c063a9 sha1 5432869f830eed816ee5ed71c7fd39f749d15619

268-p1d.bin size 5242880 crc 5e8f307e sha1 49bcc5d082979ddd63994f36d3ae766d96f85ae9

268-p1d.bin size 8388608 crc 2ecc772d sha1 971db65d11aa98833c494fc2d7657cea702e4caa

268-p1d.bin size 5242880 crc 83270fef sha1 2f18c1a880b42e0faa6396c0fc90bb02bf4d24b1

If your rom isn't listed above, give it a try, it may work
(or not, you never know unless you try ;) ).



Make sure your p1 is named 268-p1d.bin, run ms5pcnv.exe,
and you should get these files:

rom ( name 268-p1cr.bin size 4194304 crc d0466792 sha1 880819933d997fab398f91061e9dbccb959ae8a1 )
rom ( name 268-p2cr.bin size 4194304 crc fbf6b61e sha1 9ec743d5988b5e3183f37f8edf45c72a8c0c893e )


 - IQ_132


PS. Thanks to Halrin for the original mslug5 Px decrypt routine :)
Title: Re: IQ's neogeo Tools
Post by: iq_132 on January 04, 2006, 03:04:08 PM
Quote
BootCEn -- Bootleg C Encryptor

The purpose of this tool is to encrypt and decrypt bootleg roms with
scrambled (protected) graphics.  It can deal with the type of scramble
used on:

   Lansquenet 2004
   King of Gladiator
   Samurai Shodown 5 (bl)

   Crouching Tiger, Hidden Dragon 2003
   Matrimelee (bl)
   SNK vs Capcom (bl)

   King of Fighters 2002 (bl)

This program only does one rom at a time, so it's best to use a .bat
to create the roms so that you don't have to convert them one-by-one.

Here's an example:

svcboot
----------------------------------

BootCEn 2 d svc-c1.bin svc-c1d.bin
BootCEn 2 d svc-c2.bin svc-c2d.bin
BootCEn 2 d svc-c3.bin svc-c3d.bin
BootCEn 2 d svc-c4.bin svc-c4d.bin
BootCEn 2 d svc-c5.bin svc-c5d.bin
BootCEn 2 d svc-c6.bin svc-c6d.bin
BootCEn 2 d svc-c7.bin svc-c7d.bin
BootCEn 2 d svc-c8.bin svc-c8d.bin


---------------------------------------------------------------------

If you want to know more commands for this tool, simply run it.
All available commands are listed. ;)

   -IQ

1.1 -- Thanks to Prof. Killjoy for pointing out a bug preventing use.
    - Also, fixed a bug with outputting if a file is not present.
Title: Re: IQ's neogeo Tools
Post by: KaNyErO on January 04, 2006, 05:15:38 PM
Thanks iq, i would need a little tool.

It´s similar to your s descrambler tool, but you should be able to use the swap as parameter instead of a predefined table when you know the swap but not the protection, for example if i need a new swap 8 like this....

rom = BITSWAP8(rom, 0, 6, 5, 4, 3, 2, 1, 7)

the usage should be

"swap 8 0,6,5,4,3,2,1,7"

The first number should be the swap type, and the second separated by an space from the swap type and separated by , between them is the kind of moves that should be made.

This tool + bswap8 could make very easy to decrypt every new rom using the original + the encrypted, even if the swap was not programed in the tool like it was in S_decrypt

Thanks
Title: Re: IQ's neogeo Tools
Post by: prof.killjoy on January 10, 2006, 12:06:55 AM
IQ, there is a bug in BootCEn.

if (argc < 6)

should read

if (argc < 5)

and recompile, then it should work as expected.
Title: Re: IQ's neogeo Tools
Post by: iq_132 on January 10, 2006, 12:35:29 AM
Ah thanks :) I wonder why I didn't notice that before????
Title: Re: IQ's neogeo Tools
Post by: prof.killjoy on January 10, 2006, 01:07:40 AM
Ah thanks :) I wonder why I didn't notice that before????

No problem :biggrin:
Is it possible to write a tool to deal with the protection of other roms i.e. Vs in lans2004 romset?
Title: Re: IQ's neogeo Tools
Post by: iq_132 on January 10, 2006, 01:58:28 AM
Quote
bitswap8 is a tool to bitswap files. It can only do bitswaps of 8 bits for now.
You can encrypt and decrypt with the same commands.


Here's an example of how to use it:

bitswap8 246-v1.bin lnsq-v1.bin 0 1 5 4 3 2 6 7

    input_file output_file

Enjoy.

   -IQ
Title: Re: IQ's neogeo Tools
Post by: fernando2 on January 12, 2006, 08:41:20 AM
These are IQ's codes in use .

Code: [Select]
/* Rom decrypt codes */
static void save_dec_p(void)
{
FILE* PROM = fopen("xxx_p_bin", "wb");
if (PROM) {
fwrite(memory_region(REGION_CPU1), 1, memory_region_length(REGION_CPU1), PROM);
fclose(PROM);
}
}

static void save_dec_s(void)
{
FILE* SROM = fopen("xxx_s_bin", "wb");
if (SROM) {
fwrite(memory_region(REGION_GFX1), 1, memory_region_length(REGION_GFX1), SROM);
fclose(SROM);
}
}

static void save_dec_vs(void)
{
FILE* V1ROM = fopen("xxx_v1d.bin", "wb");
if (V1ROM) {
fwrite(memory_region(REGION_SOUND1), 1, 0x800000, V1ROM);
fclose(V1ROM);
}
FILE* V2ROM = fopen("xxx_v2d.bin", "wb");
if (V2ROM) {
fwrite(memory_region(REGION_SOUND1)+0x800000, 1, 0x800000, V2ROM);
fclose(V2ROM);
}
}

this code goes on neogeo.c? i don`t understand how to use it someone could explain how it works please?

thanks for your help
Title: Re: IQ's neogeo Tools
Post by: FerchogtX on February 15, 2006, 11:45:35 AM
add that at the end of your codes in desired driver init... maybe there's another place to add that... maybe in the MACHINE DRIVER START function
See ya!!!! :biggrin:
Title: Re: IQ's neogeo Tools
Post by: dante999 on January 30, 2007, 11:51:54 PM
Hi iq_132
do you have a 'SVC P rom encrypt' tool?
i found 'p_dec'... so i want to encrypt tool
thanks your help!
 
Title: Re: IQ's neogeo Tools
Post by: LastResort on March 11, 2007, 03:08:48 AM
Yep, ngcd only can load 4 mb of sprites at the same time, because ngcd only hast 4 mb of ram for that pourpose. even if it were possible, Hacking a Program rom to make diferent loads may be a pain in the ass :S.

Im still waiting someone that understand to fix the final romance 2 conversion that was released a long time ago , the program rom must be modified to avoid it hang , i think there could be some calls to bios or cd that do that. Anyone could help  :confused: :confused: :confused:

Can anyone post the website to download the fr2 roms, or post them. I'll take a look at what's wrong with them.

Thanks

Title: Re: IQ's neogeo Tools
Post by: KaNyErO on March 11, 2007, 08:30:42 AM
thanks but final romance 2 is fully playable long time ago :)
Title: Re: IQ's neogeo Tools
Post by: iq_132 on April 14, 2007, 10:04:21 PM
Quote

   What is neoconv?
 -----------------------------------------

    neoconv is a tool to encrypt/decrypt V (sample) roms for Neo-Geo.
    It can process Neo-PCM2, 1999, SNK Corp. type encryption, and also
    Neo-PCM2, 2002, Playmore Corp. type encryption.

   The games supported are:

      Metal Slug 4         (SNK Type)
      Rage of the Dragons      (SNK Type)
      King of Fighters 2002, The   (Playmore type)
      Matrimelee         (Playmore type)
      Pochi and Nyaa         (SNK Type)
      Metal Slug 5         (Playmore type)
      SNK vs Capcom: Chaos      (Playmore type)
      Samurai Shodown 5      (Playmore type)
      King of Fighters 2003, The   (Playmore type)
      Samurai Shodown 5 Special   (Playmore type)


   How do I use it?
 -----------------------------------------

    If you have any questions, just run the program.  It will tell you
    what commands it supports.


   Who wrote this program?
 -----------------------------------------

    Most of the code for this program was written by IQ_132, but large,
    very important chunks of it were written by or based on code by
    Fataku, Aquasync, Halrin, and El Semi.


   Changelog
 -----------------------------------------

    2.0
   Complete rewrite
   Code is much shorter and cleaner
   Decrypt/Encrypt for PCM2 Version 2 (Playmore, 2002) unified and shortened
   Decrypt/Encrypt for PCM2 Version 1 (SNK, 1999) shortened and uses less ram
   Added about section in info
   Changed some descriptions of options in the commands info

Please not that for the end user there is no real difference between this and version 1.0.  I was just very unhappy with how the code was/is and wanted to clean it up a bit.
Title: Re: IQ's neogeo Tools
Post by: CaptainCPS on April 15, 2007, 01:01:45 AM
Nice IQ  :wink: ^^, ...I was looking at it , and like those crazy ideas that come sometimes to my mind, well...I was thinking that maybe I can make a Win32 GUI version of it in the future for you  :smilie:

I will talk to you about this on MSN later when I get the chance to connect  :wink:

SeeYaa!
 :biggrin:

Title: Re: IQ's neogeo Tools
Post by: DsNo on November 03, 2007, 11:11:19 PM
Use SMA, programming which converts P ROMs of the games which chipsets will be possible?
(ex.. Garou, Mslug3, Kof99, Kof2000)

Encrypt -> Decrypt P Roms
Decrypt -> Encrypt P Roms
Title: Re: IQ's neogeo Tools
Post by: iq_132 on November 04, 2007, 02:11:26 AM
Encrypting/decrypting SMA roms isn't a big deal at all.  It's a simple bitswap and rom overlay.
Simply a matter of bitswapping + moving memory chunks.
Title: Re: IQ's neogeo Tools
Post by: iq_132 on December 03, 2009, 01:40:58 PM
Here's a little tool I made for my friend kanyero.  it fixes the order of the graphics in some neogeo games. It was made in particular for emulators on the dingoo.

I haven't tested it much and it could be cleaned up and simplified, but I really just threw it together.
Title: Re: IQ's neogeo Tools
Post by: KaNyErO on December 07, 2009, 10:04:18 AM
Here's a little tool I made for my friend kanyero.  it fixes the order of the graphics in some neogeo games. It was made in particular for emulators on the dingoo.

I haven't tested it much and it could be cleaned up and simplified, but I really just threw it together.

Thanks a lot iq.

Btw, i was able to convert kof2k3 to .mvs format used in dingoo, but the problem is that i dont have sound at all. I dont know why some games doesnt have it at all, and for example garou only play sounds and music with the prototype release (well that´s acording to the compatibility list) .... :S

We forgot to add the .txt files for world heroes :S

Title: Re: IQ's neogeo Tools
Post by: fosamax on February 25, 2010, 03:44:17 PM
Finally managed to get ironclad working on the dingoo.

I don't know if Kanyero still needs that one.

Can I post the mvs file here or should I make an how to to explain how to make it work ?

By the Kanyero, which games did you manage to fix/add to the classic mvs roset v1.0 ?
Title: Re: IQ's neogeo Tools
Post by: KaNyErO on February 26, 2010, 10:49:02 AM
Finally managed to get ironclad working on the dingoo.

I don't know if Kanyero still needs that one.

Can I post the mvs file here or should I make an how to to explain how to make it work ?

By the Kanyero, which games did you manage to fix/add to the classic mvs roset v1.0 ?

This games are playable now in native dingoo emulator:

King of fighters 2003 (without sound)
art of fighting
Fatal fury 2
ironclad
king of gladiators
king of the monsters 2
lansquenet 2004
sengoku 2
super side kicks

I should take a look at world heroes, chtd2003  and other homebrew games and hacks (plus versions and other) , but i dont have too much time now.

Since .mvs files are in fact roms, i dont think they are allowed here, but feel free to post how to convert them.


Title: Re: IQ's neogeo Tools
Post by: bankbank on September 03, 2021, 11:03:07 PM
hi iq_132

is there any chance you could add kof98 to your p_dec tool? as well as add an option for re-encryption?

I want to do a romhack for kof98 and I need to be able to decrypt and re-encrypt the binary.

here is the decryption code, taken from https://raw.githubusercontent.com/ColumPaget/gngeo-cjp/master/src/neocrypt.c :

Code: [Select]
/* Kof98 uses an early encryption, quite different from the others */
void kof98_decrypt_68k(running_machine *machine)
{
UINT8 *src = memory_region(machine, "maincpu");
UINT8 *dst = alloc_array_or_die(UINT8, 0x200000);
int i, j, k;
static const UINT32 sec[]={0x000000,0x100000,0x000004,0x100004,0x10000a,0x00000a,0x10000e,0x00000e};
static const UINT32 pos[]={0x000,0x004,0x00a,0x00e};

memcpy( dst, src, 0x200000);
for( i=0x800; i<0x100000; i+=0x200 )
{
for( j=0; j<0x100; j+=0x10 )
{
for( k=0; k<16; k+=2)
{
memcpy( &src[i+j+k],       &dst[ i+j+sec[k/2]+0x100 ], 2 );
memcpy( &src[i+j+k+0x100], &dst[ i+j+sec[k/2] ],       2 );
}
if( i >= 0x080000 && i < 0x0c0000)
{
for( k=0; k<4; k++ )
{
memcpy( &src[i+j+pos[k]],       &dst[i+j+pos[k]],       2 );
memcpy( &src[i+j+pos[k]+0x100], &dst[i+j+pos[k]+0x100], 2 );
}
}
else if( i >= 0x0c0000 )
{
for( k=0; k<4; k++ )
{
memcpy( &src[i+j+pos[k]],       &dst[i+j+pos[k]+0x100], 2 );
memcpy( &src[i+j+pos[k]+0x100], &dst[i+j+pos[k]],       2 );
}
}
}
memcpy( &src[i+0x000000], &dst[i+0x000000], 2 );
memcpy( &src[i+0x000002], &dst[i+0x100000], 2 );
memcpy( &src[i+0x000100], &dst[i+0x000100], 2 );
memcpy( &src[i+0x000102], &dst[i+0x100100], 2 );
}
memcpy( &src[0x100000], &src[0x200000], 0x400000 );

free(dst);
}

thank you!
Title: Re: IQ's neogeo Tools
Post by: iq_132 on January 26, 2024, 12:21:08 AM
Here's a tool to encrypt and decrypt NeoGeo M1 roms, by request
Title: Re: IQ's neogeo Tools
Post by: Igor_Arabe on February 07, 2024, 05:52:43 PM
Thx. I tested only with encrypted M1 roms. This tool don't decrypt kf2k3pcb's M1 properly.
The Old version(?) 'm1crypt' (https://neo-source.com/index.php?topic=1055.msg8623#msg8623) too.

source: 271-m1.m1, crc: d6bcf2bc
generated rom: 271-m1.m1-decrypted, crc: 189ab969