Click Here
home features news forums classifieds faqs links search
6104 members 
Amiga Q&A /  Free for All /  Emulation /  Gaming / (Latest Posts)
Login

Nickname

Password

Lost Password?

Don't have an account yet?
Register now!

Support Amigaworld.net
Your support is needed and is appreciated as Amigaworld.net is primarily dependent upon the support of its users.
Donate

Menu
Main sections
» Home
» Features
» News
» Forums
» Classifieds
» Links
» Downloads
Extras
» OS4 Zone
» IRC Network
» AmigaWorld Radio
» Newsfeed
» Top Members
» Amiga Dealers
Information
» About Us
» FAQs
» Advertise
» Polls
» Terms of Service
» Search

IRC Channel
Server: irc.amigaworld.net
Ports: 1024,5555, 6665-6669
SSL port: 6697
Channel: #Amigaworld
Channel Policy and Guidelines

Who's Online
22 crawler(s) on-line.
 95 guest(s) on-line.
 1 member(s) on-line.


 zipper

You are an anonymous user.
Register Now!
 zipper:  2 mins ago
 Kronos:  8 mins ago
 g.bude:  25 mins ago
 Dave:  26 mins ago
 Mr-Z:  36 mins ago
 kamelito:  48 mins ago
 Karlos:  54 mins ago
 clint:  1 hr 25 mins ago
 bhabbott:  1 hr 28 mins ago
 JimS:  1 hr 51 mins ago

/  Forum Index
   /  Amiga OS4.x \ Workbench 4.x
      /  PowerPC 603/604 Assembler Dev Environment on Windows
Register To Post

PosterThread
Heimdall 
PowerPC 603/604 Assembler Dev Environment on Windows
Posted on 10-Feb-2025 12:41:00
#1 ]
Member
Joined: 20-Jan-2025
Posts: 67
From: North Dakota

I'd like to add PowerPC 603/604 to the list of assemblers I'm working with and write a Higgs compiler backend for it (thus bringing my entire codebase to PPC ecosystem), given I already wrote one for RISC DSP/GPU before.
While I am not going to put my engine and game work to halt because of it, that'll naturally come to an end in about 4 months once my part-time job becomes full-time (for about 6 months) again around June.

And this project is something that's doable on that kind of random schedule (unlike game coding) during July-December, as separate language commands are easily doable within half day here and there, whenever I am back home from travelling.

But I need Dev environment first, to learn the PPC ASM (ideally an interactive one, showing all registers and allowing stepping through the code).

I don't want to just try setting up first thing I google, as I have zero exposure to PPC and would thus miss implications of such decision and as there's many people who have been in this space for decades, I figured I could just ask here and get the conversation going.

So, I need:
1. PPC 603 Assembler (command-line, Windows executable)
2. Virtual Machine with whichever OS is used there
3. Ideally, if possible, this would work within WinUAE which I use for testing

I tried asking this question on RISC-V subreddit, but it got flagged as off-topic there and deleted

 Status: Offline
Profile     Report this post  
matthey 
Re: PowerPC 603/604 Assembler Dev Environment on Windows
Posted on 10-Feb-2025 18:36:45
#2 ]
Elite Member
Joined: 14-Mar-2007
Posts: 2474
From: Kansas

Heimdall Quote:

So, I need:
1. PPC 603 Assembler (command-line, Windows executable)


You mentioned you were already using Frank Wille's VASM assembler which is a cross assembler that supports PPC. The VBCC cross compiler, and VASM the assembler for it, not only support PPC but multiple Amiga targets (PPC MorphOS, PPC AmigaOS 4, PPC WarpOS and PPC PowerUP).

http://sun.hasenbraten.de/vbcc/

I do not know about a PPC simulator but "The PowerPC Compiler Writer’s Guide" is good documentation for a compiler backend and instruction scheduler that covers early PPC CPUs like the PPC 603(e) and 604(e) including optimized PPC assembly code.

