The Jaguar source code thread

Let's get coding!

Moderator: a31chris

Locked
User avatar
a31chris
Jaguar MOD
Posts: 832
Joined: Mon Apr 01, 2013 7:09 am

The Jaguar source code thread

Post by a31chris » Sun Apr 27, 2014 6:40 pm

Here I will put all the sources that I can link to, zip up and attach or whatnot. Let's start.

Myst

Fight For Life

Tempest 2k sources
http://www.jaguar64.eu/download/file.php?id=169

Tempest 2k sound files:
http://www.jaguar64.eu/download/file.php?id=170
JagDoomSource.zip
JagDoom source, provided by Carl Forhan. Readme and licensing agreement included in zip.
(306.72 KiB) Downloaded 117 times
Checkered Flag Rev9 Sources 10-18-94.zip
(4.66 MiB) Downloaded 153 times
Cybermorph.zip
(1.37 MiB) Downloaded 149 times
Crescent Galaxy.zip
Trevor McFur in the Crescent Galaxy
(185.19 KiB) Downloaded 148 times
CLUB.zip
Near as I can tell this is Club Drive
(2.72 MiB) Downloaded 147 times
Atari Jaguar Alien vs.zip
Alien vs Predator source code. I don't think it contains graphics assets. Interesting notes to John and Purple. Also notes about a monster editor.
(639.71 KiB) Downloaded 133 times
B2K_SRC2.ZIP
Breakout 2k sources
(1.38 MiB) Downloaded 103 times
Tools source codes
jagenc2.zip
Jaguar Cartridge encryption files
(190.62 KiB) Downloaded 103 times
jagcdenc2.zip
CD encryption files
(98.87 KiB) Downloaded 101 times
JWARN.zip
GPU asm wait state detector
(12.05 KiB) Downloaded 160 times
2600 Emulator.zip
(324.33 KiB) Downloaded 144 times
POLYTOOL.zip
I'm not sure what this is. Your guess is probably as good as mine.
(105.81 KiB) Downloaded 143 times
HOVERR.zip
HoveRR 3d rendering package. This is not HoverStrike. It seems to be another version of the Atari SDK 3D engine. Most likely the branch off Eric Smith refers to in his notes where he 'produced versions of the renderer
optimized for large polygons' such as Hoverstrike uses.
(582.61 KiB) Downloaded 149 times
RENDER.zip
Stock Atari SDK 3D renderer. Latest files are from September '95.
(519.71 KiB) Downloaded 152 times
TRI.H.zip
tri.h and Triinter.h. Reported 'missing' files from the renderer source.
(2.27 KiB) Downloaded 116 times
Jaz Tools.zip
(771.43 KiB) Downloaded 151 times
Jpeg Sources.zip
(511.51 KiB) Downloaded 141 times
Jag Util Sources.zip
(161.41 KiB) Downloaded 152 times
Development.zip
Random Jag development files
(2.61 MiB) Downloaded 155 times
Misc Jag files.zip
(60.13 KiB) Downloaded 145 times
Jim Elliots disk.zip
Jim Elliot's disk. Programming files for Jaguar from may 95. See below for more info.
(354.08 KiB) Downloaded 104 times
TGA2PAD

Code: Select all

/* This program pads a 24 bit TGA file out to a multiple of 8 in
* height and width (so it can be JAGpeg'd).
*
* This is generic ANSI C, and should compile with any ANSI compliant
* compiler (e.g. gcc, Borland, Microsoft, or Lattice).
*
* History:
* 1.0      First version
*/
http://www.jaguar64.eu/download/file.php?id=162
What came after the Jaguar was the PS1 which for all it's greatness, ushered in corporate development and with it the bleached, repetitive, bland titles which for the most part we're still playing today. - David Wightman

User avatar
a31chris
Jaguar MOD
Posts: 832
Joined: Mon Apr 01, 2013 7:09 am

Re: The Jaguar source code thread

Post by a31chris » Fri May 30, 2014 3:53 pm

