Login  •  Register


The time is now: Thu Jun 04, 2020 8:09 am

Emaculation wiki  •  Delete all board cookies



Post new topic  Reply to topic Page 1 of 1 [ 17 posts ]
Print view Previous topic  |  Next topic
Author Message
PostPosted: Sat Jul 13, 2019 3:16 am 
Offline
Apple Corer

Joined: Sun Feb 01, 2009 4:55 pm
Posts: 279
I've been spending a good chunk of time learning how a PowerPC Mac works. While I still have a long way to go before it can even reach the boot screen, I've put in no small amount of effort into this.

Here is a link to the source code, if you want to give it a spin.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Sun Jul 21, 2019 4:53 am 
Offline
Apple Corer

Joined: Sun Feb 01, 2009 4:55 pm
Posts: 279
So, the ROMs get a little farther, but it will be some time before it's ready.

Right now, at best, the emulator runs slightly faster than a PowerPC 601 at 60 MHz. And that's with an Intel Core i7. Needless to say, I'll need to optimize this some before progressing.

Also, dynamic memory mapping will be needed as this is aiming toward multiple Old World Macs.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Fri Jul 26, 2019 4:42 am 
Offline
Apple Corer

Joined: Sun Feb 01, 2009 4:55 pm
Posts: 279
With bit of a tweak, it now performs at slightly under 200 MHz. The change will be merged soon, along with another commit that will deal with both NuBus and PCI PowerMac memory mapping.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Fri Jul 26, 2019 11:49 pm 
Offline
Site Admin
User avatar

Joined: Mon May 20, 2002 4:37 am
Posts: 3770
Location: Uiwang
Hey, keep sharing your updates. Nice to see a long-time forum member creating something really new.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Sun Sep 29, 2019 8:25 pm 
Offline
Apple Corer

Joined: Sun Feb 01, 2009 4:55 pm
Posts: 279
So, on two different Macs so far, the Power Mac G3 Beige and the Power Mac 6100, we've gotten up to the point where it starts playing the boot chime.

That said, we're also considering moving this project from C++11 to Rust. Mainly because Rust is a bit more modern in so many ways (dependency management, code interoperation, Some speed-ups (though this is somewhat subjective) etc.)


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Tue Oct 01, 2019 4:10 pm 
Offline
Forum All-Star
User avatar

Joined: Fri Nov 27, 2009 5:11 am
Posts: 2961
Location: Emaculation.com
That's great on getting past the hardware tests and OF initialization!

How hard does the migration from C++11 to Rust look? I've never attempted a re-implementation in Rust, but it looks much more doable than doing a legacy language re-implementation. Are you planning on sticking some legacy code in libraries to import, or just write it all from scratch?


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Thu Oct 03, 2019 4:40 am 
Offline
Apple Corer

Joined: Sun Feb 01, 2009 4:55 pm
Posts: 279
It would be somewhat difficult, but DingusPPC is largely coded like a C program with some C++ bits here and there and encapsulated. We would mostly just stick with C++ for the initial conversion, but use the Rust toolchain to aid us in development.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Sat Jan 11, 2020 6:02 pm 
Offline
Apple Corer

Joined: Sun Feb 01, 2009 4:55 pm
Posts: 279
Right now, we're slowly approaching the point to where we can reach OpenFirmware. However, we also need a lot more work to be done. Here's just some of the things to complete:

VERY HIGH PRIORITY
*Flesh out the debugger to include a disassembler, a memory dumper (in progress), more sophisticated logging, etc.
*Perform CPU tests
*Fix the FPU emulation
*Write up documentation further (preferably in Markdown format) for hardware components (and a lot of it is on a Discord channel that needs to be preserved)
*Implement serial, OpenPIC, video (ATI Rage Pro), and any other hardware components not yet added

HIGH PRIORITY
*Get a proper logging library in the program
*Implement the TLB
*Implement hard drive support
*User input support

MEDIUM PRIORITY
*Acceleration support
*USB device support
*New World ROM support


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Sat Feb 29, 2020 4:23 am 
Offline
Apple Corer

