Check out the Nox Archaist Forum!

Tuesday, April 12, 2016

Creating a Hard Drive Image For Emulator Use

Recently we found a bug where the game would crash when a user would boot to a hard drive before launching the game off of a floppy. We recreated this situation by using an AppleWIN hard drive image that booted to ProDOS Basic and then executing a ProDOS command from there to boot from the floppy drive.

Below are instructions on how to set this up and some challenges we ran into during that process. The instructions assume a basic understanding of the Windows Command Prompt, CiderPress, AppleWIN, and Copy II Plus. I’m happy elaborate on any steps involving use of this software, just ask.

When AppleWIN is setup with a hard drive it will only attempt to boot from the hard drive. In this scenario it is necessary to type a ProDOS command, after the hard drive is booted, if you want the machine to load an image on the floppy drive.  Keep in mind the command prompt is identical for both ProDOS and AppleSoft. The following ProDOS command will attempt a boot from a floppy disk drive in slot 6:

] PR#6

So, we found an interesting chicken-and-egg paradox in this process: booting an unformatted hard disk will result in a crash.

How do we load a utility to format a hard disk for the first time if AppleWIN automatically tries to boot from the hard disk once the hard disk is enabled? Hint: It’s not an AppleWIN setting. 

The answer is found below.

1. Create a 0 byte file using a Windows PC.
  • Launch the command prompt with admin privileges
    • Click Start and type cmd in the search box
    • Press CTRL+Shift+Enter 
    • A command prompt with admin privileges enabled will open 
  • Create a 0 byte file in c:\applwin using the following syntax
    • In Win7 - fsutil file createnew c:\applewin\applehdd.hdv 0
    • Previous versions of Windows can use debug instead of fsutil to create the file

2. Use CiderPress to choose any random Windows file to add to applehdd.hdv
  • This step prevents Windows from deleting the 0 byte file when it is accessed by an application
  • It doesn’t matter what file type is added as all contents of the hard drive will be erased when it is formatted. I chose a text file

3. Enable the Hard Drive in AppleWIN
  • Enter AppleWIN configuration
  • Click on the Disk tab
  • Check the box next to Enable Hard Disk
  • Choose the applehdd.hdv file in c:\applewin
  • AppleWIN will pop up a window saying it needs to restart. Proceed with the restart. 

4. Boot Copy II Plus version 8.2
  • Other versions of Copy II Plus may work. This is just the version I used
    • Note that Copy II Plus 9.1 requires the model in AppleWIN's configuration to be set to enhanced Apple IIe
  • Insert the Copy II Plus 8.2 floppy disk in drive 1
  • Click the boot button in AppleWIN using the Apple icon
  • You should see the Apple monitor prompt (an asterisk with a bunch of hex numbers)
    • This is because once a hard disk is enabled, AppleWIN will try to boot from the hard disk first. Since the hard disk isn’t formatted, the boot process crashes.
  • Boot from the floppy after crashing
    • Type C600G at the Apple monitor prompt. 
      • This will execute the machine instructions stored in ROM for the boot0 process 
      • AppleWIN attempts to boot the floppy disk in drive 1 at this point

5. Format Hard Disk
  • Once Copy II Plus has launched, format the hard disk for ProDOS 
    • Use Format menu option. Pretty much just follow the prompts
    • The hard disk is slot 7, drive 1

6. Copy ProDOS onto Hard Disk
  • If you're copy of ProDOS is stored on a .SHK file you'll need to transfer it to a disk image. If ProDOS is already on a disk image, skip ahead to the "Insert the ProDOS disk image" step below.
    • To transfer ProDOS from a .SHK file to a disk image, start by using CiderPress to extract the file
      • Select Keep Apple II Formats
    • Create a blank disk image with CiderPress
    • Add the extracted file to the disk image
  • Insert the ProDOS disk image into the floppy drive. (I used ProDOS 2.03)
  • Copy the file from the ProDOS disk image in drive 1 to the hard disk

7. Copy ProDOS Basic onto Hard Disk
  • Insert any disk image that contains the ProDOS file BASIC.SYSTEM into floppy drive 1. Copy II Plus 9.1 contains this file and is what I used. 
  • Copy the file BASIC.SYSTEM from drive 1 to the hard disk
  • All done! 
    • Clicking the boot button on AppleWIN should now result in the hard disk booting to the ProDOS basic prompt ]
  • From the ProDOS Basic prompt, launch floppy disks by typing PR#6 
  • Create folders using the Copy II Plus 9.1 menu option Create Subdirectories

Notes:
*All versions of ProDOS after 1.9 required an Enhanced Apple IIe. AppleWIN configuration options can be set to run the emulator in Enhanced Apple IIe mode.


Tuesday, April 5, 2016

New Feature: Fields of Green

kickstarter.noxarchasit.com



Return to Nox Archaist Kickstarter Page


Across the landscape of the world in Nox Archaist both short and tall grass can be found in abundance. Tall grass hides the lower half of mob icons and player icons from view.

