Page 1 of 1

wanting a different arch to mess with.

Posted: Fri May 01, 2009 10:01 pm
by earlz
Hi, I would really like to mess with some kind of different arch. than x86. So here are my options I see:

x86-64 --Sure it's basically x86 with a few special features, but I don't have physical hardware to test it on[at the moment](and with such a cmplex arch, emulation is usually not exactly right)
ARM --seems to be a very good CPU to mess around with. My problem is there is no standardization of devices. The only thing I can find any docs about as a full platform is gaming platforms such as GBA(it lacks a keyboard) there is the integrator and such devel boards in Qemu, but I can't find very good documentation other than like data sheets.
Whatever arch is in my TI-84. I don't remember what CPU name, but it was like the predecessor to the 8086. That being said, it's total crap. Sure it's an option to mess around with, but the TI-84 is easily brickable and 16bit memory bus and 8bit registers is so freaking annoying. And their is so little RAM to play around with. So I prefer to not use it.

Ok, now what about any other arch.? I wouldn't mind if it's emulation only, but if I could easily get my hands on such a piece of hardware, it would be a big plus(I've considered if one of the other TI calculators is an option)

I'm just wanting to expand my horizons of OSdeving and get a feel for another arch.. but have fun at the same time.

Re: wanting a different arch to mess with.

Posted: Sat May 02, 2009 1:03 am
by pcmattman
ARM --seems to be a very good CPU to mess around with. My problem is there is no standardization of devices. The only thing I can find any docs about as a full platform is gaming platforms such as GBA(it lacks a keyboard) there is the integrator and such devel boards in Qemu, but I can't find very good documentation other than like data sheets.
I've found useful information all over the internet (via Google) about the Integrator and Versatile boards QEMU emulates.

The TI-84 is a Z80 CPU as well, by the way.
Ok, now what about any other arch.? I wouldn't mind if it's emulation only, but if I could easily get my hands on such a piece of hardware, it would be a big plus(I've considered if one of the other TI calculators is an option)
Try MIPS or PPC.

Re: wanting a different arch to mess with.

Posted: Sat May 02, 2009 3:34 am
by JackScott
The PowerPC architecture is (or was) quite common, being used most predominantly on the Apple Macintosh line. Anything with i at the start (iMac, iBook, etc) is a PowerPC-based machine. The good thing about this is that Apple has kept the hardware fairly standard (there are far far fewer device drivers to write for than a plain x86 PC box), with only third-party PCI devices to worry about (and the number of those actually being used in common usage is low). You can pick these boxes up for cheap on eBay (or wherever), and they are still usable for everyday web browsing and so on as well. Only problem is that since 2005/06 Apple started using x86 instead in their line of machines, so it's going to become old and useless fairly soon.

Apart from that, newer game consoles are looking quite nice. I actually went to a talk by a PhD student at my University working on writing software for the Sony PS3. I can tell you that it computes things damn fast: it has one general purpose CPU (called a PPE) with computing power equivalent to a Pentium III, and then seven SPEs. Each SPE is a seperate sub-machine with it's own memory. You can only write to the SPE through DMA, but this keeps the main bus free of memory transfers. So it's basically a co-processor that does bleeding fast floating point calculations (I don't have raw numbers, bit drawing a 720p fractal went from 30s to 2.5s when you added the SPEs). Admittedly the PS3 isn't an open architecture (very little support for the 3D game hardware is in the open), but it is very interesting.

Aside from the PS3, there are other consoles to look out for. And then, you could even build your own computer if you wanted to. Using a processor such as the Z80 or the 6502, creating a computer from scratch is achievable (relative to building an x86 motherboard). If you like the look of the 6502 architecture, a guy called Daryl Rictor even builds a single-board computer called the SBC-3 (http://sbc.rictor.org/sbc31/info.html) which you could use.

While I'm not trying to say what you should do, I think a lot of programmers would have a lot to benefit from pushing themselves into a smaller architecture: 8-bit data bus, 16-bit address bus and a 2MHz processor is fast enough to do a lot of things (maybe not make fractal drawings, but anything text-based is achievable).

Re: wanting a different arch to mess with.

Posted: Sat May 02, 2009 10:34 am
by Colonel Kernel
JackScott wrote:The PowerPC architecture is (or was) quite common, being used most predominantly on the Apple Macintosh line. Anything with i at the start (iMac, iBook, etc) is a PowerPC-based machine.
Not quite. iMacs made prior to 2006 are PPC, but newer ones have Intel Core 2 Duo CPUs. Also, anything starting with "Power" is definitely PPC (Powerbook, PowerMac, etc.). :)

There is a lot of great documentation for PPC, including a fairly extensive look at the architecture and calling conventions in Mac OS X Internals.

Re: wanting a different arch to mess with.

Posted: Tue May 05, 2009 10:16 am
by Combuster
Different arch? Try a game console :D

Lots of emu's, documentation's decent, and most have some sort of scene where you can poke for hardware help. And if you wrote something, you can give it to your friends :)

Re: wanting a different arch to mess with.

Posted: Thu May 07, 2009 7:22 am
by Love4Boobies
Colonel Kernel wrote:
JackScott wrote:The PowerPC architecture is (or was) quite common, being used most predominantly on the Apple Macintosh line. Anything with i at the start (iMac, iBook, etc) is a PowerPC-based machine.
Not quite. iMacs made prior to 2006 are PPC, but newer ones have Intel Core 2 Duo CPUs. Also, anything starting with "Power" is definitely PPC (Powerbook, PowerMac, etc.). :)

There is a lot of great documentation for PPC, including a fairly extensive look at the architecture and calling conventions in Mac OS X Internals.
Nope. They discontinued everything.

EDIT: Also, I see no one metioned SPARC.

Re: wanting a different arch to mess with.

Posted: Thu May 07, 2009 8:22 am
by Mark139
For real ARM you could look at BeagleBoard from TI or Gumstix. ARM.com has documentation on the instruction set. The various actual chips (e.g omap) usually have good reference docs.

There are also some ARM based micro-controllers - philips make some.

Re: wanting a different arch to mess with.

Posted: Thu May 07, 2009 8:24 am
by Mark139
Also, forgot ATMEL make ARM based micro-controllers:

http://www.atmel.com/dyn/products/devic ... ily_id=605

Re: wanting a different arch to mess with.

Posted: Fri May 08, 2009 9:50 am
by Dex
This is the basic boot for all arm chips

Code: Select all

:****************************************;
; ARM BootLoader.                        ;
;----------------------------------------;
; Prog by Dex.                           ;
; Coded with FasmARM.                    ;
; Part of the the x86 to ARM DexOS port. ;
; C:\fasmarm ArmBoot.asm ArmBoot.bin     ;
;                                        ;
;  C Bamford.2006(c)                     ;
;****************************************;
format binary
org   0               ; code starts at offset 0.
use32                  ; use 32-bit code.

        b     reset                   ; b lable (is the same as jmp lable in x86 asm )
        b     undefined_instruction
        b     software_interrupt
        b     prefetch_abort
        b     data_abort
        b     not_used
        b     irq
        b     fiq

align 4

;********************************;
; boot start.                    ;
;********************************;
reset:
; here is where your start up code would go.
LetsLoop:
   b LetsLoop

;********************************;
; just Loop For Now ;)           ;
;********************************;
undefined_instruction:
software_interrupt:
prefetch_abort:
data_abort:
not_used:
irq:
fiq:
LetsLoopForNow:
   b     LetsLoopForNow
As you can see very simple compared to x86.

Re: wanting a different arch to mess with.

Posted: Fri May 08, 2009 12:33 pm
by Combuster
more "simple"?

equivalent x86 code: :shock:

Code: Select all

JMP $ ; do nothing for now

Re: wanting a different arch to mess with.

Posted: Fri May 08, 2009 3:02 pm
by Dex
Combuster wrote:more "simple"?

equivalent x86 code: :shock:

Code: Select all

JMP $ ; do nothing for now
No, to do the equivalent x86 code, you would need to set up GDT, IDT, ISR etc and enter pmode.
When a isr is fired you end up "software_interrupt" when a IRQ is fired you end up "irq" , when you boot you end up"reset" and so on.
The jmp label is to keep the example simple.