King of Fighters 94: Team Edit hack

city41

Galford's Poppy Trainer
10 Year Member
Joined
Dec 27, 2010
Posts
2,602
Thanks to the 1.3.1 changes, I'm now able to get the character grid to scale down like it does in kof95


I can't get the characters to slide in or anything else that kof95 does, just the grid and chosen avatars. But I still think it looks better than nothing at all.

This is a feature @SieKensou asked for ages ago.

Oh and team USA's colors on the character grid have been wrong this whole time! If you look in the video, that's now fixed too.
 
Last edited:

Neo Alec

Onigami Isle Castaway
20 Year Member
Joined
Dec 7, 2000
Posts
13,078
Amazing! This is KOF94. It doesn't need to have all the graphical features of KOF95.

I feel bad for anyone who already tried to build a cart of this. Amazing living projects like this are one of the biggest reason to have flash carts! (Too bad the cart causes glitchy graphics in this case.)
 

city41

Galford's Poppy Trainer
10 Year Member
Joined
Dec 27, 2010
Posts
2,602
(Too bad the cart causes glitchy graphics in this case.)

Fixing kof94 (and the other games) so they don't need wait cycles should be doable. Basically wait cycles are a workaround for an improperly coded game.

I'm not saying I'm gonna do that :) just I think it's possible. Find all the places the game writes to video ram, and slow down the writes (avoid writing double words in one go, and add noops as needed). It would probably be challenging to do, but I think possible.
 

NeoSeeD

Crazed MVS Addict
Joined
Jul 29, 2023
Posts
136
I think the mister team already has. In a mister distro, in the /media/fat/games/NEOGEO directory is romsets.xml, which has all official games. If a game has p_wait="1" and/or rom_wait="1" specified, then it is using one form of wait cycles (there are three different forms in total).

Not sure where romsets.xml lives outside of a mister distribution, I can't find it in their github repo.

A US AES with serial 13793 and uses the PRO-POW power supply.

I'm not a hardware guy at all. But maybe the randomness across different systems has to do with how fast a given system's video RAM is. I would guess SNK had a spec and some systems are a bit faster and some slower, but all fall within the spec. Total, wild guess.


I posted another message to their discord. This is the only form of contact I know of.

If the neosd has control of the 3 wait cycle cartridge pins, maybe this can be fixed with a firmware update?
AFAIK, Alex only answers on Weekdays on that discord. He takes weekends off. Neodev hops on and off occasionally. At this point, Terraonion needs to hire at least one additional FPGA dev. Running a company with one part time dev on these expensive products is ridiculous. Having at least two customer service reps to answer the repeat questions would probably help them out as well.
 

SieKensou

n00b
Joined
Jul 8, 2017
Posts
34
Thanks to the 1.3.1 changes, I'm now able to get the character grid to scale down like it does in kof95


I can't get the characters to slide in or anything else that kof95 does, just the grid and chosen avatars. But I still think it looks better than nothing at all.

This is a feature @SieKensou asked for ages ago.

Oh and team USA's colors on the character grid have been wrong this whole time! If you look in the video, that's now fixed too.
Looks awesome! Nice job!
 

city41

Galford's Poppy Trainer
10 Year Member
Joined
Dec 27, 2010
Posts
2,602
Someone on discord has a darksoft multimvs and confirmed that they got glitches in Ninja Commando too. Pretty sure this also means Darksoft does not turn on wait cycles.

It's interesting that after real hardware and carts, the mister probably provides the most accurate experience.
 

city41

Galford's Poppy Trainer
10 Year Member
Joined
Dec 27, 2010
Posts
2,602
Running a company with one part time dev on these expensive products is ridiculous.
Yeah, and their discord is a firehose. If you ask a question it will get lost in the shuffle very quickly most of the time.

I really have a love/hate going with TerraOnion :)
 

NeoSeeD

