• Updated 2023-07-12: Hello, Guest! Welcome back, and be sure to check out this follow-up post about our outage a week or so ago.

Dev on Mac LC III and Classic II

AbelVincze

Active member
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.

 
Last edited by a moderator:

nglevin

Well-known member
Very nicely done.

Personally, I'd love to take a look at that source. I have a copy of CodeWarrior Pro 4 and a Macintosh Quadra 800. Would be nice to build it for myself and see those VRAM techniques at work.

 

AbelVincze

Active member
Hi, ok at least it will be tested on a Quadra 800 too:) Tonight i will finish a new effect, and then i will make a package of all the files. And i will also add comments to the code. I will post the news, and the links later in this topic!

 

AbelVincze

Active member
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

 
Last edited by a moderator:

nglevin

Well-known member
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.

 
Last edited by a moderator:

AbelVincze

Active member
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. 

 

AbelVincze

Active member
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...

 
Last edited by a moderator:

nglevin

Well-known member
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.

 

nglevin

Well-known member
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.

 
Last edited by a moderator:
Top