← raaff.dev

Reverse Engineering & ROM-dumping ATTESA E-TS

#reverse-engineering #hardware #r32

In May 2026, I was watching a video of the Skyline R32 winning its first Group A race in 1990. I wondered if anyone had reverse engineered ATTESA, its all-wheel-drive system that had heavily assisted it in winning all 29 JTCC races it entered. The internet didn't have many precise answers as to how it calculated slip and when to send power. Most of what I could find came from people data-logging their own cars. I wanted to see how Nissan had written it, so in October I opened up the ATTESA controller I’d bought from Japan for £32.48 (¥6,590).

My £32.48 '89 47850-05U00 being probed, in preparation for IC1 chip identification.
My £32.48 '89 47850-05U00 being probed, in preparation for IC1 chip identification.

While I was waiting for the board to arrive, I found there wasn't much information about the unit itself on the English-speaking web. My forum post attracted the attention of a track-built R32 GT-R owner, AlexJ, who seemingly had the same questions as me for over a decade. He pointed me to patents Nissan had filed in the late 80s/early 90s with some information on how the control system worked, as well as details on the board containing 'three custom ASICs'.

I initially identified the controller as HD63701Y0, a microcontroller with an EPROM. This was proven to be incorrect: the unit used more than one MCU for ATTESA's control systems, and both microcontrollers (IC1/IC3) used mask ROMs.

After opening the board up for the first time in October, I started probing and noticed the pinout resembled a HD63B01Y0, the mask-ROM variant. I was very surprised to see several distributors still had thousands of these chips as new old stock. This changed my plan for how I was going to exfiltrate the ROM from IC1. I went with a documented clock-glitching method created by Sean Riddle. I don't think it would have been possible for me to pull IC1 without his research.

I didn't want to spend much money on this, and I wanted an excuse to play with a Pico 2H. I've been quite a fan of the RP2350 and PIO, but had not had many personal use cases until now.

A BNR32 GT-R at the Nürburgring, from Best MOTORing in 1989.

The method

Riddle's trick uses a precisely timed clock glitch during reset. The Hitachi MCU keeps its internal mask ROM switched on, but takes its start address from the external pins. That lets it run my code instead of Nissan's, which then copies the ROM out.

The primary modification I made to Riddle's HD6301Y0 dumper was replacing the job of the PIC18F46K22 and external EPROM with a single Pico 2. I also decided to use a custom PCB rather than a breadboard, as it would match up to the two sockets nicely. Instead of his serial-output trick, I used a PIO state machine to capture address and data on every /WR edge.

74HCT14 inverters drove EXTAL and /RES at 5V, and a BC557 transistor let the 3.3V Pico switch the chip's 5V. 480 ohm resistors on D0-D7 limited bus fight. The rest of the pins connected directly, as the RP2350's inputs are 5V tolerant (mostly). Fundamentally, it used the exact same method as Riddle's mode 1 glitch.

At this point, I thought IC1 was the MCU responsible for controlling ATTESA. Once I had it on my laptop, I would be able to solve the 37-year mystery. My first forum post was fixated on one Hitachi chip, and I dismissed the idea of IC3 controlling more than simply ABS.

Designing & building the board

The board was designed over a few concentrated days in KiCad, which is fairly straightforward for beginners. It wasn't pretty, but it was just to get the job done. I also almost made the silly mistake of buying a 74HC14 instead of a 74HCT14 - I needed the HCT variant as it would take the Pico's 3.3V logic up to 5V.

While the board was being delivered from JLCPCB in China, I noticed and mitigated two design issues. GP26 is not 5V tolerant and E was wired straight to it, so I cut that trace. The Pico's default pull-downs also made the HCT14 inverters drive EXTAL and /RES high during BOOTSEL while the chip had no power. I fixed that using 10k pull-ups on GP18 and GP19.

I have never soldered before, let alone worked with electronics much. My experience is much further weighted on the software side, so I decided to enlist the help of my old secondary-school friend Anish R for soldering, and local electronics expert James (Bytes Free) for desoldering. Anish soldered up the board with my two fixes while James desoldered. I'd definitely recommend his services if you need desoldering in the West of England area. He had very quick turnaround and cleanly soldered my spare socket back into the original ATTESA board.

