SETTING UP YOUR NET YAROZE

So you've unpacked you brand spanking new Net Yaroze.
And you want to get straight into writing some games, but AUGH!
What's this! Why is it NOT working!!
In this document, my aim is show you how to ready your Net
Yaroze for development.

Any suggestions or criticisms on this document welcome.

James Chow aka jc             2 June 1998
james@chowfam.demon.co.uk
---------------------------------------------------------------


Hardware Setup
--------------
This is fairly straightforward.
Just plug in everything and you're done.
If your serial COM port around the back is 25pin, then you'll
need to buy a connector to change it to 9 pin.

Software Configuration
----------------------
One of the most frustrating problems I had in configuring my
software, was trying to get Windows to find a free IRQ to allocate
to my Net Yaroze (since, I'm using a internal modem).
If this happens, look at the BIOS first, to see if your second
COM port is disabled, or if you can set the BIOS to Plug and Play
configuration. If you have no luck, then all I suggest, is to either
doubling up the IRQs in Windows, or simply disabling some hardware.

Development Software Installation
---------------------------------
Whether you've purchased CodeWarrior or not, installing the
console tools (gcc/siocons) is a good idea. Because most of the code
out there can be compiled in gcc, trying to modify and compile it in
CodeWarrior, may be more difficult than getting gcc and siocons
working.

In the following steps, I will assume that your working drive is c:.

1. Copy "psx" and "gnu" directories from the "Net Yaroze software
   development disc", to your c: drive.
2. Find out which irq and address your Yaroze is attached to.
3. Unmark the read-only attribute on c:\psx\djsetup.bat.
4. Edit the djsetup.bat file.
   If your working drive is not c: then you modify those as
   appropriate.
   The last line should read something like-
   "set DTLH3000=0x3f8,4,9600"
   Change this to reflect your IRQ and address settings.
   "set DTLH3000=addr,irq,9600".
5. In your c:\config.sys file, add the line
   "devicehigh=c:\windows\command\ansi.sys"
   if not present. (Or appropriate, depending your system.)
   You will need to reboot, if this line was not present.

This completes the installation of gcc and siocons.
To test this,

1. Open a DOS box, and set up the environment variables, by
   "c:\psx\djsetup.bat".
2. Go to c:\psx\quick which has two simple test programs.
3. Compile these with gcc - type "make all".
   If you aren't familiar with these tools, the User Guide
   provides a more detailed overview.
4. With your Yaroze switched on, run siocons. There should
   be information, akin to the following -

   siocons -- PlayStation debug system console program
      for DTLH3000 1996/05/10 00:00:03
      type  F1   ----> display help
      when hung up try type  ESC
    I/O addr = 0x02F8, IRQ=3(vect=0x000B,8259=20)
    BAUDRATE = 9600

5. If your Yaroze isn't switched on, you will get a message
   "[DTHL300 not ready!]". But if all is working, then
   following should be seen -

   Connected CIP ver2.0
   Communication baud rate 115200 bps
   OK
   >>

6. To download the test files press F3, and type "batch0"
   (or "batch1"), to invoke the test programs.
   If all is working then
   "batch0" prints a message to your television.
   "batch1" prints a message to siocons.
   Again, if you are unfamiliar with siocons, then the
   User Guide provides a more detailed overview.

CodeWarrior
-----------
One attraction of using CodeWarrior is the management of
your software development, through projects. Projects
to CodeWarrior is what makefiles are to gcc. If you find
editing those makefiles daunting, then CodeWarrior
manages your source files and recompiles as make would
do. The attraction of course is that it has a GUI.
Installation of CodeWarrior is trivial as one would expect.

If you're using Release 2, then there is an update to go to
2.1, fixing some bugs.
CodeWarrior 2.1 Update

PsComUtil
---------
Metrowerks offering to emulate the functionality provided
by siocons. Again there is a GUI, which of course is a
nice attraction. Unfortunately, there are some annoying
characteristics, which will crop up.

1. Failure to return to the "bricks" console screen, after
   your program has exit. Also, the "Driver Status Messages"
   window indicates "The PlayStation has generated a
   Hardware Interruption exception at .....". This is
   normal(!), you can still download subsequent programs
   and so forth.
2. Debug "printf"s tend to be on the slow side, in comparison
   to siocons. This will in turn hold your Yaroze from
   proceeding. If you have a lot of debug printf's, this
   may freeze PsComUtil.

My personal opinion is to avoid using this tool.
If you prefer to have GUI front-end to siocons, then check out
Yaroze Master.

Setting up Yaroze Environment during Boot Up
--------------------------------------------
Obviously, if you tend to be writing software for your Yaroze
regularly, then you'll probably find typing "c:\psx\djsetup.bat"
in every DOS box a bit tedious.

Add this line to your autoexec.bat:
  call c:\psx\djsetup.bat

Increasing the Baud Rate aka Memory Card Not Found
--------------------------------------------------
Most people will find working at 9600bps slow. You probably
have read somewhere that you can go up to 115200bps
depending on your hardware saying that all you need is a
memory card.

I also got caught out by this.

You probably have inserted your memory card into your
Yaroze and switched on to find the message
"Memory Card Not Found".
Well, that is not entirely correct. It probably has found
your memory card, but not a communication file indicating
which baud rate it should use.
Here I will explain how to go 115200bps.

1. Format your memory card, if it you haven't already done so.
   To do this in siocons, place your memory card in Slot 2,
   and type "format bu10:".
2. Now switch your Yaroze into 115200bps baud rate.
   (In siocons, type "baud 115200").
3. Exit siocons by pressing, F10 then F2. Do NOT press Esc.
4. Re-start siocons with the new amended baud rate.
   "siocons -B115200".
5. At this point, you should asked in siocons whether you
   want to save the new baud rate into the memory card.
   Answer y.
6. One final thing that must be done to reflect this setting,
   is to modify the last line in djsetup.bat from
   "set DTLH3000=0x3f8,4,9600"
   to
   "set DTLH3000=0x3f8,4,115200".