Joined: Sun Feb 01, 2009 4:55 pm
Posts: 279
We improved our debugger significantly, including a disassembler. CPU tests have also been performed, which helped fixed hundreds of small bugs that might not have been noticed otherwise.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Mon Mar 02, 2020 7:32 pm 
Offline
Forum All-Star
User avatar

Joined: Fri Nov 27, 2009 5:11 am
Posts: 2961
Location: Emaculation.com
Nice work! Which PPC instruction set are you emulating at this point? 601?


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Thu Mar 05, 2020 1:09 am 
Offline
Apple Corer

Joined: Sun Feb 01, 2009 4:55 pm
Posts: 279
While it's mostly the G3 instruction set, the 601 does have limited support at the moment (several of the exclusive bit-shifting ops are not yet implemented).

We have included a small dummy ADB emulation, which allows us to complete loading a OpenFirmware bytecode image and it starts going into the cold boot sequence.

Sooner or later, we'll start on the device emulation, but we need to complete documentation and clean up the code further.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Fri Mar 27, 2020 6:18 am 
Offline
Apple Corer

Joined: Sun Feb 01, 2009 4:55 pm
Posts: 279
We now have audio playback. We've managed to get the boot-up jingle and crash jingle from the Power Mac G3 Beige ROM to play.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Fri Mar 27, 2020 3:04 pm 
Offline
Forum All-Star
User avatar

Joined: Fri Nov 27, 2009 5:11 am
Posts: 2961
Location: Emaculation.com
A thought for you: somewhere (maybe Bend Boldt's old page? Somewhere on the 68kmla forums?) I remember reading that when they were working on getting through booting, they discovered a way to boot off new world ROMs by taking a 68K ROM (3MB) and just byte aligned appending New World in memory after it. So if we can somehow do a clean room implementation of the 68K part (using ARDI's code?) then we can read the New World into memory after it, and it should be enough to boot a New World-capable OS, assuming the hardware side is properly emulated.

Here's a project for part of it: https://github.com/elliotnunn/mac-rom


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Fri Mar 27, 2020 4:33 pm 
Offline
Apple Corer

Joined: Sun Feb 01, 2009 4:55 pm
Posts: 279
I do have a 4 MB Gigabit Ethernet ROM, but it doesn't resemble the Old World ROMs much. I'd like to see if anyone can find the page you're mentioning.

While it is possible to make a clean-room implementation, that takes a lot of time and effort to code.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Fri Mar 27, 2020 5:24 pm 
Offline
Forum All-Star
User avatar

Joined: Fri Nov 27, 2009 5:11 am
Posts: 2961
Location: Emaculation.com
Yeah; so far I've just found the annotated Mac Plus ROM, the various romulators, etc. -- but I can't find the ROM replacement project itself anywhere. And of course, the three toolbox replacement projects attempt to skip over the entire ROM issue by doing direct toolbox and API translation instead of just re-implementing the hardware mapping routines and core toolbox functions.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Sun Apr 26, 2020 1:08 am 
Offline
Apple Corer

Joined: Sun Feb 01, 2009 4:55 pm
Posts: 279
Good news - We fixed some crash bugs, inserted some basic video implementation (though it still won't display anything yet), and have some keyboard work started.

Bad news - To get the keyboard working requires a very timing-specific auto-polling implementation and it's required for emulation to progress any further.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Sun Apr 26, 2020 8:39 am 
Offline
Expert User
User avatar

Joined: Fri Feb 13, 2004 8:59 am
Posts: 4891
Location: Sittard, The Netherlands
Perhaps taking a look at the adb work currently being done on Qemu might help?
https://github.com/mcayland/qemu/commits/adb-wip

Best,
Cat_7


Top
 Profile  
Reply with quote Post a reply  
Display posts from previous:  Sort by  
Post new topic  Reply to topic Page 1 of 1 [ 17 posts ]


Who is online

Users browsing this forum: No registered users and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
 

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group