This section describes the Lisp functions you'll need to extend and customize Saturn Express to satisfy your specific requirements.
If you're going to doing any development work (e.g., to extend the functionality of the Saturn Express), you'll need to make sure you start N·World properly.
Setting up for Development Work
Starting in Debug Mode
Starting in debug mode gives you access to the interactive LISP listener.
To start N·World in debug mode, use the following commands at a prompt in a UNIX shell window:
where "3-0" is the release version of the current N·World product.unix>nworld-3-0 -debug t
Style Conventions
In the following examples, a pound sign followed by an "x" preceding a value indicates that the value is in hexadecimal format. For example:
is equivalent to decimal 16.#x10
Keyword Arguments
Keyword or "optional" arguments are specified in pairs, using the following syntax:
Such arguments are specified after all required arguments.:name value
Sega Function Definitions OPEN-SEGA-CONNECTION
Establishes a SCSI connection to the Sega Cartdev.
-1
if the connection could not be made.
(sega:open-sega-connection)
0
(sega:close-sega-connection)
For example,
0x00 0x16
performs a system reset.
Argument | Type | Description |
---|---|---|
category
|
value
|
Possible values are described in the MARS/SATURN CartDev SCSI Interface Specification on pp. 3-9.
|
command
|
value
|
0
(sega:control-game #x00 #x16)
0
(sega:get-register)
Argument | Type |
---|---|
register-name
|
value
|
0
(sega:set-register "PC" #x06004000)
set-register
must be enclosed in quotation marks.
DUMP-MEMORY
Dump the memory on the Sega.
Argument | Type | Default |
---|---|---|
command
|
value ("db", "dw", or "dl") "db" = dump byte "dw" = dump word "dl" = dump long
|
"db"
|
address
|
number
|
0
|
count
|
number
|
#x20
|
0
(sega:dump-memory :address #x06004000 :command "db")
:command
must be enclosed in quotation marks.
FILL-MEMORY
Fill an area in Sega Saturn memory with a single value (e.g., to clear a memory area).
Argument | Type |
---|---|
address
|
number
|
data
|
number
|
Argument | Type | Default |
---|---|---|
command
|
value ("fb", "fw", or "fl") "fb" = fill byte "fw" = fill word "fl" = fill long
|
"fb"
|
data
|
number
|
1
|
0
(sega:fill-memory #x06004000 0 :count 20 :command "fb")
:command
must be enclosed in quotation marks.
FILL-MEMORY-BLOCK
Fill a memory block on the Sega Saturn from an array in c-memory (e.g., with an XTIM array).
Argument | Type |
---|---|
address
|
number
|
data
|
c array
|
count
|
number
|
0
(sega:fill-memory-block #x06004000 xtim-array 100)
0
(sega:go-sega)
0
(sega:stop-sega)
Argument | Type |
---|---|
address
|
number
|
count
|
number
|
0
(sega:disassemble-sega :address #x06004000)
Argument | Type | Default |
---|---|---|
pathname
|
pathname
|
"/usr/local/ngc/plugin/sega/satmon.bin"
|
0
(sega:load-monitor)
Argument | Type |
---|---|
pathname
|
pathname
|
address
|
number
|
0
(sega:load-binary "/usr/local/ngc/plugin/sega/satmon.bin" #x06000000)
Argument | Type | Description |
---|---|---|
pathname
|
pathname
|
|
executep
|
boolean
|
This sets the "pc" register to the start position of the COFF file (either t or nil ).
|
0
(sega:load-coff "/usr/local/ngc/plugin/sega/nichimen.cof" nil)
Argument | Type | Description |
---|---|---|
count
|
number
|
The number of interrupts being sent.
|
0
(sega:nmi 5)
would be a pure red.1 00000 00000 11111
Argument | Type |
---|---|
color
|
color
|
(sega:make-sega-color (gi::make-rgb-color 1 0 0))
Sega floats are described in the Sega Saturn Programmer's Tutorial, on p. 1-8.
Argument | Type |
---|---|
number
|
number
|
(sega:make-sega-float 16.5)
Sega angles are described in the Sega Saturn Programmer's Tutorial, on p. 1-8.
Argument | Type |
---|---|
angle
|
number
|
(sega:make-sega-angle 45)
Argument | Type |
---|---|
object
|
A terminal geometry object
|
Argument | Type | Default |
---|---|---|
pathname
|
pathname
|
"/tmp/sega/"
|
(sega:write-geo-object-to-sega-file object)
(sega:start-sega)
Argument | Type |
---|---|
object
|
A terminal geometry object
|
(sega:segafy)
Copyright © 1996, Nichimen Graphics Corporation. All rights reserved.