XaiJu
JOTEGO
JOTEGO

patreon


MX5000/Flak Attack: a tale of two chips

Summary:

-New Konami core: MX5000/Flak Attack
-MiSTer: unzip the attached mister file directly on the root of your SD card, OR run update_all and copy jtbeta.zip to games/mame manually (only if needed). jtbeta.zip is inside the mister zip file.
-All files are also stored in the Discord #betafiles channel

Details:

As you may know, Contra was the first Konami core I made. That game hardware is centred around a custom chip called K007121. There were quite a few unknowns about it, and MAME emulation for it wasn't uniform. There was a central file with information, but all games seem to hack special logic rather than rely on a single implementation. Furrtek came in to help, and he extracted the schematics for that custom chip. I modified my implementation to fit the original and got three games (Contra, Trick'n Trap and Combat School) working correctly. 

Other games were using the chip too. I found and acquired the schematics for MX5000, PastBlaster and FunkyCochise  donated their boards too (one for Furrtek and one for me). Furrtek also looked into the PCM chip used, the K007232, and extracted the schematics too.

However, the schematics were confusing. There were two units of the same graphic chip (like in Contra and Combat School) but only one of them was connected to ROMs. The other had their data inputs grounded (all zeros) but kept the external RAM used for the sprite line buffers. It didn't have it own video RAM either, but seemed to be getting the VRAM data from the first chip. The outputs of the two chips merged in an odd way to drive the palette chip. 

What was all that about? What was the role of the second chip? How could a graphics chip be used without any ROM information?

On top of that, in the place where the palette PROMs would connect there was a odd connection going from the first chip to the second through some logic gates. It was as though the second chip was just sucking the information out of the first one, but what for?

After much staring at the schematics, it finally dawn on me. The second chip was only getting the silhouettes of the graphics data that the first chip was producing, and based on this information it was dumping a single 4-bit value of palette information. Indeed, all this circuitry was just outputting information that the first chip already had but wasn't present in its pins. That information was the tile/sprite internal 4-bit palette value.

Once I understood this, I actually removed the second chip from the core and directly wired the internal 4-bit value to the output of the replicated K007121. That is a much cleaner solution and the one the Konami engineers would have preferred if they had the option.

The result of this chip arrangement can be seen in the game in terms of a more colourful title compared to Contra, Combat School, etc. Konami designed a single chip, but the way it is connected is different in every game, expanding the possibilities of the original design.

Español

Resumen:

-Nuevo cor de Konami: MX5000 / Flak Attack
-MiSTer: descomprima el archivo mister adjunto directamente en la raíz de su tarjeta SD, O ejecute update_all y copie jtbeta.zip a games / mame manualmente (solo si es necesario). jtbeta.zip está dentro del archivo zip mister.
-Todos los archivos también se almacenan en el canal Discord #betafiles

Detalles:

Como sabrás, Contra fue el primer juego de Konami que hice. El hardware de ese juego se centra en un chip propio de Konami llamado K007121. Había bastantes incógnitas al respecto, y la emulación de MAME no era uniforme. Había un archivo central con información, pero todos los juegos tiraban de alguna lógica especial en lugar de depender de una única implementación. Furrtek arrimó el hombro y extrajo los esquemas de ese chip. Modifiqué mi implementación para que se ajustara al original y obtuve tres juegos (Contra, Trick'n Trap y Combat School) funcionando correctamente.

Otros juegos también usaban el mismo chip. Encontré y adquirí los esquemas para MX5000, PastBlaster y FunkyCochise también donaron sus placas (una para Furrtek y otra para mí). Furrtek también examinó el chip PCM utilizado, el K007232, y extrajo los esquemas.

Sin embargo, los esquemas eran confusos. Había dos unidades del mismo chip gráfico (como en Contra y Combat School) pero solo una de ellas estaba conectada a la ROM. El otro chip tenía sus entradas de datos conectadas a tierra (todos ceros) pero mantenía la RAM externa utilizada para los búferes de línea de sprites. Tampoco tenía su propia RAM de video, pero parecía estar obteniendo los datos de VRAM del primer chip. Las salidas de los dos chips se fusionaban de una manera extraña para atacar el chip de paleta.

¿Qué era eso? ¿Cuál era el papel del segundo chip? ¿Cómo se podría utilizar un chip gráfico sin información de ROM?

Además de eso, en el lugar donde se conectarían las PROM de paleta había una conexión extraña que iba del primer chip al segundo a través de algunas puertas lógicas. Era como si el segundo chip estuviera absorbiendo la información del primero, pero ¿para qué?

Después de mirar mucho los esquemas, finalmente me di cuenta. El segundo chip solo obtenía las siluetas de los datos gráficos que estaba produciendo el primer chip y, en base a esta información, descargaba un único valor de 4 bits de información de paleta. De hecho, todos estos circuitos solo emitían información que el primer chip ya tenía pero que no estaba presente en sus pines. Esa información era el valor de la paleta de 4 bits interna de los fondos y objetos.

Una vez entendí esto, opté por quitar el segundo chip del cor y simplemente conecté el valor interno de 4 bits a la salida del primer K007121 replicado. Esa es una solución mucho más limpia y la que los ingenieros de Konami hubieran preferido de haber tenido la opción.

El resultado de esta disposición de chips se puede ver en el juego en cuanto que es un título más colorido en comparación con Contra, Combat School, etc. Konami diseñó un solo chip, pero la forma en que está conectado es diferente en cada juego, ampliando las posibilidades del diseño original.

MX5000/Flak Attack: a tale of two chips MX5000/Flak Attack: a tale of two chips MX5000/Flak Attack: a tale of two chips

Comments

That one is a true classic!

JOTEGO

Would be awesome to see Juno First some day.

Alexander Stieglmayr

THX !

ZEP59


More Creators