Jump to content
cubanismo

My Jaguar SDK environment is now on github

Recommended Posts

I've tidied up most of the remaining issues with my attempt at an updated Jaguar SDK, and documented the outstanding problems in github issues.  Here it is:

 

https://github.com/cubanismo/jaguar-sdk

 

See the README.md for cloning, setup, and general getting started instructions.  If you have a skunkboard or a BJL cable and know enough to run bash scripts and make, you should be up and running "hello world" built from source in a few minutes.  Beyond that, you're on your own.  A good amount of Jaguar documentation is included (All the scanned Atari docs and the searchable tech ref PDF, plus all the docs from Belboz's SDK), so everything I used to get from "What's a Tom?" to "I'm writing my own RISC code and it works!" is there if you're willing to read it.

 

This SDK includes all the original Atari samples and demos found in Belboz's old SDK/dev environment with cleaned up Makefiles that use rmac/rln by default (You can tweak the master Makefile helper files to substitute good ol' mac/aln if your system supports a.out binaries) and also converts them to end with infinite loops rather than "illegal" instructions to break into the debugger you probably don't have, meaning everything plays nicely with virtualjaguar and regular BJL/skunkboard HW setups out of the box.

 

Couple gotchas if you're trying to build some of the cooler stuff, such as the Atari 3D demo (which is included there under jaguar/3d, working Makefile and all, as well as resurrected versions of the Atari tools that are required to build its data files, 3dsconv and the original tga2cry) :

 

  • It only works on Linux right now.  I've been meaning to add windows setup scripts a well, but haven't gotten around to it yet and didn't want to let that hold up releasing what I have so far.
  • To build the 3D demo, you need to patch rmac.  See the issue here: https://github.com/cubanismo/jaguar-sdk/issues/6
  • To build the cinepak demos, you need a patch to rln to support Alcyon-format object files that I haven't posted anywhere yet because I need to make a 2nd pass at it.  I'll do that pretty soon, but again, didn't want to hold up release of everything else.  This is needed because the Atari cinepak library is only available as an Alcyon object file with no source.

 

Besides using this to build the included samples, I use it for all my other little projects as well.  You can source in the env.sh file and then make calls to any of the included tools (rmac, rln, jcp, tga2cry, etc.) on the command line from anywhere, as well as write Makefiles in your project that use the included Makefile helper headers/footers to reduce Makefile clutter as well.  For example, here's all the Makefile code needed for my simple lightgun test program that uses a mixture of C and assembly, and lives outside of the SDK itself:

ALIGN=q
include $(JAGSDK)/tools/build/jagdefs.mk

CFLAGS += -mshort -Wall -fno-builtin

OBJS =	startup.o \
	bullets.o \
	lightgun.o \
	font.o \
	sprintf.o \
	util.o

RAW_DATA = -ii clr6x12.jft _fnt

PROGS = bullets.cof

bullets.cof: $(OBJS) clr6x12.jft
	$(LINK) $(LINKFLAGS) $(OBJS) -o [email protected] $(RAW_DATA)

include $(JAGSDK)/tools/build/jagrules.mk

I hope others find this useful.  Half the difficulty in ramping up for me was just rounding up all the docs, utilities, and samples that I needed and getting them somewhere I could find and run them easily in a way that persisted across reboots.  And of course, if something is broken, let me know, either here, or by filing an issue on github.  I'll support it when I have free time, but hey, this is a hobby, so no guarantees.

Edited by cubanismo
Fixed typo in Makefile sample code
  • Like 6
  • Thanks 2

Share this post


Link to post
Share on other sites
3 hours ago, JagChris said:

There is an updated include file. Did you find that?

You mean the missing tri.h?  Not needed with the updated source.  tri.h is actually from an even earlier version of the demo AFAICT, and was just mistakenly included by some files in the version included in Belboz's SDK, but not actually used IIRC.  However, even when dropping it in the old version I could never get it to produce functional code personally, though I've seen the thread where you and a few others appear to have gotten something out of it.  Don't know what to make of that, but I know this version works!

Share this post


Link to post
Share on other sites