Firmware

While waiting for the PCB and getting the chip desoldered, I wrote the Pico 2 firmware. I had two things in mind: chip safety and fast iteration. The unit I had bought for only £32.48 sells for roughly 6x that in the western market, and I definitely didn't feel like waiting for a replacement in the worst case.

The Pico's two ARM cores were split into the two distinct tasks of this dump. Core 0 acted as the controller and glitcher: driving the 250 kHz clock (EXTAL), flipping the mode pins, switching the 5V rail via the transistor, and running Riddle's reset/clock-stop glitch sequence. That put the Hitachi chip into internal-ROM mode while fetching its boot vector externally. Core 1 had the menial task of pretending to be an external EPROM.

PIO latched onto A0-A7 and D0-D7 on every /WR edge into a ring buffer. It is very powerful for reverse engineering, as you can easily create deterministic, cycle-accurate state machines without expensive FPGAs or real EPROMs.

The 6301 assembly is small enough to just be pasted in this blog post. Because only A0-A7 are wired up, writing to $8001 (A0 = 1) emits a pass-start marker, while writing to $8000 (A0 = 0) streams the ROM bytes.

8080  CE C0 00   LDX  #$C000      ; start of 16 KB internal mask ROM
8083  B7 80 01   STAA $8001       ; write pass marker (A0 = 1)
8086  A6 00      LDAA 0,X         ; read byte from internal ROM
8088  B7 80 00   STAA $8000       ; dump byte to external bus (A0 = 0)
808B  08         INX              ; next address
808C  26 F8      BNE  $8086       ; loop until X wraps past $FFFF
808E  7E 80 80   JMP  $8080       ; repeat forever

I found agents to be particularly useful in the firmware development (and later, reverse engineering w/ Ghidra) process, although I made sure not to blindly trust them and did plenty of the work myself. They can substantially increase my throughput, but they are not a valid substitute for human intuition. I found some of their suggestions to be sloppy, such as streaming the ROM via CPU rather than PIO.

Dumpday IC1

The day I picked up the board and desoldered IC1, I got to work. My initial tests were really promising, the chip ran properly (without smoking) once, and then locked up 7/8 times. The address bus was stuck at $FF, /RD and /WR were completely silent, while every single pin at the chip's legs measured totally fine on my (new) multimeter (as the previous £0.62 AliExpress multimeter had decided to end its 23 day tenure). I later found a meter could not solve this, as the datasheet's reset state and crashed state look electrically identical from the outside.

The finished board, with IC1 seated.
The finished board, with IC1 seated.

I got to work building a /RD read log PIO second state machine. It recorded the first 1,024 bus reads after reset and ended up revealing 0 reads on every failure. This proved the chip wasn't crashing mid-run, it failed to leave reset. The first bug I found was parasitic back-powering through the ESD diodes. With Vcc switched off, the chip's Vcc pin was floating at 2.2V (and getting slightly warm to the touch) presumably because floating RP2350 pins and pull-ups were leaking current through IC1's internal ESD protection diodes. Fixing my park_bus() method to drive all address/data/strobe pins to 0V when powered off immediately fixed this bug.

The second bug was that a 100ms reset didn't seem to work. I relied on measurements that Riddle had provided on his writeup. It definitely could have been a matter of difference between how I implemented it and his method, or between the chips we used. The datasheet asked for 20ms, Riddle used 100ms, and I tried 1000ms (after writing an automated sweep, which tested multiple different timings).

