(español abajo)
Although probably not easy to spot, the starfield in Side Arms was wrong. And it was driving me crazy. I had the schematics for it, so in principle, I should have been able to replicate it perfectly. However, when people sent me photos of their cabinets, I could see differences.
Emulation did not help in this case as the star field in MAME was completely different. A curious thing about MAME though, was that it referred to a ROM twice the size of what the schematics had. So what was going on here?
I found out in one of my visits to Museo Arcade that they had a Side Arms system. So I prepared Esperanza for her first business trip. I taught her how to dump the ROM, so we could check it against MAME. She had also studied the schematics and was ready to verify them chip by chip. She spent a whole Saturday there. Each time she found something, she forwarded it to me and then I adjusted the core to match it. However, we could not make them match.
The MAME ROM size matched the PCB, and the contents too. The PCB was a bootleg but we could find all the chips connected in the same way, just in different locations. Eventually, we asked them to loan us the PCB and continued studying it in the lab.
Going over it again it finally dawned on me: all these PCB pictures had the star field duplicated in each half of the screen. Modifying the FPGA core to only use the right half of the star field twice produced the same results as all those photos. But the circuit was intended to draw a full star field, not just half and repeat it! What happened?
Meet ageing: the way the 9-bit value that drives the star ROM is produced requires of two adders for the first 8 bits, and a poor-man’s 1-bit adder connected to a capacitor to match delays. Well, it looks like a few decades later delays are not matched anymore and all those PCBs around have lost the 9th bit and have broken star fields. This was quite surprising. I decided to add an option in the core so we can have the intended star field found on fresh PCBs when they were produced and also the aged one. Have a look!
One more bug fixed is the refill screen of Carrier Airwing. The hoses appeared over the large airplane, rather than from behind it. I rewrote the logic controlling the layer priorities and that fixed it but now the nice logo effect in Nemo looks like in MAME (check this video). I have got footage from a real PCB and it looks the same but that PCB uses a re-programmed CPS-B chip using the values in MAME -same as I do. So I still wonder whether there is something wrong in the configuration that we apply to the CPS-B chip in that game. I will find out more about it. In the mean time, we can finally have the correct layer priority in Carrier Airwing.
Just run update_all if you use MiSTer, or download the files from JTBIN directly if you use a different platform. Oh, Santa will come with a new arcade core next week!
Español
Aunque no es fácil de detectar, las estrellas en Side Arms estaban mal. Y me estaba volviendo loco. Tenía los esquemas para ello, así que, en principio, debería haber podido replicarlo perfectamente. Sin embargo, cuando la gente me envió fotos del original, pude ver diferencias, ¡muchas!
La emulación no ayudó en este caso ya que el campo de estrellas en MAME era completamente diferente. Sin embargo, una cosa curiosa sobre MAME era que se refería a una ROM dos veces mayor que la que tenían los esquemas. Entonces, ¿qué estaba pasando aquí?
Descubrí en una de mis visitas al Museo Arcade que tenían un sistema Side Arms. Así que preparé a Esperanza para su primer viaje de empresa. Le enseñé cómo volcar la ROM, para que pudiéramos compararla con MAME. También estudió los esquemas y estaba lista para verificarlos chip a chip. Pasó todo un sábado allí. Cada vez que encontraba algo, me lo pasaba y yo ajustaba el core. Sin embargo, no pudimos hacerlos coincidir.
El tamaño de la ROM de MAME era igual en la PCB y también el contenido. La PCB era pirata, pero pudimos encontrar todos los chips conectados de la misma manera, solo que en diferentes ubicaciones. Finalmente, les pedimos que nos prestaran la PCB y continuamos estudiándola en el despacho.
Al repasarlo de nuevo, finalmente me di cuenta: todas estas imágenes de PCB tenían el campo de estrellas duplicado en cada mitad de la pantalla. Modifiqué el core de FPGA para usar solo la mitad derecha del campo de estrellas dos veces. Y eso sí dio los mismos resultados que todas esas fotos. ¡Pero si el circuito estaba destinado a dibujar un campo de estrellas completo, no solo la mitad y repetirlo! ¿Qué pasaba?
La vejez: la forma en que se produce el valor de 9 bits que controla la ROM de estrellas requiere dos sumadores para los primeros 8 bits y un sumador de 1 bit separado conectado a un condensador para igualar los retrasos en la placa. Bueno, parece que unas décadas más tarde, con los circuitos envejecidos, los retrasos ya no coinciden y todos esas PCB han perdido el noveno bit y se les han roto las estrellas. Esto fue bastante sorprendente. Decidí agregar una opción en el core para que podamos usar el campo de estrellas que queramos: el original de una placa nueva y también el envejecido. ¡Echad un vistazo!
Un error más corregido es la pantalla de recarga de Carrier Airwing. Las mangueras salían sobre el gran avión, en lugar de detrás de él. Reescribí la lógica que controlaba las prioridades de las capas y eso lo solucionó, pero ahora el bonito efecto del logo en Nemo se ve como en MAME (mira este video). Tengo imágenes de una PCB real y se ve igual, pero esa PCB usa un chip CPS-B reprogramado con los valores de MAME, igual que yo. Así que todavía me pregunto si hay algo mal en la configuración que aplicamos al chip CPS-B en ese juego. Indagaré más sobre esto. Mientras tanto, finalmente podemos disfrutar de la prioridad de capa correcta en Carrier Airwing.
Simplemente ejecuta update_all si usas MiSTer, o descarga los archivos de JTBIN directamente si usas una plataforma diferente. ¡Y Papá Noel vendrá con un nuevo core arcade la semana que viene!
bitfan2011
2022-01-01 09:18:40 +0000 UTCJOTEGO
2022-01-01 08:32:01 +0000 UTCbitfan2011
2021-12-31 17:41:47 +0000 UTCAlexander Stieglmayr
2021-12-23 15:49:18 +0000 UTCJOTEGO
2021-12-22 10:15:01 +0000 UTCbitfan2011
2021-12-20 07:00:57 +0000 UTCJorge García
2021-12-19 00:35:58 +0000 UTCJorge García
2021-12-19 00:33:20 +0000 UTCDavid Moylan
2021-12-18 13:10:32 +0000 UTCDr. Manga
2021-12-18 10:25:38 +0000 UTC