He's been working on it for two years now and explains that it's been one of the most challenging tasks he's undertaken in the world of FPGA development.
"The NeoGeo Pocket core is the worst 'time to market' from my career," he laments in his latest Patreon post. "I have worked on and off on it for the last two years. During some months, it has been the main focus. I also tried to have three different developers work on test tasks on the system CPU and the whole core with little results. Sadly, after two years, the NGP core was crashing and we could not find the bug. I put the development on hold two months ago in order to reconsider it."
The issue, he explains, is replicating the Toshiba 900H CPU used in SNK's handheld. "This is a 16-bit CISC CPU that tries to be a hypervitaminated Z80," Jotego continues. "The instruction encoding is very diverse... Each time I added a new feature to the CPU, I felt like I was less in control of the design. That was a bad feeling. The complexity also made it difficult to hop back and forth from this project to another one, as it took a couple of days to get my head around it each time I resumed it."
Jotego returned to the drawing board and rethought his approach to the core. "I decided to redesign it optimizing development time and debugability over FPGA resources," he reveals. "Normally, a hardware engineer would optimize for less resource usage. But in our case, it has no impact to the user whether 40% or 80% of their FPGA is used on a given core. I changed the CPU architecture to a microcoded one. This means that the CPU is built by combining a number of simpler hardware elements with a control logic that follows a sequence defined in software-like way."
Taking the microcode approach for CPU instructions "reversed [my] feelings about the CPU," says Jotego, and allowed him to "[understand] the design better." As a result, "everything [is] coming together nicely. Many of the complex operations that required specific implementations before could be broken down into combinations of smaller operations in sequence, so the hardware became much easier."
This process has taken around two weeks, and Jotego says he is now moving to the test phase. "I will give another update in two weeks," he concludes, before revealing that his JT1942 MiSTer core is now available on the Analogue Pocket, with support for three of CAPCOM's earliest hits: 1942, Pirate Ship Higemaru and Vulgus.