Once these two fixes were implemented, automated sweeping was catching partial passes and then had two consecutive 16 KB passes matching byte-for-byte. The CRC was 7CBF3437. I had finally exfiltrated the ROM, in about 5-6 hours of evening debugging. Recursive disassembly from the reset/int vectors reached 6,141 instructions (about 86% of the ROM) with no illegal opcodes and revealed the telltale sign of a mode 2 cold boot (LDS #$013F).

A few weeks later, forum member ets_phone_home performed an independent dump on IC1 and yielded the exact same CRC32.

Late-night analysis

My celebration was short-lived. Before I went to bed, I wanted to have a quick look at the ROM beyond verification. Fortunately, I had prepared a patch to an unfinished Ghidra branch (#6314), which was checked against MAME HD63701 tables on Riddle's nine real HD6301 dumps (about 69,000 instructions). All 74 functions decompiled nicely. The board's architecture very quickly became comprehensible, I noticed there was a battery backed external SRAM at $4400–$45FF, an internal checksum verification system (which I have written a tool for patching and verifying your ROMs with) and a countdown pattern, presumably for preserving diagnostic fault codes across ignition cycles. The mysterious IC2 was mapped at $4000–$405E, which captured eight 16-bit timer values.

There was a pretty big warning sign, all the real work happened inside of one fixed-rate scheduler firing every 2,000 E-cycles. The code didn't run one traction calculation, it looped through the same state machine three times, over three identical $4A byte blocks of external RAM ($453F, $4589, $45D3). Each of these instances had its own 2-bit pair of output flags in $4402 using step-down counters.

I realised structurally, this could not be ATTESA E-TS. ATTESA actuates a single hydraulic clutch pack (to send torque forward to the front wheels). There are no three independent channels to modulate. Upon Googling, I found the BNR32's braking system uses a 3 channel ABS (front-left, front-right and a combined rear-axle channel). I noted down my thoughts on this, IC1 was a dead end, and I should immediately pivot to designing the IC3 board. I went to sleep.

On to IC3

I'm very fortunate I didn't start designing the IC3 board in the dead of night, or I'd probably have made another PCB. I decided this time, to use a breadboard. I had a very old kit lying around, probably from my 11th or 12th birthday. It was adequate.

Forum member ets_phone_home, who contributed a lot to the pre-dump research, had correctly identified IC3 as being a NEC µPD78C14, and recommended using Devin Acker's upd7811-reader. My method was completely inspired by Acker's method, however I was not interested in ordering another PCB or more components. I tried to see what I could do with what I had from the partlist for the IC1 dumper. Surprisingly, I had everything I needed, replacing the need for an EPROM, yet again, with a Pico 2.

Theoretically, Acker's reader was a lot simpler than clock glitching too, it boots the NEC chip into external-ROM mode from a fake external ROM. This stub jumps to its own memory mirror at $8000+ and pulls MODE0 low from the inside via its own PC7 pin, which live-switches the internal mask ROM back into $0000–$3FFF, while the stub keeps executing from our mirror, dumping it out.

The primary modification I made was replacing his physical 27C256 EPROM, 74HCT373 latch IC, crystal, and custom PCB with a single Pico 2 (and some resistors, caps, plus a 74HCT14). I did have to purchase some £7 mini test hook probes, which my Dad soldered up to 30 dupont wires.

The final 25pin IC3 dumper design after 2 (failed) iterations.
The final 25pin IC3 dumper design after 2 (failed) iterations.

While I was designing it, I sent the board to Anish for desoldering. I wanted a very quick turnaround, and he managed to do it over a weekend with very short notice. All of my late afternoons and evenings were probably spent on developing the firmware for my IC3 dumper over the span of ~5 days.

Dumpday(s) IC3

On the 31st of October, I fired up the breadboard rig to realise that both of Acker's output mechanisms are pretty much dead on this silicon. The serial UART (TxD) never drains a single byte and internal RAM isn't mapped, meaning that CALL, RET and the stack are all useless. I pivoted by abandoning serial and the stack entirely and moved to writing a ~30-byte stack-free stub that reads internal ROM, and writes it straight onto the external bus, while a spare PIO state machine on the Pico listens to the data phase at every write cycle.

5454  48 24        DI
5456  69 00 4D C5  MVI A,00 ; MOV MC,A
545A  69 00 4D C2  MVI A,00 ; MOV PC,A    ; PC7 -> MODE0 low
545E  34 00 00     LXI H,0000
5461  24 00 B0     LXI D,B000
5464  2D 3C        LDAX H+ ; STAX D+
5466  0E 67 40     MOV A,H ; NEI A,40
5469  54 6F 54     JMP done
546C  54 64 54     JMP loop
546F  54 6F 54     done: JMP done

After about 60 BOOTSEL + replug cycles, iterating on the stub, I added live USB serial ROM patching so I could iterate a lot faster without having to cycle between unplugging my power line (to keep IC3 safe from the Pico's BOOTSEL), unplugging the USB cable, putting it into BOOTSEL, flashing from my laptop and starting the cycle over in a few minutes.

I experienced a lot of interesting quirks with IC3. Relative jumps (jr) went forward instead of looping backwards, writes below $8000 or above $F000 never succeeded, and any dropped fetch sent the CPU into random ROM bytes. At 1:30am on Sunday, I finally came up with a fix, filling the entire ROM image with 0x54 - the opcode for JMP. Because 0x54 0x54 0x54 decodes to JMP $5454, where I could place my stub, every random fetch, interrupt vector or stack glitch automatically resolves to the start of the dump program, essentially making it self-healing.

Later in the morning, I discovered GP0 was wired to A14 instead of AD0, causing the Pico and NEC chip to fight over the wire every cycle. I decided the 34 wire setup was unmanageable, moving a single jumper pin from one pin on IC3 to another took over 30 minutes, as it was a cascading fiddly task. I'm really not exaggerating on how fiddly this was. Since I didn't have enough test clips to accommodate all 34 used pins, I had to just slip some dupont leads directly onto 4 of the pins, which was unacceptable by my own standards. I decided to get some rest and figure out how I was going to do it later on Sunday.

I spent a few hours redesigning the board to use 25 wires, by omitting A8-A14, and serving a 256 byte mirrored image instead. With my mental clarity of being rested, I realised the actual root cause was sitting right in front of me the whole time: I had mistakenly assembled the stub for the wrong instruction set. It feels a bit silly writing this out. I assembled it for 7810 instead of the 78C06/87AD, meaning half of the opcodes were illegal or writing to the wrong ports.

Dumpday (part 2)

In the afternoon, I rebuilt the board with its new 25 pin design and then rewrote the 30 byte stub with real opcodes this time, added a PIO logic analyser to speed up debugging, and remembered one final register write, putting it up to 34 bytes.

5454  BA 00        DI ; NOP
5456  69 0F 4D D0  MVI A,0F ; MOV MM,A
545A  69 00 4D D4  MVI A,00 ; MOV MC,A
545E  69 00 4D C2  MVI A,00 ; MOV PC,A  ; PC7 -> MODE0 low
5462  34 00 00     LXI H,0000
5465  24 00 B0     LXI D,B000
5468  2D 3C        LDAX H+ ; STAX D+     ; ROM[i] -> $B000+i
546A  0E 67 40     MOV A,H ; NEI A,40    ; stop at $4000
546D  54 73 54     JMP done
5470  54 68 54     JMP loop
5473  54 73 54     done: JMP done

At 19:05 on November 1st, I pulled three identical 16 KB dumps (F1E608CE) and spotted the same Nissan checksum structure that IC1 had.

My immediate thought was 'Finally, the hardware side is done'. The time spent on the dumping / iteration side of IC3 far exceeded what I had expected, and probably ~5x the time of doing it with IC1. I'm not sure if I'm the first in the world to dump IC1 and IC3, there is a strong possibility I am, but I am certainly the first to release the ROMs.

Reverse Engineering ATTESA

I wanted to get right into reverse engineering it, but I had work in the morning, and a lot of excitement. I celebrated with a Springbokkie, announced my findings to the forum, and got rest.

The first thing I noticed is that Wikipedia had been wrong about ATTESA E-TS's timings. Journalists in the 90s and 2000s had probably made a mistake while reading Nissan's patents (Specifically US5132908A 'Driving force distribution control system for a fourwheel drive vehicle') and misread 10 ms as 10 Hz. Nonetheless, the patent was slightly wrong too, off by 10 Hz! Reading the loop rate assembly, I found that it was running at 110 Hz (or in intervals/ticks of 9 ms).

I found that ATTESA is not fully reactive, contrary to some misconceptions people held about ATTESA, and graphed out a bit of the ROM in an emulator (Ghidra's EmulatorHelper).

Whenever you aren't cornering, the clutch is never fully open (~10psi). This confirmed a post from over a decade ago by AlexJ, the same forum user who had been assisting and following my thread since the start. There is a preload of about ~4%/10psi. (FFA3)

Throttle-driven fast-start is armed whenever IC1 flags the car as stationary and active up to ~26km/h, engaging the front wheels before the rear slip occurs (FFA5). PORTC.3 switches between a progressive ramp and an abrupt 80% step, AlexJ traced this back to the reverse-light switch.

ATTESA fast-start clutch command vs raw throttle, comparing ramp and reverse-switch step modes.
ATTESA fast-start clutch command vs raw throttle, comparing ramp and reverse-switch step modes.

IC1 and IC3 communicate over a bidirectional 8-bit link, but it's very asymmetric. Every cycle, IC1 sends IC3 an 8-slot frame, which contains both axle speeds, the ref speed, as well as a status byte (stationary/ABS active/fault). IC3 typically only replies with one byte, the lateral G.

I initially did not think there would be diagnostics for the ATTESA system, however I found a fault reporting system presumably for Nissan's Consult scan tool. IC3 can send a fault code (for example G-sensor/throttle ADC out of range) to IC1, which communicates directly with Consult. In cases of system failure, it would just revert back to being temporarily RWD.

Under straight line acceleration, Longitudinal G-forces (FFE4) and four-wheel-spin detection (FFCC) are used to calculate whether or not the ~15% preload under straight line acceleration should be active. It's killed by lateral G and overridden if all 4 wheels are spinning together.

ATTESA clutch command vs longitudinal G across lateral G levels.
Straight-line longitudinal G preload (~15% at zero G, ramping to 70%), showing how lateral G cancels it out.

I found the main-slip & turn-radius compensation (FF95/FF89). Rear over front wheel slip is multiplied by a gain that falls off as lateral G rises, preventing mid-corner understeer, while subtracting an expected v^2/G turn-radius term so that tight corners aren't mistaken for wheelspin.

ATTESA main slip law across 20, 61, and 123 km/h for varying lateral G values.
Emulated ATTESA main slip law across 20, 61, and 123 km/h, showing lateral-G gain reduction and turn-radius compensation.

My reverse engineering was not entirely correct initially. AlexJ corrected my finding of 30% standstill hold (0x3C00). It's actually a bleed mode. I initially thought IC3 held 30% clutch lock whenever stationary, until AlexJ spotted that PORTF.2 low + stationary is the hydraulic air-bleed service mode, which immediately cancels the moment the car moves.

Nissan's drafted code/maps

Nissan spent 10 weeks developing the Skyline R32 GT-R disguised as an S13 Silvia on-track at the Nürburgring Nordschleife. In a 2022 interview with lead test driver, Dirk Schoysman, he talks about how Nissan's target was making the R32 fast and stable without feeling 'peaky' or understeering through corners.

The R32 Skyline GT-R takes a corner at the Nürburgring Nordschleife. Best MOTORing 1989.

In the ROMs, I noticed a few dead tables, 4 iterations of the lat G gain table and two of the iterations of the slip reference. This could definitely have been part of that 10 week tuning session, but we'll probably never know for sure.

Comparison of the live $183F lateral-G slip gain table against three unreferenced tables in the ROM.
Four generations of the lateral-G slip-gain table stored side-by-side in the ROM: the shipped $183F curve & three unreferenced iterations.
Shipped $183F slip response overlaid against the unreferenced $1855 table.
Shipped $183F slip response overlaid against the unreferenced $1855 table, showing softer mid-corner lockup in production.

I also noticed there was a completely bypassed block of code that implemented what was presumably a high speed stability lock; from ~128km/h to ~256km/h, it would ramp the clutch's minimum engagement to 50%, and a speed proportional slip deadband was skipped, so the production ATTESA controller reacts to the first count of slip.

CONTROL_TASK:
    NOP
    LXI HL,0x0
    JRE L_146B ; floor = 0, skip everything below

; dead high-speed floor ($1443-$146A) which never runs

DEAD_HIGH_SPEED_FLOOR:
    LHLD (ADDR_REFERENCE_SPEED16)
    LXI BC,0xc800       ; 0xC800 ≈ 256 km/h
    DMOV EA,HL
    DGT EA,BC           ; over 256?
    JR L_1452

L_144E:
    LXI EA,0x6400       ; floor = 50% of full command
    JR L_146A

L_1452:
    LXI BC,0x6400        ; 0x6400 ≈ 128 km/h
    DSUBNB EA,BC         ; floor = speed16 - 0x6400 ...
    CALL HELPER_MUL16    ; ... scaled to the 0-50% ramp

L_146A:
    DMOV HL,EA

Nissan's internal checksum system

I figured it would be worth writing a little bit about this. Every byte across the body of the ROM is summed into an 8-bit sum alongside an 8-bit XOR, and both are compared against a 2-byte checksum stored inside the ROM itself (sum/XOR 0x9F/0x19 on my IC1 dump, 0x5B/0xAB on IC3).

  • IC1 stores the 2-byte checksum at the start of its 16 KB ROM ($C000-$C001), covering $C002-$FFFF (including the reset/interrupt vectors), and verifies it at boot. If the check fails, it sends out a ROM self-test fault code instead of trusting the corrupted ABS tables.
  • IC3 uses the exact same check during its power-up self-test, except it skips $0000 (covering $0001-$3FFD) and stores the 2-byte checksum at the end of the 16 KB space ($3FFE-$3FFF).

My script reads the covered byte range for whatever chip you pass in, calculates the 8-bit sum and XOR, and either checks them against the two checksum bytes or overwrites them if you pass --fix, so a modified ROM can pass boot verification.

Re-assembling the IC3 ROM

I wondered if I could use agents to autonomously recreate the original mask-rom binary with a small 2 phase assembler, built from MAME's mappings of the µPD78C14, and match up checksums. This could be useful for anyone who wants to modify their ATTESA computer in a slightly more ergonomic way, without rewriting the whole system. Surprisingly, it only took a few minutes for my agent to churn out a small build script and generate_ic3_source.py.

The newly assembled output matches the checksum of the original 16KB IC3 dump and is identical to the byte. I'll be pushing this to the attesa-firmware repo soon.

Conclusion

If you're interested in looking at the ROMs yourself, they are up at github.com/matthewraaff/attesa-firmware. I will be releasing the tooling and other useful things from my many hours on this project, but they'll be released slowly as I would rather release with a bit of documentation and tidy-up.

This is probably the first blog post you've read from me, as it's the first one I've published; I am Matthew Raaff, a 19-year-old degree apprentice software engineer in the West of England. I'm definitely going to be writing more posts, as this one has been enjoyable for me. If you'd like to contact me, my email is [email protected], and my LinkedIn is somewhere on the homepage of this site. My next project will probably be fiddling around with the wet-film German cameras I've acquired, that were sold after their long lives in UK speed cameras.

Credits

Big thanks to AlexJ, the long-term domain expert on ATTESA E-TS data logging, and ets_phone_home, for their research and collaboration on the board.

The methods are entirely derivative of Riddle's method and Acker's method. Thanks to Anish R (soldering IC1, desoldering IC3), and James at Bytes Free (Desoldering IC1). My dad soldered 30 mini test hooks onto dupont leads for the IC3 rig.

Matthew Raaff (me) performed the IC1 and IC3 dumps and did a fair bit of the reverse engineering. I listened to a lot of Casiopea during the IC3 dump, which is probably worth crediting.

Video clips come from Best MOTORing in 1989.

This is a personal project, done entirely on my own time and hardware, and isn't affiliated with or endorsed by my employer.