Crazed MVS Addict
Joined
Jul 29, 2023
Posts
136
Yeah, and their discord is a firehose. If you ask a question it will get lost in the shuffle very quickly most of the time.

I really have a love/hate going with TerraOnion :)
It was better when Todd was there to handle a lot of the level 1 support for them. Once he left, it became the total mess that it is these days.
 

Neo Alec

Onigami Isle Castaway
20 Year Member
Joined
Dec 7, 2000
Posts
13,078
I think I have a good theory why the character select/character glitch doesn't show up on my AES and MV1C: Those are my two systems that have 24.16 MHz clock crystals instead of 24MHz.
 

city41

Galford's Poppy Trainer
10 Year Member
Joined
Dec 27, 2010
Posts
2,602

Version 1.4.0​


The original purpose of this release was to address the lagginess on the MiSTer. It also got a lot of bug fixes and a lot of polish. Even if you don't play on a MiSTer, this version is highly recommended.

This is the final planned release. There will be no more features added to the hack. The only way there will be more releases beyond this one is if a bug is found. Even then, a judgment call will be made on how bad the bug is.

Changes​

  • All laginess and graphical glitches on the MiSTer are resolved. It plays on the MiSTer beautifully now.
  • A new scaling and sliding transition when going from character select to order select. Similar to KOF95's, (but not exactly the same).
  • Player and CPU cursor tweaks and polish.
  • When the CPU is using non-custom teams, the way it selects its team is now similar to how KOF95 does it.
  • Bug fix: when using KOF95/98 avatars on the character select screen, team USA had the wrong colors. They are now correct.
  • Bug fix: when choosing team random select, the "choice" sound effect would not play. It now does.
  • Bug fix: when playing on player one side, against the cpu, using cpu custom teams, and then continuing, the cpu characters would be flipped. That is now fixed.
  • Bug fix: when winning the game on the player 2 side, the wrong team member would speak during certain cutscenes. That is now fixed.

Known Issues​

Graphical glitches can occur when playing on real hardware with a NeoSD or the Darksoft multi. This is due to limitations in these carts. The original KOF94 game played on these carts has the same graphical glitches. There is no way to fix this.
 

city41

Galford's Poppy Trainer
10 Year Member
Joined
Dec 27, 2010
Posts
2,602
I think I have a good theory why the character select/character glitch doesn't show up on my AES and MV1C: Those are my two systems that have 24.16 MHz clock crystals instead of 24MHz.
someone on discord also reported they don't get the ninja commando graphical glitches on their neosd.

So I think whether you get the glitch or not varies from system to system.
 

Neo Alec

Onigami Isle Castaway
20 Year Member
Joined
Dec 7, 2000
Posts
13,078
someone on discord also reported they don't get the ninja commando graphical glitches on their neosd.

So I think whether you get the glitch or not varies from system to system.
That's odd. That one I seemed to get on all my systems.
 

HornheaDD

Viewpoint Vigilante
Fagit of the Year
Joined
Mar 22, 2016
Posts
4,749
Seem to have an issue trying to get this to run on my MiSTer. I put the zip file where my other Neo ROM files are, and when I load the core to select the game, it shows that kof94te is a directory, not a zip. But I put a zip file in there, not a directory. I have yet to try it on MAME though.
 

city41

Galford's Poppy Trainer
10 Year Member
Joined
Dec 27, 2010
Posts
2,602
Seem to have an issue trying to get this to run on my MiSTer. I put the zip file where my other Neo ROM files are, and when I load the core to select the game, it shows that kof94te is a directory, not a zip. But I put a zip file in there, not a directory. I have yet to try it on MAME though.
The MiSTer uses .neo files, the same file format as the NeoSD. When building the ROM, choose that format and from there it should work fine.

a.png It will show up in your menu as "kof94_te95" or something similar depending on how you built it. Unfortunately there's really no good way to put a name in the menu for these hacks.
 

HornheaDD