Regarding the JagDoom source code Chilly Willy wrote:Doom is rather interesting - the rendering is split into stages, each one triggering the next. After a few stages, the variables in ram aren't needed anymore, so the 68000 is allowed to continue running the game logic in parallel to the later stages of the GPU code finishing the rendering. Once you're down to columns and spans (the two graphical operations done in Doom rendering), the GPU starts sending operations to the BLITTER. Funny enough, the 68000 handles all the OP setup for each frame after the GPU finishes the last stage. Having the GPU load later stages of code to work on a problem is very similar to how the RSP works in the N64 - since there is only 4KB of instruction ram in the RSP, the "microcode" is split into sections which are loaded into instruction ram as needed. Given how efficient loading the GPU local ram is, having GPU code load itself in stages could have easily been used by more games than just Doom. It probably would have become standard if the Jag had lasted in the marketplace.
Regarding possible JagDoom optimizations Chilly Willy wrote:Doom on the Jaguar divides the task of running the game between the 68000 and the GPU, with each being roughly able to run at the same time. The 68000 runs nearly all the game logic, while the GPU runs nearly all the rendering code. Remember that Carmack himself worked on this code. The rendering code had to be broken into NINE SEGMENTS of 4K each. The 68000 runs all the game logic, starts the first GPU segment, then waits until the third segment is done. By that time, the rendering has finished using the game variables that will be changed by the game logic (player position, etc). The 68000 then starts on the next tick worth of game logic. Each GPU segment interrupts the 68000 to blit the next segment into local ram, with the last segment triggering the 68000 to build the next OP list. The GPU uses the blitter as it goes where it can for drawing. If the 68000 finishes the game logic before the rendering is done, it must wait on the rendering. So the 68000 has one spot where it always waits, and another spot it MIGHT wait. It's possible the GPU might finish the rendering before the 68000 finishes the game logic (for example, your nose right up against a plain wall), and so it has one place it MIGHT wait as well.
What came after the Jaguar was the PS1 which for all it's greatness, ushered in corporate development and with it the bleached, repetitive, bland titles which for the most part we're still playing today. - David Wightman

User avatar
a31chris
Jaguar MOD
Posts: 832
Joined: Mon Apr 01, 2013 7:09 am

Re: The Jaguar source code thread

Post by a31chris » Mon Jun 09, 2014 6:46 pm

Concerning the Atari Rendererer Gorf wrote:The problem with the Atari renderer that is in source form is that it is loaded with a lot of 68k code. Not only that, the renderer itself is poorly written in the fact that it not only uses 16 bit values to work with, but it also uses the matrix instuctions and that it was written to draw one model at a time as opposed to building a list of polygons to rip through, as it should. So for every model you want to draw per frame, it processes each one through all the set up....very inefficient. A good renderer would consider ALL models per frame, build a list of polies and then render them using 32 bit values and instead of the matrix multiply instructions which take WAY too much setup, it should use the MAC instructions which would better handle 32 bit values. Something the MMULT instruction can't do.

What Scott (JagMod) did to speed up the renderer is get rid of the 68k code all together, eliminate all the blits of the code to GPU local and put them in to one big chunk. The other issue with the Atari renderer is it has the GPU stopped completely while the blitter keeps loading in vertices to the RAM. What should be happening is that the verts should be out in main and keep the GPU running at all times. OR use a small portion of the local to have the blitter move the verts to WHILE the GPU is constanly processing them or at least doing something else while waiting for the blitter to load the next set.

A big problem besides the 68k running way too much is the fact that the GPU is constantly waiting in a tight loop for the blitter to finish moving the data.....a ton of wasted cycles right there. JagMod had a small sample code where the GPU never stops working and got well over 80,000 blits PER FRAME using this method. This was a first attempt too.

I maintain that we have not seen anywhere near the true ability of the Jaguar's 3D capabilities just based on these serious flaws of coding inefficiencies. Just about every game uses this piss poor method of GPU waiting and over use of the 68k.
What came after the Jaguar was the PS1 which for all it's greatness, ushered in corporate development and with it the bleached, repetitive, bland titles which for the most part we're still playing today. - David Wightman

User avatar
a31chris
Jaguar MOD
Posts: 832
Joined: Mon Apr 01, 2013 7:09 am

Re: The Jaguar source code thread

Post by a31chris » Sat Jan 02, 2016 10:04 pm

Since I have reached my quota of uploads on this forum I am continuing the source code thread over here. I have made what I believe to be some interesting discoveries:
http://www.jaguar64.eu/viewtopic.php?f= ... 1683#p1683
What came after the Jaguar was the PS1 which for all it's greatness, ushered in corporate development and with it the bleached, repetitive, bland titles which for the most part we're still playing today. - David Wightman

User avatar
a31chris
Jaguar MOD
Posts: 832
Joined: Mon Apr 01, 2013 7:09 am

Re: The Jaguar source code thread

Post by a31chris » Tue Feb 16, 2016 9:55 pm

New updates to the first post in this thread.

Also included is Atari's 'Graphics Gems' collection of source codes from the magazine/articles of that time. One of which they actually adapted to work with the Jaguar: Implicit.c
Snippets from these descriptions:

