What's are the differences between the ST018(snes) and the ARM7TDMI(gba)?

Discussion of hardware and software development for Super NES and Super Famicom. See the SNESdev wiki for more information.

Moderator: Moderators

Forum rules
  • For making cartridges of your Super NES games, see Reproduction.
User avatar
Señor Ventura
Posts: 233
Joined: Sat Aug 20, 2016 3:58 am

What's are the differences between the ST018(snes) and the ARM7TDMI(gba)?

Post by Señor Ventura »

Greetings.


As you know, there is a game called "Hayazashi Nidan Morita Shogi 2", wich has an enhancement chip based on an ARM7TDMI (ST018), that is the same cpu as the GBA has.

The problem is... it doesn't seems to be the same chip (logically, that cpu was released six years before the GBA, it would have been completely outdated). What are the differences actually?.


Thank you.
Pokun
Posts: 2681
Joined: Tue May 28, 2013 5:49 am
Location: Hokkaido, Japan

Re: What's are the differences between the ST018(snes) and the ARM7TDMI(gba)?

Post by Pokun »

I think ARM are licensing out their MPU blueprints for chip makers to use, so each implementation may be a unique ASIC with the ARM7TDMI MPU core integrated together with other application-specific hardware such as internal RAM or DMA devices (making the ASIC more of an MCU than an MPU) and perhaps even some custom modifications of the MPU core.

In other words the chips are unique and I guess there might not even be a "stock" ARM7TDMI MPU chip like there were (and still are) with 6502 and Z80.

I'm not sure if it would have been outdated just because 6 years had passed. Many MPUs are probably much older than you might think. Newer chips of older MPUs may support higher clock speeds and have other minor modifications though.
User avatar
Señor Ventura
Posts: 233
Joined: Sat Aug 20, 2016 3:58 am

Re: What's are the differences between the ST018(snes) and the ARM7TDMI(gba)?

Post by Señor Ventura »

There seems to be two versions of that ARM7TDMI: rev3 and rev4.

https://developer.arm.com/documentation ... -4?lang=en


The thing is, Do "morita shogi 2" has built in the rev3, and GBA the rev4?.
User avatar
Dwedit
Posts: 4924
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Re: What's are the differences between the ST018(snes) and the ARM7TDMI(gba)?

Post by Dwedit »

I hear the SWAP instruction was broken on the GBA and should not be used. I wonder if it's also broken on the other version.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
coto
Posts: 102
Joined: Wed Mar 06, 2019 6:00 pm
Location: Chile

Re: What's are the differences between the ST018(snes) and the ARM7TDMI(gba)?

Post by coto »

Señor Ventura wrote: Sat Dec 17, 2022 4:20 pm There seems to be two versions of that ARM7TDMI: rev3 and rev4.

https://developer.arm.com/documentation ... -4?lang=en


The thing is, Do "morita shogi 2" has built in the rev3, and GBA the rev4?.
(the snes one is an ARMv3, the gba one is ARMv4)


ARMv1
IIRC it was beta and experimental and wasn't really standard

-

ARMv2
Standardized RISC architecture which introduced original 26 bit mode for both PC and PSR registers
Both the data bus and the address bus are 26 bits wide.

-

ARMv3
featured 32 bit PC and PSR registers on ARM mode.
Older design featured slower clock speeds (up to 50mhz on the ARM710);
ARMv2 support is maintained partially, as long both the ARMv2 and ARMv3 implementation share a 26 bit data & address bus + 32 bit data bus (ARMv3 mode only).

Note:
ARM had to write a wrapper interface to connect an ARMv3 to the newer AMBA specification, and it's pretty non-standard except for these processors.

-

ARMv4 StrongARM:
IIRC a few big corps worked together, bringing up a new AMBA specification, which enabled minuscule master-slave interfaces to wire the ARM core itself to
other hardware... or even another ARM core!

And because of that the new AHB bus featured new improvements like lower power design,
MMU co processor to map custom memory layouts/MPU co processor to protect custom memory layouts in real time and breaking through the 100mhz barrier.
Of course this meant deprecating legacy ARMv3 26 bit PC and PSR mode, which reflects onto C compilers between the 90s-2000s supporting the newer ARMv4 model only.

Note:
AMBA specification is standard and pretty much newer core revisions support it.
User avatar
Individualised
Posts: 310
Joined: Mon Sep 05, 2022 6:46 am

Re: What's are the differences between the ST018(snes) and the ARM7TDMI(gba)?

Post by Individualised »

The earliest incarnation of the GBA hardware specification is known to date to 1995 (3 years before even the GBC). The GBA's hardware was intentionally rather primitive in comparison to the developments that were being made in mobile technology at the time (of its release, not 1995), allowing the GBA to be compact and to have a long-lasting battery life. It's not unreasonable that Nintendo used a "completely outdated", as you put it, CPU in the GBA.
calima
Posts: 1745
Joined: Tue Oct 06, 2015 10:16 am

