Author Topic: Host/Guest Development Toolchain Integration  (Read 2748 times)

Offline classicmacreborn7

  • Valued Member
  • **
  • Posts: 17
  • New Member
Host/Guest Development Toolchain Integration
« on: January 06, 2019, 02:19:43 PM »
Hi all,

I’m new to these posting forums but I sometimes post on other forums.  I’ve been on and off working with OS9 emulation for a few years now.  The main project I've been working on is a replacement Finder, but I've thought of one idea that might be fun (which I'm still not 100% sure I'll do yet).  I’ve built a few OS9 tools here and there over the past few years that have made things easier.  One of them is kind of neat- it’s a pretty simple system that allows strings to be sent back and forth between the host OS and the guest OS (os9) in emulation.  OS9 can trigger events in the host OS as well as allow the host OS to trigger events in OS9.

I usually work in CodeWarrior/C as well as MPW in order to issue direct calls to the Toolbox.  The problem I usually face is how much of a pain it is to develop in OS9 when you’re used to working in the host OS.  It doesn’t have the modern UI features and emulation can always be sometimes wonky.  Usually not much of an issue but as the complexity of the projects increase it tends to become a huge nuisance.

It would be really convenient to have an host-side IDE that uses the MPW references and builds/runs in an emulated OS9 environment.  It’s actually quite feasible using ToolServer and the host/guest communication scripts I’ve written (which are a lot simpler than they might sound).  Of course, I wouldn’t write my own code editor- just need to integrate with Eclipse, Codeblocks, or Atom, etc.

If anyone knows if there’s already been some work on this, or a better way, I’d love to hear it!
Also, any major technical challenges I'll face that I haven't yet thought of would be extremely helpful.

Offline Daniel

  • Gold Member
  • *****
  • Posts: 300
  • Programmer, Hacker, Thinker
Re: Host/Guest Development Toolchain Integration
« Reply #1 on: January 06, 2019, 03:37:50 PM »
I would suggest looking at ELN's various Github repositories (https://github.com/elliotnunn?tab=repositories). BuildCubeE almost does what you want. It turns the contents of a folder into a HFS partition, runs a MPW command on the partition, and turns the results back into files and folders on the host OS. Resource forks and metadata are stored in .rdump and .idump files so they can be manipulated by the host.

The grand architecture for interfacing Github to emulated MPW currently only works for CubeE, the 68k ROM source code.  BuildCubeE does not have the Interfaces&Libraries for building regular programs. Not yet, but someday it will.

Offline classicmacreborn7

  • Valued Member
  • **
  • Posts: 17
  • New Member
Re: Host/Guest Development Toolchain Integration
« Reply #2 on: January 06, 2019, 06:00:35 PM »
Hah wow I hadn't even heard of CubeE.  So they're reverse engineering the new world rom.  That's really awesome!! Seems like there can be some inspiration in BuildCubeE for an OS9 toolchain.

Right now, the scripts I've got communicating between host and guest are pretty simple.  It just has a host-to-guest and guest-to-host file in the shared folder, and has a listener script in both the host os and guest os that continually checks for changes and a delimiter (to ensure that the write has been completed).  I thought it would be laggy, but it actually responds instantaneously.  The guest OS listener script is a background-only application in startup items, but it would probably be better to implement it as an extension at some point.

The next step would be to have the guest os listener send commands to MPW read back the results.  I might look at CubeE and see how they implemented getting information from the shell.