I was actually referring to this

 

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
;    JAGUAR.INC  Hardware Equates for JAGUAR System
;
;    COPYRIGHT 1992-1995 Atari Computer Corporation
;    UNAUTHORIZED REPRODUCTION, ADAPTATION, DISTRIBUTION,
;    PERFORMANCE OR DISPLAY OF THIS COMPUTER PROGRAM OR
;    THE ASSOCIATED AUDIOVISUAL WORK IS STRICTLY PROHIBITED.
;    ALL RIGHTS RESERVED.
;
; Revision History:
; 9/19/94 - Consolidated several files into first master JAGUAR.INC (SDS)
; 2/16/95 - MF
; 4/24/95 - Added UART Error Control and Mask definitions (NBK)
; 5/16/95 - Added Asynchronous Serial/DAC Synonyms (SDS) 
; 8/08/95 - Fixed two Blitter LFU Equates, added ProController equates,
;           added blitter BLITMASK flag, removed MOD_MASK/DSPINT0,
;           removed private hardware register definitions.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

It's the latest known hardware equates file not included in any SDK's

Edited by JagChris
  • Like 1

Share this post


Link to post
Share on other sites

Ah, OK, I didn't know that version actually made it out. Is there a link to the full file somewhere? I'd probably undo any register removals, but it'd certainly be good to merge in the additions.  I'm curious what the ProController equates are, given the changes there are just alternate locations for the numpad buttons.  Just some synonyms for ease of use I assume?

Share this post


Link to post
Share on other sites

With it being linux based, and chance of creating a Docker file for your setup?

Share this post


Link to post
Share on other sites
8 hours ago, Stephen said:

With it being linux based, and chance of creating a Docker file for your setup?

Not my preferred workflow, and I'd never built a docker image before, but hey, it's the new shiny, right? So... done! Here are the instructions on using it from the updated README.md:

 

---

 

The SDK is also available as a docker image for those who prefer a ready-made environment. Assuming you have docker installed and configured on your system, you can fetch it using this command:

$ docker pull cubanismo/jaguar-sdk

And then start an interactive session in it, mapping in a project in your home directory named 'MyJagProj' for building, build it, and exit, deleting the container and leaving you with a built project in your home directory.

$ docker run --rm -it -v ~/MyJagProj:/MyJagProj cubanismo/jaguar-sdk
# cd /MyJagProj
# make
# exit

 

---

 

I haven't set up automatic image updates from the github repo or anything yet, but that looks to be pretty straightforward, so I'll give that a try soon.

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites
8 hours ago, cubanismo said:

Not my preferred workflow, and I'd never built a docker image before, but hey, it's the new shiny, right? So... done! Here are the instructions on using it from the updated README.md:

 

---

 

The SDK is also available as a docker image for those who prefer a ready-made environment. Assuming you have docker installed and configured on your system, you can fetch it using this command:

$ docker pull cubanismo/jaguar-sdk

And then start an interactive session in it, mapping in a project in your home directory named 'MyJagProj' for building, build it, and exit, deleting the container and leaving you with a built project in your home directory.

$ docker run --rm -it -v ~/MyJagProj:/MyJagProj cubanismo/jaguar-sdk
# cd /MyJagProj
# make
# exit

 

---

 

I haven't set up automatic image updates from the github repo or anything yet, but that looks to be pretty straightforward, so I'll give that a try soon.

That was fast - thanks!  Only reason I asked, is we are being made to use this at work now and it's always better to learn with fun stuff rather than slogging through job related crap :)

  • Like 2

Share this post


Link to post
Share on other sites
On 9/22/2020 at 8:17 PM, JagChris said:

There is an updated include file. Did you find that?

I've merged the useful bits of this into the version in the SDK now.  Haven't bothered generating a new docker image, as after playing with @SebRmv's dev environment, I realized my Dockerfile is a bit lacking (TIL you don't have to leave everything running as root in your container), so I'm going to improve mine a bit and/or wait for some more substantial updates before pushing another blob to docker hub and setting up automatic docker image generation.

Share this post


Link to post
Share on other sites

Everything evolves. It never stops. But glad you were able to make it useful. It's a bit of history I found.

 

Share this post


Link to post
Share on other sites

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

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...