Jump to content

Dev on Mac LC III and Classic II


Recommended Posts

Hi All,

 

I digged the whole forum, but doesn't find a relevant topic, or just don't wanted to steel other's, so i opened a new one...

I started a big (compared to me) project about a year ago: porting my favorit c64 game (Head over Heels) to a classic Mac, and as part of this project i had to learn coding my old Mac's. I just wanted to share my first little intro (as called on c64) that i finally got assembled. Mostly in C, some little parts in 68k ASM, made on a Mac LC III with CodeWarrior4. The app is using direct write to VRAM and vertical syncing (using SlotVBL).

 

here is the short video how it looks like:

direct link

Thanks for watching!

 

If anyone is interested, i can share the source files.

Edited by AbelVincze
Link to post
Share on other sites

I just finished a new intro featuring a stretcher/image swapper and a DYCP scroller:

 

I have to polish is a little bit, and make it working on Mac Classic (512x342 screen res), then i will post the sources.

Thanks for watching.

 

Some words about the making of this intro: the graphics was made on my main computer running Yosemite - using Photoshop and Illustrator. The fonts used are custom made fonts, and was assembled and pixelated in photoshop. Image data then was serialized with a custom JS tool, and the prototype was also done in Javascript: http://iparigrafika.hu/bitmap/sintest2.html

Edited by AbelVincze
Link to post
Share on other sites

Interesting! I'd be curious to see how well JavaScript Canvas maps to QuickDraw. Or, well, you probably just wrote to a straight byte buffer in VRAM, which sounds like the fastest approach of all. :)

 

My 33 Mhz Quadra has a Radius Thunder IV card used to accelerate QuickDraw calls, so it's a bit more capable of handling 2D graphics than the average 68k Mac. It still doesn't handle Steven Troughton-Smith's color 68k port of Lights Off without visible slowdown and redrawing, so I'd like to see what it takes to get fast graphics on these machines.

 

It handles Marathon 1 (with low-res textures) and M1 mods like Trojan and Operation Tantalus pretty well, though.

Edited by nglevin
Link to post
Share on other sites

I don't use quickdraw at all, just direcrt write to VRAM as you mentionned. The JS prototype is for testing the effect, if it looks nice or not.

 

The article about porting codes between OS X and classic OS with 68k support is quiet interesting. 

Link to post
Share on other sites

Here are the sources: http://iparigrafika.hu/retrocomputing/macc_sources.zip

Mac Intro V2 is still flickery on Mac Classic II, it seems the DYCP code needs to be optimalized, converting the image renderer codes from C to ASM was't enough.

 

The apps will run on 512x342 and 640x480 @ 1bit (the screen depth is changed automatically)

If you have larger resolution, please set it to one of the supported.

The sources are not well commented yet...

Edited by AbelVincze
Link to post
Share on other sites

Thanks! The assembly code looks very nice, I appreciate the use of macros as nice, organized subroutines.

 

Unfortunately, with my current setup, I'm having trouble running the compiled V1.0 app without seeing a distorted picture on my Quadra 800. This is 1 bit B&W, 640x480 resolution on Mac OS 8.1. V2.0 is crashing with a bus error at an address pointing to an AND.W call in ASMdycp64. I don't know enough about MacsBug to really understand the V2.0 crash better than that. Without MacsBug present, it's an error Type 10 that doesn't even allow me to reset Mac OS. Results are the same with extensions disabled.

 

I've also tried building both projects from source with CodeWarrior Pro 4. It didn't like the project files, as CodeWarrior 4 is too old for the IDE that comes with CWP4. I just create a new project, imported all source code files, and built with the same results as above. At least nothing else broke! Always a good sign.

 

I even tried pulling out most of the NuBus cards (except the ATTO SiliconExpress IV), all but 32 MB of RAM, all the VRAM, and the custom Dougg3 ROM to get this machine as close to stock as I could with 8.1 and all extensions disabled. Same problems with the V1.0 binary, no changes observed.

 

*phew*

 

It was worth a try. I'll let you know if I come up with any creative ideas, but in the meantime, I'll try to capture some cell phone camera footage.

Link to post
Share on other sites

No worries sir, things not working the first time is just a natural part of software development!

 

I was taking a look at Inside Macintosh for "Imaging with QuickDraw" and later today, "Macintosh Toolbox Essentials" (for windowing) to see if I could figure out the V1 problem. I'm assuming there's something wrong about how the app is handling the screen's scale, because I see what should be all of the objects animating on screen, they're just squished as though they're being drawn in the wrong places.

 

EDIT: I also checked the monitor settings to see if the app might be accidentally changing the resolution when it doesn't have to. Right now, I'm using an adapter with this flat panel VGA monitor that reports it as a 640 x 480, 67 Hz monitor, it can't go any higher or lower. Therefore, I think that possibility can be ruled out.

Edited by nglevin
Link to post
Share on other sites

Yes, i know, the problem is that at the moment i do not have any idea what could cause that issue.

 

I'm using OS globals to get the VRAM base address.... and funny but as i wrote these words, i just remember that there is two way to get that base address, and i'm using the Old way... It is possible that as you're using OS 8, the values a get from the OS globals is false, and points to nowhere, and this causes the app crashing. The next week i will have a "new" LC 475, that supports OS 8, and i will install it next to OS 7...

Link to post
Share on other sites
  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...