The PowerPC Compiler Writer’s Guide
https://cr.yp.to/2005-590/powerpc-cwg.pdf

Do not expect help with PPC assembly, optimizations and debugging from Amiga Neverland. PPC assembly experts do not exist here or in most places as PPC assembly is more dead in use than 68k assembly at this point. Reading the VBCC and VASM docs and then e-mailing Frank Wille with remaining questions is your best bet for Amiga related PPC questions. He can program PPC assembly and has written some PPC optimizations/inlines but no games unlike his many 68k Amiga games he enjoys writing, as I linked in another thread. A-EonKit sabotage of the 68k Amiga has failed to result in games written in PPC assembly, PPC software optimizations anywhere near the the scale of x86-64 software optimizations or even PPC SMP working as well as AROS x86-64 SMP after more than a decade. Maybe it is no worse than Jaguar hardware bugs and bottlenecks though.

Last edited by matthey on 10-Feb-2025 at 06:40 PM.
Last edited by matthey on 10-Feb-2025 at 06:37 PM.

 Status: Offline
Profile     Report this post  
Heimdall 
Re: PowerPC 603/604 Assembler Dev Environment on Windows
Posted on 10-Feb-2025 20:27:15
#3 ]
Member
Joined: 20-Jan-2025
Posts: 67
From: North Dakota

Quote:

matthey wrote:
You mentioned you were already using Frank Wille's VASM assembler which is a cross assembler that supports PPC. The VBCC cross compiler, and VASM the assembler for it, not only support PPC but multiple Amiga targets (PPC MorphOS, PPC AmigaOS 4, PPC WarpOS and PPC PowerUP).

http://sun.hasenbraten.de/vbcc/

Oh, wow - I am truly utterly unobservant Been using vasm for over half a decade, yet didn't notice it supports PowerPC targets ! I just checked the vasm.pdf, and - yep - there it is !!!

This is actually super important, because I won't have to write different handler for a different assembler into my compiler, as vasm support is already there, hence it'll make the very first compilation much easier!

Quote:

matthey wrote:

I do not know about a PPC simulator but "The PowerPC Compiler Writer’s Guide" is good documentation for a compiler backend and instruction scheduler that covers early PPC CPUs like the PPC 603(e) and 604(e) including optimized PPC assembly code.

The PowerPC Compiler Writer’s Guide
https://cr.yp.to/2005-590/powerpc-cwg.pdf

That is a vey good PDF, sir !
It contains examples of the basic code flow and the many ways how to translate it into PPC ops. I wish I had it for Jaguar, for sure !