Graphics gems
Graphics Gems
___________________________________________________________
File Name Archive # Description
-----------------------------------------------------------
2DClip 1 2D Clipping: A Vector-Based Approach
2DClip/Makefile 1 Makefile
2DClip/bio.c 2 Basic operations
2DClip/box.h 1 BOX definition
2DClip/clip.c 2 Clipping routines
2DClip/cross.c 4 Intersection calculation
2DClip/line.h 1 Major definitions
AALines 1 Rendering Anti-Aliased Lines
AALines/00README 1 Information about AALines Gem
AALines/AALines.c 4 Code to render an anti-aliased line
AALines/AALines.h 1 Symbols & globals
AALines/AAMain.c 1 Calling routine
AALines/AATables.c 4 Initialization of tables and frame buffer
AALines/FastMatMul.c 5 Fast routines to multiply 4x4 matrices
AALines/LongConst.h 1 High-precision constants
AALines/Makefile 1 Makefile
AALines/utah.c 3 Interface to Utah Raster Toolkit
AALines/utah.h 1 Declarations for URT interface
AAPolyScan.c 4 Fast Anti_aliasing Polygon Scan Conversion
Albers.c 3 Albers Equal-Area Conic Map Projection
Graphics Gems II
xlines.c I.2 Mukesh Prasad, "Intersection of Line Segments"

Peano/ I.7 Ken Musgrave, "A Peano Curve Generation Algorithm"
Makefile
main.c
mapply.c
peano.c
types.h

Hilbert.c I.8 Douglas Voorhies, "Space-Filling Curves and a Measure of Coherence"

dither/ II.3 Spencer W. Thomas and Rod G. Bogart, "Color Dithering"
dither.3
dither.c

RealPixels/ II.5 Greg Ward, "Real Pixels"
color.c
color.h
colrops.c
header.c
rasterfile.h
ra_pr24.c
resolu.c

rotate8x8.c II.6 Sue-Ken Yap, "A fast 90-Degree Bitmap Rotator"

inv_cmap/ III.1 Spencer W. Thomas, "Efficient Inverse Color Map Computation"
inv_cmap.3
inv_cmap.c

quantizer.c III.2 Xiaolin Wu, "Efficient Statistical Computations for Optimal Color Quantization"
Graphics Gems III
File or Gem
Directory Number Author and Title of Gem
--------- ------ -----------------------

I. Image Processing