Re: What's are the differences between the ST018(snes) and the ARM7TDMI(gba)?

Post by calima »

Nintendo has always been cheap. If an old cpu works, all the better, it costs less.
User avatar
Señor Ventura
Posts: 233
Joined: Sat Aug 20, 2016 3:58 am

Re: What's are the differences between the ST018(snes) and the ARM7TDMI(gba)?

Post by Señor Ventura »

coto wrote: Sat Dec 17, 2022 5:48 pm (the snes one is an ARMv3, the gba one is ARMv4)
But, How can we verify this information?.

That seems to be a fact, that the ST018 and the GBA's cpu, are an ARM7TDMI, and it would be easy to determine that is the same cpu if there were not different itterations of the chip... but there are: the v3 and the v4.

The question is, Where to get the information to know what version of that ARM7TDMI brings the "morita shogi 2", and the GBA?.
Individualised wrote: Sat Dec 17, 2022 6:37 pm The earliest incarnation of the GBA hardware specification is known to date to 1995 (3 years before even the GBC). The GBA's hardware was intentionally rather primitive in comparison to the developments that were being made in mobile technology at the time (of its release, not 1995), allowing the GBA to be compact and to have a long-lasting battery life. It's not unreasonable that Nintendo used a "completely outdated", as you put it, CPU in the GBA.
So, Do the GBA has an v3 instead of an v4?.

Can we get some link to that information?.
calima wrote: Sun Dec 18, 2022 12:23 am Nintendo has always been cheap. If an old cpu works, all the better, it costs less.
That is one argument to consider that it has an v3, yes.
coto
Posts: 102
Joined: Wed Mar 06, 2019 6:00 pm
Location: Chile

Re: What's are the differences between the ST018(snes) and the ARM7TDMI(gba)?

Post by coto »

Señor Ventura wrote: Sun Dec 18, 2022 5:44 am But, How can we verify this information?.
Check for chip IDs on the internet and see a manual describing the ISA standard and architecture implementation?
Señor Ventura wrote: Sun Dec 18, 2022 5:44 am
That seems to be a fact, that the ST018 and the GBA's cpu, are an ARM7TDMI, and it would be easy to determine that is the same cpu if there were not different itterations of the chip... but there are: the v3 and the v4.

The question is, Where to get the information to know what version of that ARM7TDMI brings the "morita shogi 2", and the GBA?.
RTFM (v3) (Even ARM acknowledges in this manual, section '2.1 Compatible with the ARM9™, ARM9E™, and ARM10™ families, and StrongARM® architecture' they've designed/written/implemented a wrapper to connect these ARMv3 to newer AMBA (ARMv4), so software, as long it's ARM code, can run 1:1 as you'd do on ARMv4 core, provided this ARMv3 core implements the mentioned wrapper). Also, same PDF having an ARMv4 section as well '4 ARM Architecture v4T'


and

RTFM (v4)

-

And if you still don't get it, I added another source from 'medium' just in case you weren't able to comprehend ARMv3 vs ARMv4 differences:


1.Early Architectures

ARM v1: First ARM instruction set version released in 1985 which defines a 32-bit ISA along with 26-bit addressing space. The ARMv1 was only implemented by the ARM1 and was replaced soon after by the ARM2. Only a few hundred of those chips were ever fabricated. There are 16 general-purpose 32-bit registers. Did not have support for multiplication and was done using software implementation (Shift and add multiplication) which was very slow. No support was provided for hardware floating-point or an ability to do such operations on an external FPU coprocessor. Not used in any commercial product.
ARMv2: Second ARM instruction set version released in 1986. Used by ACORN computers. It was not having the RISC instruction set in it. It used to work on the required platform with the required instruction set in it. When it was evolved to RISC instruction set, it is being used further in the domain where it can be platform friendly. So, it can be utilized commercially as well. Added support for multiplication and a coprocessor communication interface. Also adds two additional status registers for a total of 27 registers.
ARMv3: On-Chip debugging is possible. Full 32-bit addressing capability, with the PC being the complete 32 bits wide and flags in a separate register.Six new processing modes; User32, Supervisor32, IRQ32, FIQ32, Abort32 and Undefined32. CPSR/SPSR — Current and Saved status registers, in addition to MRS and MSR, to read/write them. ARM6 and initial ARM7 used this as a base.
2. Classic Family
ARMv4: Support for halfword and signed halfword/byte provided. System mode included. Thumb instruction set(v4T). Backwards compatibility with earlier architectures.
ARMv5: This version improved upon ARM/Thumb Interworking. Support for CLZ instruction introduced. Support for structured arithmetic DSP multiply-accumulate instructions included. Backwards compatibility with earlier architectures.
ARMv6: SIMD Instructions Multi-processing v6 memory architecture. Unaligned data support included. Extensions included: Thumb-2, TrustZone, Multicore and Thumb only. Backwards compatibility with earlier architectures.
source 1

source 2

source 3 (me, having written an ARMv4 CPU core, running GBA code)

source 4 (confirming exactly what I've written here)

-

So. From all things listed you can guess at least 2 things

1) ST-018 isn't having the wrapper for ARMv4 ISA, which means...
2) ST-018 can understand ARM code, but not from any compiler emitting ARMv4+ code. It has to be a specific, older compiler massaging ARMv3 code.
3) Compiler suffixes for ARMv3 (ST-018) is [v4]. Compiler suffix for ARMv4 is [v4t] according to ARM standard, and thus, all standard compilers.
Last edited by coto on Sat Aug 19, 2023 8:20 am, edited 2 times in total.
User avatar
Señor Ventura
Posts: 233
Joined: Sat Aug 20, 2016 3:58 am