Viewpoint Vigilante
Fagit of the Year
Joined
Mar 22, 2016
Posts
4,749
The MiSTer uses .neo files, the same file format as the NeoSD. When building the ROM, choose that format and from there it should work fine.

View attachment 75929 It will show up in your menu as "kof94_te95" or something similar depending on how you built it. Unfortunately there's really no good way to put a name in the menu for these hacks.
Ah I see, will try that when I have a sec.
 

city41

Galford's Poppy Trainer
10 Year Member
Joined
Dec 27, 2010
Posts
2,602
I never realized how much slowdown kof94 has. Whenever I find slowdown in the hack, I compare it to the original game and so far it always matches. I'm not surprised as when you're actually fighting the hack is completely out of the picture.

Things like ABC charging on the Brazil stage causes a lot of slow down. Athena's DM causes various amount of slowdown depending on the stage you're on (Mexico, just a bit, England and China, a lot) and there's probably a more.
 

HornheaDD

Viewpoint Vigilante
Fagit of the Year
Joined
Mar 22, 2016
Posts
4,749
Got it to work as a .neo file. Thanks city41, for that and for the hack itself. Hope I can put some time into it this weekend. Although I still wasn't able to get it to work on mame or FinalBurn (as kof94te.zip). Im hoping it works so I can play it on my chewlix.
 

city41

Galford's Poppy Trainer
10 Year Member
Joined
Dec 27, 2010
Posts
2,602
on mame or FinalBurn (as kof94te.zip)
Yeah, the modern way of playing neo games is such a mess now. I really wish emulators would just load a file and not worry about all of this. They are trying to be "helpful" when in actuality they cause (a lot of) confusion.

On mame
Choose the "download for mame" option on my website. Rename the file back to kof94.zip. Then from there depending on how you launch games on mame, it might still not play the game as it will notice the files are different and think something is wrong. I work around this by launching the game from the command line. I think there are ways to tell the gui to also launch the game? HBMame is another way around this, it supports kof94te but probably not 1.4.0 yet.

On a recent version of fbneo that supports the hack
You need both vanilla kof94.zip and the fbneo specific kof94te.zip. That second file only contains the changed roms. FBneo combines the two to form the final game. That is the "download as fbneo" option on my website.

With both files in your rom directory, it should look like this in fbneo

1719592565018.png

Notice mine says 1.1.9, a now very old version of the hack. fbneo has updated to 1.4.0, but you might not have that version yet.

This isn't a problem. It will cause this warning to pop up, just press OK and the game will play fine

1719592622385.png

On old versions of fbneo that don't support the hack
Download the mame version from my website. Rename it to kof94.zip, and then just launch vanilla kof94 in fbneo. You will see the same warning, just press OK and again the game will play just fine.
 

Neo Alec

Onigami Isle Castaway
20 Year Member
Joined
Dec 7, 2000
Posts
13,078
The slowdown was part of the ambiance in those days. No one ever questioned it. Hacks and emulation weren't things. Simpler times.
 

city41

Galford's Poppy Trainer
10 Year Member
Joined
Dec 27, 2010
Posts
2,602
The slowdown was part of the ambiance in those days. No one ever questioned it. Hacks and emulation weren't things. Simpler times.
The slowdown doesn't happen if wait cycles aren't turned on. Easiest way to see that is to play on a NeoSD (hack or vanilla).

The slowdown does happen with a real KOF94 cart on real hardware. It's pretty much identical to the slowdown you see on the MiSTer.

It's really a shame this was missed on the NeoSD. True, not many games use wait cycles, but KOF94 does. And I think it's one of the most important games in the library. Oh well, nothing can be done.
 

Neo Alec

Onigami Isle Castaway
20 Year Member
Joined
Dec 7, 2000
Posts
13,078
The slowdown doesn't happen if wait cycles aren't turned on. Easiest way to see that is to play on a NeoSD (hack or vanilla).

