Safety-certified tools Tools for Automotive Applications C-STAT Static analysis C-RUN Runtime analysis Debugging and trace probes IAR Visual State
From left: Takashi Matsunaga, NEWGIN CORPORATION, Kazuhisa Harabe, Sales Department Manager, IAR Systems Tokyo, Kouki Shimada and Takefumi Miyazaki, NEWGIN CORPORATION
The game machine manufacturer NEWGIN, has changed the microcontroller that they are using for controlling the acoustics, moveable parts, and illumination of their pachinko game machines. They changed from a semiconductor manufacturer’s unique core processor to an Arm-based core processor from NXP. The LPC4330FET is a rare microcontroller that consolidates both Arm Cortex-M4 cores and Cortex-M0 cores.
With the choice of LPC4330FET, NEWGIN chose to go with IAR Embedded Workbench for Arm not only its Arm-based microcontroller project, but also for its dual-core software project. According to NEWGIN, the project transition was successful thanks to the convenience of IAR Embedded Workbench and the rich support. As a result, the company was able to create its “CR Hana no Keiji X (Ikusa)” pachinko game machine.
Miyazaki at NEWGIN comments:
“We provide several dozens of these machines to the market on an annual basis. Our slogan is “Serious Play” and we hope to contribute to society by providing entertainment to our customers.”
“Our “CR Hana no Keiji” series is loved by fans of all ages. This series was released last year, and leading up to the series’ 10th anniversary we intend to evolve the “Hana no Keiji” product even further for our customers!”
NEWGIN systems are composed of 3 boards:
The main control board is in charge of lottery processing (whether the player has hit or missed the target) when the pachinko ball enters the lower central area of the face of the board. It’s equipped with an 8-bit microcontroller which still programs assembly languages.
The performance control board is in charge of controlling the sound output to the speakers, and controlling the motors for moveable parts as well as LEDs installed around the frame of the machine and on the face of the board (Figure 1).
“The performance control board contributes most towards the machine’s performance, the board that we targeted for this project to change our microcontroller. The performance control board also performs lottery processing to decide which performance to execute, and the LCD display board uses those lottery processing results as a basis for displaying necessary patterns and videos on the LCD screen located in the center of the face of the board.”
Figure 1: Pachinko game machine and its performance control board.
Many LEDs and motors to control
In total, there are around 400 to 600 LEDs on the face of the board and around the frame. Most of them are full color LEDs. Some pachinko game machine models come equipped with 15 or more motors.
“Game specifications have been diversifying recently, and although the main control board’s processes are becoming more complex, its maximum capacity is limited to 3Kbyte, ROM 3Kbyte, or RAM 512byte programs. Program languages are also written through the assembler, so surface mount devices cannot be used for electric components.”
There are also restrictions to the performance control board and LCD display board. The memory capacity of the LCD display board, which stores visual data, is limited to 64 Gbit. Miyazaki comments:
“Embedded devices in other industries can have their software updated online after the product is shipped, but gaming machines are prohibited from making external communication, so there is absolutely no room for error. Furthermore, it’s important to establish countermeasures against EMI and EMS from the perspective of preventing the unfair acquisition of balls won in pachinko.”
In 2014, NEWGIN started the project to change the microcontrollers on our performance control boards. Miyazaki comments:
“Upon searching for a development environment that supported the new microcontrollers, someone from a semiconductor trading company recommended IAR Systems to the team.”
When selecting a new development environment, NEWGIN researched several aspects. Shimada comments:
“For our performance control software, we outsource some of the development to a subcontractor. We placed a lot of focus on how intuitively the tool can be operated so that our subcontractor’s work efficiency wouldn’t be compromised even if the development environment changes when we upgrade our microcontrollers. We were originally using a tool developed in-house by the semiconductor manufacturer, so we wanted something that had a Japanese menu and a similar GUI as that tool.”
“We thought the compiler’s performance was top notch. At the time, we thought that genuine tools would have the upper hand in terms of the code’s optimized capabilities, but the code efficiency of IAR Embedded Workbench held its own against the competition. Additionally, the courteous support we received from IAR Systems before we made the official leap also promoted our final decision to adopt IAR Embedded Workbench.”
Miyazaki continues talking about the support from the IAR Systems team:
“We are based in Nagoya, and not only did IAR Systems respond to our inquiries quickly when we needed them, but they even came to our company and held hands-on seminars for us. They gave very detailed and informative lectures on the basics of Arm-based microcontrollers, guides on transitioning to IAR Embedded Workbench from other development environments, and instructions on how to use multi-core processors. These lectures, along with the gracious support we received, completely addressed all the initial worries we had, and we are so grateful that we were able to concentrate on development.”
NEWGIN applied IAR Embedded Workbench during the software development process for the performance control board for “CR Hana no Keiji X” which went on sale in November 2016. (Figure 2)
Figure 2: Overview of a performance control board’s functions.
Aside from LPC4330FET, the circuit board for this product is equipped with ICs for sound LSI, RTC IC, FRAM, and power IC. The LED driver IC, motor driver IC, and GPIO interface IC are installed externally and all communicate with the microcontroller. The Cortex-M0 core acts as a co-processor.
"We have arranged things so that the Cortex-M4 core (with FPU functions) can focus on various performance control logic processes. We achieved this by having the Cortex-M0 core perform peripheral controls and interruption processing for external I/O.”
“And there is no OS. Everything is being executed through bare metal. Our company develops the basic software and distributes it to app developers as a type of SDK. Each application software that runs on the basic software is recreated for each model.”
For this project, the subordinate device drivers, LED controls, motor controls, and library for sound output were all recreated according to the microcontroller’s peripheral functions.
“Particular importance was placed on the user friendliness of the SDK. It is temporarily placed in an intermediate file before building, but an error check function has been placed here. This allows us to, for example, know how many malfunctioning illumination systems there are before actually operating the device. We’ve made it so that application developers don’t get stuck looking for minor bugs in their code.”
Miyazaki about the time spent on developing the SDK:
“It started with the production control board development with the change of the microcontroller. There were significant alterations to certain devices that communicate with the microcontroller, and new devices were also adopted. It took about 1.5 years for us to complete the SDK, but if the development environment had not been intuitive and if we had not received quality support, the project certainly would have taken much longer. Perhaps more than 2 years."
With the use of IAR Embedded Workbench, NEWGIN has managed to shorten their build times dramatically. Miyazaki comments:
“Compared to our previous tool, which was developed in-house by a semiconductor manufacturer, it feels like build times are 1/2 to 1/3 of what they were before. We are now able to build several products in one day, so I’d say that learning how to use IAR Embedded Workbench has proven to improve efficiency considerably.”
When looking towards the future, NEWGIN see a growing need for tools to help with ensuring software quality even further. Shimada comments:
“I want to create a system that can help improve the quality of our software by incorporating and collaborating with a wide variety of services, such as automated building through the use of CI tools, and the static analysis of codes.”
NEWGIN is a company that develops, manufactures, and sells game machines such as pachinko and pachislot machines.
For more information, visit newgin.co.jp