Re: What's are the differences between the ST018(snes) and the ARM7TDMI(gba)?

Post by Señor Ventura »

@coto Thank you for your response.

I've deleted my reply accidentally, so i will try to resume it quickly. The differences between the v3 and the v4 are pretty clear, although is not as easy as take a fast look to the notes, but means something, of course.

The ST018 has to be clearly an v3, cause the v4 was produced between the 2000 and the 2001... and if you have coded v4 programs running on the GBA, then is all said, clearly.

So, the thread doesn't let space for searching so much more.


But i still miss an official ARM document about the specific iteration of the GBA's ARM7TDMI. I will try to search, and i will post here when i find it.



Thank you for your help!
creaothceann
Posts: 611
Joined: Mon Jan 23, 2006 7:47 am
Location: Germany
Contact:

Re: What's are the differences between the ST018(snes) and the ARM7TDMI(gba)?

Post by creaothceann »

Señor Ventura wrote: Sat Dec 17, 2022 2:03 pm (logically, that cpu was released six years before the GBA, it would have been completely outdated)
Just for the record,
- the 6502 was released in 1975 and the Famicom came out in 1983 (Wiki: "a test model was constructed in October 1982");
- the 65c816 was released in early 1985 and the SFC was released in November 1990.

Part of the delay was surely the fact that both processor blueprints had to be integrated into larger chip dies first (Ricoh 2C02, 2A07 and 5A22), but Lateral Thinking with Withered Technology was also a factor.
My current setup:
Super Famicom ("2/1/3" SNS-CPU-GPM-02) → SCART → OSSC → StarTech USB3HDCAP → AmaRecTV 3.10
User avatar
Dwedit
Posts: 4924
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Re: What's are the differences between the ST018(snes) and the ARM7TDMI(gba)?

Post by Dwedit »

Señor Ventura wrote: Sun Dec 18, 2022 10:15 amBut i still miss an official ARM document about the specific iteration of the GBA's ARM7TDMI. I will try to search, and i will post here when i find it.
I have a 268 page document dated 1995, and a 204 page document dated 1999, but I don't know if either of those are specific to the version that's in the GBA.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
Pokun
Posts: 2681
Joined: Tue May 28, 2013 5:49 am
Location: Hokkaido, Japan

Re: What's are the differences between the ST018(snes) and the ARM7TDMI(gba)?

Post by Pokun »

creaothceann wrote: Sun Dec 18, 2022 11:14 am Lateral Thinking with Withered Technology was also a factor.
Yeah this. Like the GBA the original Game Boy was also "cheaped out" on by using a monochrome dotmatrix LCD. It was pretty crappy compared to Game Gear or PC Engine GT (which both are basically portable versions of Sega's and Hudson/NEC's respective 8-bit home consoles), but it was still good enough and the DMG has 20+ hours of battery time, people chose that.
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: What's are the differences between the ST018(snes) and the ARM7TDMI(gba)?

Post by lidnariq »

The technology wasn't really there yet for color screens in 1989. Laptops were almost exclusively black-and-white. The lousy contrast ratios, viewing angles, slow response, and inefficient backlights needed by the color screens in the TurboExpress, Nomad, Lynx, and Game Gear were par for the course: you just couldn't buy any better.

The Gameboy only provided 2bpp olive-scale because that was all that the display technology of the era was meaningfully capable of.
Pokun
Posts: 2681
Joined: Tue May 28, 2013 5:49 am
Location: Hokkaido, Japan

Re: What's are the differences between the ST018(snes) and the ARM7TDMI(gba)?

Post by Pokun »

Yeah well battery was probably not the only reason, just the most quoted one.

I remember Nintendo saying before the release that they tried using a color screen for the Virtual Boy as well, but it also had problems making it not worth it. I think battery consumption was a big concern that time as well.
Post Reply