The player and mobs think they are pretty clever (the player is probably right). When standing in tall grass they go into stealth mode and stop waving their weapons around.


Tech Talk:


For Review
  • Each tile graphics has a unique ID number. 

New Concepts
  • Each tile is 14 pixels wide x 16 pixels. (in assembly language terminology, 2 screen bytes x 16 lines) 
The tech topic for this post is drawing tiles.

Each tile in the game has it's own shape table which stores the hexadecimal data used by the Apple II hardware to turn on the pixels on the hi-res graphics screen. The shape tables are stored on disk and loaded into auxiliary memory when the game boots. 

There is a subroutine called DRAW.TILE at the core of graphics engine which will draw any shape table at any location on the view screen's tile grid (currently !17 tiles wide X !11 tiles deep). The tile grid location and the shape table to use are passed as parameters.

Since the shape tables are 14x16, as noted above, DRAW.TILE is designed to draw 14x16 shapes. It does this using a loop. Like all loops, it has a stop value that triggers the end of the loop.
How does this relate to tall grass and the lower half of the tile being hidden? 
If the player is standing on a map location with the tile ID for tall grass, a parameter is passed to DRAW.TILE which tells the routine to use a different stop value, thus triggering an end to the loop after only the top half of the shape is drawn.

kickstarter.noxarchasit.com




Friday, April 1, 2016

Horsing Around (New Feature)

kickstarter.noxarchasit.com

I am noticing more and more that game glitches can be a good source of ideas for cool features. As mentioned in earlier posts, by default the player can walk on any terrain and a collision check subroutine is the code that marks certain terrain as blocked.

During collision control testing the horse was unexpectedly able to traverse river tiles. I was about to fix it, and then thought that allowing horses to jump over rivers, well, just makes plain horse sense.


Horses Jump Rivers




kickstarter.noxarchasit.com

Wednesday, March 30, 2016

New Feature: Boats

Navigate rivers and shoreline in your outrigger canoe.


Or take to the seas in your caravel.


Of course, a larger frigate is best for long ocean voyages; unless of course you can take to the skies...


Tech Talk:
  • There are currently four different water tiles, each representing a different water depth. 
  • Each tile graphic has a unique ID number.

  • The player icon is drawn at the center of the screen based on the tile ID number assigned to the player. As a result, the player icon could take the form of any graphic in the game's tile set. 
  • The tile IDs of the terrain (mountain, trees, etc) on the view screen are stored in an an array.
  • Map objects, such as boats, are stored in a separate array. The map objects array contains the tile ID of the object and the map x,y coordinates of the map object.

Boat Mechanics

Yes, Nox Archaist has boat mechanics. We call them shipwrights. And they'll even fix your -

Wait, no, different mechanics. The Foreman just reminded me I am supposed to talk about the technicals of how boats work.

When the graphics are drawn on the view screen, a loop looks through the tile IDs of each tile in the terrain screen array and draws the graphic associated with it.

After the terrain is drawn, another loop looks through the map objects array and if the map x,y coordinates of the object are located in the region of the map in view screen (determined by player map location), then the tile IDs stored in the map objects array is used to draw the appropriate shape on screen.



Pulling it together. (pull it together tight or the boat might sink)

A player is permitted to board a boat if there is a map object of type boat at the x,y map location of the player). When the player boards a boat, the player icon's tile ID is changed to the tile ID of the boat).

As the player moves, the x,y map location of the boat is updated to match the player's x,y map location. Since the terrain and map objects are stored in a separate arrays, once the player (in boat form) moves, the terrain in the previous location reappears on the view screen. This multi-array setup creates some ability to stack tiles.






Monday, March 28, 2016

Why an Apple II game?

It was either this or hack Castle Wolfenstein and turn it into Castle Bovenstein, with cows playing the Nazis and the SS mooing when entering the room…

We decided that was entirely too silly. At least for now. Seriously though, our respects to Silas Warner; he created one of the truly great games of all time.

Now, about this project.

Nox Archaist is in some ways 20+ years in the making. The idea has been in various states of progress since I first completed Ultima III on our Apple II+ in the mid 1980s. After an in depth exploration into the many ways to fail at creating a tile map with a guy moving on it in Applesoft BASIC back in the early 1990s, plans for creating this game spent plenty of time on the back burner.

We feel that there is something inherently special about the classic RPG style which has been lost in modern games. While we enjoy playing modern games, it is a different experience.


After recently playing through some of the best classic Apple II RPGs we were still looking for more of this style of game. Since new game development on this platform is mostly non-existent we decided to lay off the Liebfraumilch for a while, dust off the plans for Operation Archaist that originated way back when, and make the damn thing ourselves.



We will soon post the full story of how the project got started, the challenges along the way, and a few classic blunders. Fortunately none as serious as getting involved in a land war in Asia or going in against a Sicilian when death is on the line. Those were avoided at all costs.


Update: click here for a blog post with more details on how the project got started.