fastBitmap.c I.1 Tomas Moller, "Fast Bitmap Stretching" (doesn't compile)
comments: ANSI C

filter.c I.2 Dale Schumacher, "General Filtered Image Rescaling"

bitmap.c I.3 Dale Schumacher, "Optimization of Bitmap Scaling Operations"

rgbvary.c I.4 Bragg, "A Simple Color Quantization Pre-processor"
comments: ANSI C

contour.c I.6 Tim Feldman, "Generating Iso-Contours from a Pixmap"

scallops8.c I.9 Eric Furman, "A Fast Boundary Generator for Composited Regions"

II. Numerical & Programming Techniques

sqrt.c II.1 Steve Hill, "IEEE Fast Square Root"

alloc/ II.2 Steve Hill, "A Simple Fast Memory Allocator"
alloc.c
alloc.h

3d.c II.3 Steven Hanson, "The Rolling Ball"
defs.h

interval.C II.4 Jon Rokne, "Interval Arithmetic"
comments: C++
Graphic Gems IV
CONTENTS:

file or book chapter title and author
directory chapter
------------------------------------------------------------

I Polygons and Polyhedra

centroid.c I.1 Centroid of a Polygon
Gerard Bashein and Paul R. Detmer

convex_test/ I.2 Testing the Convexity of a Polygon
Peter Schorn and Frederick Fisher

ptpoly_weiler/ I.3 An Incremental Angle Point in Polygon Test
Kevin Weiler

ptpoly_haines/ I.4 Point in Polygon Strategies
Eric Haines

delaunay/ I.5 Incremental Delaunay Triangulation
Dani Lischinski

vert_norm/ I.6 Building Vertex Normals from an Unstructured Polygon
List
Andrew Glassner

collide.c I.8 Fast Collision Detection of Moving Convex Polyhedra
Rich Rabbitz
Full file descriptions and files can be found here: http://www.jaguar64.eu/viewtopic.php?f= ... t=30#p1768
What came after the Jaguar was the PS1 which for all it's greatness, ushered in corporate development and with it the bleached, repetitive, bland titles which for the most part we're still playing today. - David Wightman

User avatar
a31chris
Jaguar MOD
Posts: 832
Joined: Mon Apr 01, 2013 7:09 am

Re: The Jaguar source code thread

Post by a31chris » Wed Feb 17, 2016 8:24 pm

Here are Eric Smith's notes for his 95 work schedule working on the Atari Jaguar. What he accomplished, what he planned etc.
Based on the notes about how he made a text viewer for black ICE/White Noise this points out that the LIB directory posted earlier is his.
To further cement that idea, he talks about Oberon testing, and Oberon files are in here. Yeah... maybe. OK his notes get more specific.
WEEKLY REPORT for Eric Smith
Week ending: 6/23/95


Hoverstrike CD
--------------
Implemented a dissolve routine in the
GPU to run during transitions (i.e.
while data is being loaded from CD).
Well this dissolve routine can be found in the LIB directory with a windows timestamp of being last modified at 6/16/95 at 8:23 am.

LIB directory

I believe that Eric Smith's notes can be somewhat considered a roadmap into the LIB directory and the Render/Hoverr development cycle. Also in this 'Jaguar' directory is one of the latest tri68k.c and blit.h files I can find. Only the jag2rend folder has a later file date.

I think Eric Smith was having the Jaguar build Toruses to test triangle drawing speed while he worked on improving things.

Eric Smith's notes

AND I SEEM TO HAVE MISPLACED MY HOVERSTRIKE CD SOURCE CODES. ALKJDGASKLDJFASDFKLJKLLKJ.....

NEW DISCOVERY

Code: Select all

// mkbnd.c - utility to convert 3d studio (*.asc) text files into *.inc source files
I am going to actually include the entire Zip of the 'jaguar' directory I found this in. It was in an unsearched directory buried deep. There is another implicit in the BIN directory that's a TTP file. I'm assuming that's ST. Plus some other late files that are in TTP format. I'll let someone else look at it who has an ST. Also an encryption 'ENTEST' folder for testing encryption? It seems to be the same date as the standard encryption tools already out there. I have a suspiscion that this is another Eric Smith directory.

Jaguar folder

Looking further into the MKBND folder I could see that according to the makefile it was missing at least two files. So a CD search for those two filenames revealed that this is related to the BND2DML folder of files that's in the EP#4 development root directory. Will see if these are the files Mike is looking for. They are timestamped around September 94 though. Kinda old. Since they are in the same related family of files I am putting them together in one zip. Interesting that they were nowhere near each other and its dumb luck I stumbled across MKBND. I will touch base with Mike Fulton and see if this is what he was looking for.

That BND2MDL and MKBND are Jaguar related is a complete assumption. In the BND2MDL folder or in the MKBND folder there is NO mention of the Jaguar anywhere. Though these files are dated 94 and the MKBND folder was found in a Jaguar directory amongst other Jaguar work. And BND2MDL was found in the main Jaguar development directory on the EP#4. If they aren't Jaguar related then what else was Atari focusing on in late 94 to need these utilities? And why would they be in directories with Jaguar stuff?

BND_Family_Values

BND2MDL README:

Code: Select all

Building Big Worlds:

To build a large (multi-piece) world, we need to link
bands together. This is done with the "band list".
Each band has a band list, which gives what other
bands need to be drawn and in what order. The bnd2mdl
program generates band lists (and other special band
information) from a "link" file.
What came after the Jaguar was the PS1 which for all it's greatness, ushered in corporate development and with it the bleached, repetitive, bland titles which for the most part we're still playing today. - David Wightman

User avatar
a31chris
Jaguar MOD
Posts: 832
Joined: Mon Apr 01, 2013 7:09 am

Re: The Jaguar source code thread

Post by a31chris » Tue Feb 23, 2016 11:26 pm

Random files:

Size.zip-
Written by Mike Fulton and Eric Smith
Last Modified: May11, 1995 (according to Windows timestamp. And that file in question claims it was last modified in Dec 94. lol. So who knows! )
Latest modify written about in the files remarks claims a date of 5/8/95.

This program should take a file name with or without extension
read in the .ABS or .COF and produce a list of equates for mac

I started messing with the SIZE program trying to get it to compile. It needed files I had to hunt for through old Atari files but I got it all together. So here it is the complete directory in full in case anyone is interested.
http://www.jaguar64.eu/download/file.php?id=174

Now it just has errors which look mostly related to old versus new C standards.
Size compile errors scrn.jpg
Size compile errors scrn.jpg (261.83 KiB) Viewed 2094 times
This program has historic value so it would be interesting to see it up and running and doing it's thing regardless.
Truthfully I am not even sure what this program does. Is it some kind of disassembler?

3D studio 3dsconv and POV files.
http://www.jaguar64.eu/download/file.php?id=144
What came after the Jaguar was the PS1 which for all it's greatness, ushered in corporate development and with it the bleached, repetitive, bland titles which for the most part we're still playing today. - David Wightman

User avatar
a31chris
Jaguar MOD
Posts: 832
Joined: Mon Apr 01, 2013 7:09 am

Re: The Jaguar source code thread

Post by a31chris » Thu Mar 10, 2016 2:44 am

Here is a couple personal notes that are interesting.

Also includes an jaguar.h hardware equates file that seems to be as late as it gets.

Code: Select all

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
;	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.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
PERSONAL.zip
What came after the Jaguar was the PS1 which for all it's greatness, ushered in corporate development and with it the bleached, repetitive, bland titles which for the most part we're still playing today. - David Wightman

Locked