On the other hand, my experience with the first RISC compiler (for Jaguar's DSP and GPU) is still beneficial, because I can now actually design the PPC Backend in a way that will take scheduling into account from the very start.

Meaning, I'll design it so that each instruction has an added information about all of its pipeline stages, This way, the compiler, at any point, will contain the exact replica of the HW's pipeline stages and will be able to [eventually] make intelligent decisions about the best instructions to use, at that particular point.

More importantly, I already have a Cycle-Count Option for the Block, which prints out during compilation, detailed info on all cycles consumed (if the specific CPU target has that feature implemented).
This will be very useful for benchmarking of inner loops, as I can easily extend this to contain additional info on pipeline.

Quote:

matthey wrote:

Do not expect help with PPC assembly, optimizations and debugging from Amiga Neverland. PPC assembly experts do not exist here or in most places as PPC assembly is more dead in use than 68k assembly at this point. Reading the VBCC and VASM docs and then e-mailing Frank Wille with remaining questions is your best bet for Amiga related PPC questions. He can program PPC assembly and has written some PPC optimizations/inlines but no games unlike his many 68k Amiga games he enjoys writing, as I linked in another thread. A-EonKit sabotage of the 68k Amiga has failed to result in games written in PPC assembly, PPC software optimizations anywhere near the the scale of x86-64 software optimizations or even PPC SMP working as well as AROS x86-64 SMP after more than a decade. Maybe it is no worse than Jaguar hardware bugs and bottlenecks though.

Well, but there's gotta be at least a dozen active PPC coders, or not even that many anymore ? They must hang out somewhere.
Frank's busy with his compiler suite, wouldn't want to bother him with newbie questions...

Maybe they're on reddit/discord...

 Status: Offline
Profile     Report this post  
Heimdall 
Re: PowerPC 603/604 Assembler Dev Environment on Windows
Posted on 11-Feb-2025 14:33:29
#4 ]
Member
Joined: 20-Jan-2025
Posts: 67
From: North Dakota

@matthey

Quote:

matthey wrote:

You mentioned you were already using Frank Wille's VASM assembler which is a cross assembler that supports PPC. The VBCC cross compiler, and VASM the assembler for it, not only support PPC but multiple Amiga targets (PPC MorphOS, PPC AmigaOS 4, PPC WarpOS and PPC PowerUP).

http://sun.hasenbraten.de/vbcc/

I didn't know about this, but Frank has been creating windows executables since 1.8j with each release. Which means I don't have to build vasmppc_std.exe for Windows myself!
It's right there at his site!

I found a HelloWorld ASM code for MorphOS on Aminet and managed to build it directly on Windows. Now just to run it, somehow, without the HW...


I thought I saw something about PPC in WInUAE, so I'll go take a closer look. It'd be super ideal if I could run the PPC executable straight from within WinUAE !

EDIT: Indeed, WinUAE supports PPC, so I just need to figure out how to configure it and then my Dev Environment will be ready.

Last edited by Heimdall on 11-Feb-2025 at 02:41 PM.

 Status: Offline
Profile     Report this post  
matthey 
Re: PowerPC 603/604 Assembler Dev Environment on Windows
Posted on 12-Feb-2025 0:25:18
#5 ]
Elite Member
Joined: 14-Mar-2007
Posts: 2474
From: Kansas

Heimdall Quote:

I didn't know about this, but Frank has been creating windows executables since 1.8j with each release. Which means I don't have to build vasmppc_std.exe for Windows myself!
It's right there at his site!


Frank is awesome and VBCC/VASM supports all the Amiga division and flavors despite the problems it has caused. This comes from Frank who programmed his PhxAss assembler and many games in 68k assembly.

Heimdall Quote:

I found a HelloWorld ASM code for MorphOS on Aminet and managed to build it directly on Windows. Now just to run it, somehow, without the HW...

I thought I saw something about PPC in WInUAE, so I'll go take a closer look. It'd be super ideal if I could run the PPC executable straight from within WinUAE !

EDIT: Indeed, WinUAE supports PPC, so I just need to figure out how to configure it and then my Dev Environment will be ready.


Right. WinUAE supports PPC but you need a PPC OS and kickstart/ROMs. The software needed is more expensive than RPi hardware and more difficult to obtain than 68k versions. PPC hardware is ridiculously expensive considering the lack of performance. The best value for PPC hardware is old PPC Mac hardware which MorphOS runs on and old PPC consoles which no AmigaOS runs on. There was a leaked AmigaOS 4 release for the PS3 but it was missing too many drivers and Sony dropped support for 3rd party OSs. The PPC Cell CPU was very difficult to program anyway although you seem to like the challenge of hardware purgatory. The PPC Nintendo consoles used PPC G3 CPU cores with customized and upgraded SIMD units that were much easier to program and more desktop like. They would make easier and more practical homebrew systems but I have not seen AmigaOS support for them yet.

 Status: Offline
Profile     Report this post  

[ home ][ about us ][ privacy ] [ forums ][ classifieds ] [ links ][ news archive ] [ link to us ][ user account ]
Copyright (C) 2000 - 2019 Amigaworld.net.
Amigaworld.net was originally founded by David Doyle