The slowdown does happen with a real KOF94 cart on real hardware. It's pretty much identical to the slowdown you see on the MiSTer.

It's really a shame this was missed on the NeoSD. True, not many games use wait cycles, but KOF94 does. And I think it's one of the most important games in the library. Oh well, nothing can be done.
That's kind of a shame that the game could've run at full speed without wait cycles enabled. That almost makes playing it on a NeoSD worth it if you don't mind the inaccuracy of basically overclocking it. On my 2.14MHz systems, the glitches are limited to unimportant details.
 

city41

Galford's Poppy Trainer
10 Year Member
Joined
Dec 27, 2010
Posts
2,602
That's kind of a shame that the game could've run at full speed without wait cycles enabled. That almost makes playing it on a NeoSD worth it if you don't mind the inaccuracy of basically overclocking it. On my 2.14MHz systems, the glitches are limited to unimportant details.

I can see both sides. The flickering win quotes to me is annoying and look bad. For the longest time I thought that was just how the game was, but I've also only played it on a neosd for like the past I dunno, 5 years or whatever.

If anyone wants to avoid the slowdown on the mister, you just need to change the ngh number.

The best solution would be to fix the game. Maybe someday I'll look into that.
 

city41

Galford's Poppy Trainer
10 Year Member
Joined
Dec 27, 2010
Posts
2,602
The saga continues. paulb-nl of the mister team said

I did some digging and compared the vram writes of kof94 cart and the Neo Geo CD version. Since the CD version does not use wait cycles I expected a difference and I found it.

The cart version uses the instruction move.w D0, (A1) to clear parts of vram. This only takes 8 CPU cycles which is not enough without wait cycles. The CD version uses move.w D0, ($2,A1) which takes 12 CPU cycles.

I changed the instruction to move.w (A5), (A1). This opcode is still only 1 word and takes 12 CPU cycles. A5 contains $108000 which is cleared by the System ROM and the game but I don't know if that memory location is used somewhere else in the game. This is just a test to write $0000 to vram in another way to see if it avoids the glitches.

The change is $8032 to $9532 at $133904-133A03 and $133A32-133B31 in the original 055-p1.p1 file.

I did not see any glitches including the win quotes after this change without wait cycles enabled but I just briefly tested this.

This does make the clearing of vram slower when wait cycles are enabled so there is a chance there could be some issues to have this change and wait cycles together if it does not finish in time.

 

city41

Galford's Poppy Trainer
10 Year Member
Joined
Dec 27, 2010
Posts
2,602
PaulB on the MiSTer team figured out a clever way to remove the slowdown from the game and fix the graphical glitching when playing on real hardware or the MISTer.

His approach seems very safe, it's a tiny isolated change. But it still needs testing before going mainstream. I predict I will push this out to the main site by the end of the weekend.

If anyone wants to test it out, the patch is available here:
https://neorh-git-kof94-wait-cycles-matt-greers-projects.vercel.app/kof94

Build the game as you normally would, but also choose the "Fix Slowdown/Graphics" patch along with it.

The patch can also be used to fix vanilla KOF94. To do that, don't check the team edit patch, just the fix slowdown patch.

This is MiSTer/NeoSd/Darksoft specific. If you play on an emulator, you won't see any difference. But helping us test is still welcome if you want to.

1719676610373.png
 

Neo Alec

Onigami Isle Castaway
20 Year Member
Joined
Dec 7, 2000
Posts
13,078
This is very clever, looking at the Neo Geo CD version as a solution.

I tested the new patch briefly on the MV4F board that was showing the issues before, and so far so good. The glitches are gone, and nothing weird happened.

I wonder if PaulB might consider looking at Ninja Commando and Ninja Combat on the NGCD too if he has time.

I could see this patch becoming the definitive way to play the game on flash carts if the carts themselves never fix the issues and no big downsides are found with it.
 
Top