CyberpunX Replay Manual v3.99

From ReplayResources
Jump to navigationJump to search

March 2021

Attention please!
Work is still in progress here!

IGNORE - this is for an upcoming release *g*


Intro

This manual is WORK IN PROGRESS FOR 3.99 based on Action Replay MK6 Manual Project64.txt


Thanks

  • DocBacardi
  • Ninja
  • Checky
  • groepaz
  • Danzig
  • Copyfault
  • tlr
  • graham
  • dw
  • many more
  • and all other cart lovers


Startup Menu

Although only F1, F3, F5 and F7 are displayed, there are more options

The screen looks like this:

F1 - CONFIGURE MEMORY
F3 - NORMAL RESET
F5 - UTILITIES
F7 - INSTALL FASTLOAD

The complete key setup is:

F1 - Configure Memory            - Fills RAM with $BD and does a normal reset
F2 - Configure Memory            - Fills RAM with $00 and does a normal reset
F3 - Normal Reset
F4 - Unused
F5 - Utilities
F6 (or '0') - Configure Memory   - Fills RAM with $00 and jumps to fastload
F7 - Install Fastload
F8 (or 'B') - Configure Memory   - Fills RAM with $BD and jumps to fastload
Return - Restart last freeze (broken - FIXME)

Please note, that the keys B and 0(zero) are presets only and can be changed.

NORMAL RESET switches the cartridge off, making it invisible to the system.

CONFIGURE MEMORY fills memory with a single byte value before resetting. This makes the CyberpunX Replay's Backup Compaction System more efficient. You should select this option before loading a program to be backed up.

Utilities for a menu driven approach on several provided functions.

Install Fastload enters the extended BASIC mode of the CyberpunX Replay. Usually a fastloader is enabled here.


During a reset the following keys also have an effect:

  • CTRL
  • Run/Stop - Install Fastload

Making Backups

A Backup is a complete, working copy of any program. CyberpunX Replay makes backups by taking a 'snapshot' of the whole of the computers memory, together with all graphics and timing information, which is then saved in compacted form to disk.


Preparing To Make A Backup

Have a blank disk ready for saving the backup. If a disk is new it needs to be formatted (see #THE UTILITIES MENU). Select CONFIGURE MEMORY from the Startup Menu.


The Backup Process

Load the program you wish to copy. When the program has loaded and is running, it may be frozen at any time by pressing the Freeze Button. Select BACKUP from the Freeze Menu. The border will flash for 10-20 seconds while the compactor is operating, after which the program is ready to save.


Saving To Disk

Backups can be saved to disk in different styles:

1. TURBO    - Single file using the CyberpunX Replay Standard Turbo.
2. STANDARD - Uses the normal kernal routines, or FAST DOS parallel routines if available. Programs over 202 blocks are saved in two parts.

Select the desired option and enter the filename of your choice (up to 15 characters). Press RETURN to start saving. If the drive fails to respond switch it off / on and try again. This is not usually necessary, but may be important if the original was a commercial disk program.

All being well, your backup is now complete. You may now save again with a different style, restart the program, or exit as required. If there is insufficient space on the disk, you will receive the message "DISK FULL". Insert a fresh, formatted disk and try again. On average 3 backups will fit on one disk side.

The Devicechange (F1) was altered here to accept recognized drives (by the internal cart routine) at any device between 8 and 30. This affects the Freeze Menu and the Utilities Menu. If your exotic hardware is not properly recognized and therefore skipped, visit me sometime with that particular device. :)


Loading Your Backups

LOADING FROM THE DIRECTORY WITH FASTLOAD

1. Press F3 or $ (string) to display the Disk Directory (press STOP if a long directory scrolls the screen or CBM or CTRL to slow down scrolling).
2. Move the cursor over the name of the program you wish to load.
3. Press F1 and the program will load and run.


LOADING WITHOUT THE CARTRIDGE PRESENT

If you saved your backup with the TURBO or STANDARD option, you will be able to load your backup in again using standard kernal routines whenever the program is below 202 blocks. Larger backups HAVE to be saved in two parts using the STANDARD save option on the freeze menu to retrieve them on a standard 64.


Trouble Shooting

  • PROGRAM WILL NOT SAVE TO DISK.
    • Try switching the drive off and on before starting to save. If you get "DRIVE NOT READY" it probably means that the disk is unformatted. Format the disk and try again.
    • "DISK FULL" means that there is insufficient free space for the program. Use a fresh disk.
    • Other error messages may indicate a faulty disk.

Switching the drive off/on will re-enable the drive saving in some cases when IRQ or Fast-Loaders kept the serial bus busy.


  • PROGRAM TO BE COPIED WILL NOT LOAD

Switch the computer off and on and select NORMAL RESET from the Startup Menu before loading the program. A few programs will not load if a disk drive is present. Switch the drive off and switch on after freezing the program.


Grahpics Facilities

The Sprite Killer

SPRITE KILLER is a menu option on the freeze menu usually found under . You may disable collisions between two sprites or collisions between sprites and background data or both. When restart the program you will find that when two sprites collide nothing happens. You can then sail through the whole program without losing a life.

Results will vary from program to program. Shapes which appear to be sprites may actually be user defined characters, or the programmer may be using coordinate information rather than the VIC system to detect collisions. In such cases the Sprite Killer will have no effect. In general, the Killer is more effective on older programs.

Note for the interested:

The routine is looking for LDX/LDY/LDA $d01e/$d01f and replaces it by either LDA/LDX/LDY #$00 and NOP. Easy pattern searching.

I haven't found a single AR version having this option completely right. All cart versions I found are looking for both collision types even when looking for just one collision type.


The Char/Sprite Editor (FIXME)

Saveland

Saveland allows you to save Charsets, ScreenRam, ColorRam, Hires Bitmaps and Memory Locations as well as Koala pictures.

Keep in mind these limitations as they are not displayed on the menu:

  • Saving a charset won't work when having a Koala Pic frozen.
  • Attempting to save the character ROM will result in the RAM beneath it being saved. ($1000, $9000)
  • The Color RAM is saved uncleaned. Will clean it in the future and probably add the option to save it packed.
  • Saving memory from $0000 to $ffff will also include the last byte at $ffff.

Further testing on all options is needed.


Printer Dump

This option is gone, only printing in BASIC and stuff still works.

@P* and @P** still work of course (See CENTRONICS PRINTER INTERFACE.) (FIXME)

Text Editor

This allows you to edit a frozen text based screen. You can use all the normal screen editing keys, such as the CURSOR keys, INSERT, DELETE, etc., plus some extra ones:

R/S     exits the Editor
CTRL-I  inserts a line
CTRL-D  deletes a line.
F3      changes the border colour
F5      changes the background colour.
F7      Toggles the Position Display On and Off (NEW!)
Return and Shift-Return act normal now. No more screen scrolling on them as well.

You can change the text colour in the normal way - hold down the CTRL or CBM key and press keys 1-8. Press RETURN to exit.

The editor works with text based screens only - you cannot get useful results on a bitmapped screen. Also, if the frozen program uses a different character set, the display characters may not correspond with those printed on the keyboard, so a little experimentation may be necessary - try pressing SHIFT and CBM together to change characters.

The screen editor can be used to insert your own messages on the game title screens. It is also a useful programming aid, because the cursor column and row, and the screen address are displayed which helps in designing screen layouts.

People complained about the display and/or textscreen having the wrong address, but I cannot find the reason, if that really happens. The current textscreen address is calculated from the VIC and should be fine.

Text searching is more easily achieved via the monitor. Enter the monitor and type I (RETURN). This displays memory in the form of screen codes. You can scan through the whole of the memory looking for text strings - to change any text simply type over it and RETURN. Make sure you don't type over non-text areas.

You can also display ASCII codes by typing J (RETURN). Type X to leave the monitor. Refer to MACHINE CODE MONITOR for more details.


Pokes & Parameters

How to Enter

Computer magazines used to publish Pokes which can be entered into programs to add features such as infinite lives to game programs. These usually required the machine to be reset.

To reset the machine press the RESET button and select NORMAL RESET from the startup Menu.

In addition, the cartridge allows you to enter pokes after a program has been frozen. Select POKES, enter the required poke or pokes (one at a time), and press RUN/STOP or just RETURN. The program can then be restarted using F3.

It is possible to enter decimal and hexadecimal notations in mixed order here. You need to enter a leading string ($) for the hexadecimal numbers, of course.

Examples:

 POKE $f,255
 POKE 1024,$4e
 POKE $fce,$ea 
 POKE 1,0

Pokefinder is offering an excessive list of pokes for various games.

POKEFINDER

This is an automatic infinite lives finder for games. Until now finding pokes was a difficult long-winded procedure requiring specialized knowledge. Using Pokefinder, you can generate that elusive poke, even if you don't understand a word of machine code!

Just follow this procedure:
1) Load up and run your game. When play starts note how many lives you
   begin with and press the Freeze Button.

2) Select POKEFINDER. You will be asked 'HOW MANY LIVES NOW?' - enter the
   number of lives you started with. Pokefinder will now analyze the memory and
   display a list of possible pokes. Usually there will be many of these, so you
   will be prompted to 'LOSE A LIFE AND REFREEZE'.

3) Restart the game and continue to play until you lose a life. Make sure that
   you lose ONE LIFE ONLY. Wait for any "death sequence" to complete. When play
   resumes, press the Freeze Button.

4) Select POKEFINDER again. You will get one of three messages:

   a) LOSE A LIFE AND REFREEZE - go back to 3 above.
   b) ABORTED - Pokefinder has failed.
   c) INSTALLED - the poke (or pokes) have been found and entered into the program.
      Write down the displayed poke(s) for future use. If Pokefinder fails it may
      be because the programmer used an unusual method of counting the number of
      lives remaining. However it can be that you got the starting number of lives
      wrong or accidentally lost more than one life between passes - so its worth
      going through the procedure again in case you made a mistake the first time.
      Tests show a success rate of over 80% - very high for this type of program.
      Some multiload programs need a different poke for each level in which case
      you should repeat the above procedure after each Load.


If the border starts to flash while searching for codes, there is a buffer overflow.

Searching for screencodes was added which should increase possibilities of finding valid codes just a little.

Additionally values between 1 and 255 work now, so there's an even higher chance to find timetrainers and the like. Previous AR carts only used the very last digit entered at the prompt as a search value.

If the usual search fails, the experienced poke hunter searches for the last digit on lives/timer/energy. Another reason for not finding a valid code may be hex/dec flag usage. In this case letting the game value drop below ten and retry from there on may lead to a final success.

Parameters

The parameter option allows you to load enhancement programs from disk, which can fulfill actions the normal CyberpunX Replay software is not able to.

The options to load from tape using "T." as prefix and loading original parameter files to backup protected games have been removed. We do not endorse the pirating of commercial software and neither should you!

The only parameters currently accepted have to start with "E." as a prefix.

You can find additional information on programming your own extension in the coding appendix. Don't worry, I am planning on extending this menu sometime in the future, so it will become more useful again. :)


Utilities Menu

The Utilities Menu is accessed from the Startup Menu. Some of the utilities can also be called from Fastload (see FASTLOAD UTILITIES).

The Devicechange (F1) was altered here to accept recognized drives (by the internal cart routine) at any device between 8 and 30. This affects the Freeze Menu and the Utilities Menu. If your exotic hardware is not properly recognized and therefore skipped, visit me sometime with that particular device. :)


Formatting A Disk

When a disk is new it needs to be formatted before if can store any programs. When you select this option you will be asked to enter the disk NAME, which can be any name up to 16 characters in length, and the ID number which can be any two characters. Press RETURN and the disk will be formatted at high speed.

The directory of the disk will be displayed. Occasionally, fast formats do not "take" first time. If the directory does not show 664 BLOCKS FREE, try again and everything should be OK. If a disk consistently fails to format, a faulty disk is indicated.

NOTE: Formatting a disk destroys any previous information which may have been on the disk. Be certain that you have the correct disk inserted before selecting this option.


Disk Filecopier (FIXME)

The Filecopier will handle Program, Sequential and User files up to 247 blocks in length. The utility can be used with one or two drives. The MULTI OUTPUT option allows several copies to be taken from each pass.

When you have selected your options, press SPACE and each file in the directory will be displayed in turn. Press Y if you want to copy that file, otherwise press N and if will be ignored. Any file which cannot be handled (e.g. Relative Files), will be skipped. Press S to start copying, else copying will begin when you reach the end of the directory.

At the end of the directory, the selected files will be loaded. Several passes may be necessary, depending on the length and number of files selected. You will be prompted to swap disks when necessary. The SOURCE DISK is the disk which is being loaded FROM and the TARGET DISK is the disk which is being saved TO. The Target Disk(s) should be formatted in advance.

NOTE: The Filecopier cannot copy the Action Replay Loader and is not available currently :(.


Whole Disk Copier

The Disk Copier is for the 1541 (and compatibles) only. You can use the copier with one or two 1541 drives. With a single drive you will be prompted to insert the Source and Destination Disks in turn.

BAM COPY - If selected, only the occupied tracks will be copied. This can save a lot of time when copying partially filled disks.

IGNORE ERRORS - if selected, the written data will not be checked. Otherwise, the written data will be verified against memory - this takes longer but gives greater security for important data.

NOTE: If you have any difficulty in using the disk copier with the 1570 or 1571 drives, enter the following disk command: @U0>M0 <RETURN> This forces the drive into 1541 mode.

NOTE: Any deleted Warp files on the disk may cause spurious error reports. Also, it is possible that valid Warp files will also cause errors.


Fastload Utilities

FASTLOAD is the turbo and utilities function of CyberpunX Replay. Operating in the BASIC environment, numerous extra commands and facilities are available. To install, select INSTALL FASTLOAD from the Startup Menu, or hold down the CBM key when you power up or press the Reset Button.


Ramloader

RAMLOADER is a Disk Turbo - but a very special one. Special because it is fast - very fast! It uses standard GCR format, so it works with all your existing programs without special conversion. RAMLOADER will load a 202 block program in around 9 seconds, where the typical Disk Turbo would take between 20-30 seconds, and can not load files of any length. It is fully independent of computer memory. It works with all drives from the 1541 upwards (including the 1581 and the 1571 in two-sided mode).

The Disk Turbo can be switched out with the command OFF. Load and Save will then operate using the standard Kernal calls. Type ON to re-enable the Turbo.

The RAMLOADER can be switched off and on with the commands @K- and @K+. This reduces loading speed to Freeze Turbo but doesn't blank the screen during load. (and won't kill already loaded Parameter Extensions in Replay RAM)

Ninja/The Dreams reported functionality of the Ramloader on FD drives as well. Also CMD HD devices shouldn't cause major trouble, since I used one 6 years ago with the cart. The saver doesn't work for FD drives, though. Will try to fix that sometime soon.

NOTE: Some commercial programs may override the Disk Turbo.


WARP*25 Disk Turbo

WARP*25 was removed completely to gain space on the ROM.

It was 1541 compatible only anyways and had load, save and scratch routines which ate quite a lot of memory. The program WARP 25 from Datel will still allow you to create and load warp-saved files with some work overhead.

Turbolinker

When you load and run a commercial program with Fastload, you will often find that the cartridge Turbo System is disabled for any subsequent Load/Save operations. This can be remedied by the TURBOLINKER.

Select TURBOLINKER from the menu and select the device to be linked. Then restart the program.

Loads and Saves will now be redirected to that device. Note that if the program incorporates it's own Turbo system, or does not use the Kernal Load/Save commands, then the TURBOLINKER will not work.

Basically the load/save vectors are set to the cartridge routines and therefore allow programs to use the cartridge even after $FD15 was called and the kernel defaults are set.

Single Stroke Commands

A number of single stroke commands are available from Fastload:

1) FUNCTION KEYS

F1 LOAD the first file on the disk to it's absolute address. (LOAD "0:*",8,1)
F2 LOAD the first file on the disk to the Basic program area. (LOAD "0:*",8)
F3 Display disk directory without corrupting memory
F4 Toggle available drives.
F5 LIST
F6 Freeze Menu
F7 RUN
F8 MON See here

There have been some complains about this F-key setup, but this is the original Action Replay V5 setup.

Note: For drive toggle, the Jiffydos routine will be used if available (Tested with JD 6.01), else my own routine will search for the next available drive on the bus. Tested in monitor and freezemode. Be careful on a busy drive chain when IRQ loaders and the like keep the serial bus for themselves. JiffyDOS supplies drive checking up to drive #30, and so do I. (RamLink is said to use Device 16. When JD is smashed into Kernal by RL, it should be reached by the JD routine then. Bug reports welcome.)


2) EASY LOAD/SAVE COMMANDS

/PROGNAME equals to LOAD "PROGNAME",8,1
^PROGNAME equals to LOAD "PROGNAME",8 & RUN (Arrow Up)
%PROGNAME equals to LOAD "PROGNAME",8,1 & RUN
&PROGNAME equivalent to VERIFY "PROGNAME",8,1
{POUND_SIGN}PROGNAME equals to SAVE "PROGNAME",8

Loading with these commands will only set the BASIC end pointers if the program loads to the start of Basic ($0801). Also, the Filename does not corrupt the Basic String area ($9FF0-$9FFF usually). Very long files can be saved with the {POUND_SIGN} command where the normal save command would give an ?OUT OF MEMORY ERROR.

LOADING FROM THE DIRECTORY

If you display the directory and then move the cursor onto a line containing an entry, you can load that program simply by pressing F1 to load and run or F2 to load without running. This is the most convenient way of loading a program.

3) EASY ACCESS TO THE ERROR CHANNEL.

Instead of using OPEN 15,8,15 "COMMANDSTRING":CLOSE 15, you may use the "@" key to send disk commands and read the error channel:


@          - reads the error channel of the current device.
@(device)  - Switches to (device) and displays the status.
@#(device) - Stupidly writes (device) to 186/$ba witout status message. (This
             option is used by the F4 toggle, but the F4 device toggle
             previously scans the devices from current up to #30 to ensure a 
             drive is present at the selected address.)
@I         - initialize the drive
@V         - validate (cannot be used on Warp*25 disks)
@R:NEW=OLD - rename a file.
@N:NAME    - clear the directory of a previously used disk.
@N:NAME,ID - format a new disk.
@$ or $    - display directory.
@S:NAME    - scratch (delete) a program from the disk.
@H:NAME,ID - a new command not available in the normal DOS. This changes the 
             name and ID of the disk without clearing the directory.
             Initialize was added here to re-read the drive buffer,
             so the next hit on F3 will really show you a new header on the dir.

NOTE:        @s:name1,name2,name3,names*   works to scratch several files at once.


@K- and @K+ control the fastload-mode (as already explained at #Ramloader). While @K+ gives you the normal fastload speed, @K- will switch to the slower speeder used by the freezer. The advantages of @K- are simple:

a) The Replay RAM is kept so previously loaded extensions stay in RAM (Carts >8kb RAM should be able to avoid this).

b) Programs can sometimes be loaded from bad disks using this mode.

c) PAL/NTSC compatibility.


@=8 and @=9 will change the current device to the given device number.

This is a sort of drive toggle, like some old copy programs provide it. Use the logical turn-off/on drive sequence to avoid device number collisions. This command is and will stay limited to drive 8 and 9, but SHOULD be able to change e.g. device 11 to 9. This command should work fine with 1541 and 1581 drives, as the required Zeropage adresses on the drive memory are used the same way. I am not sure about FD drives, as I found no documentation about them so far.

Hints:

If you use a two drive system, the second drive can be accessed by reading its error channel, e.g. @9. Subsequent single stroke commands will be directed to device 9. If a filename contains leading or trailing spaces, it should be enclosed in quotes, e.g. " PROGNAME".

And you may also use: @(device)(command) to change to the device and immediately execute the command (e.g. @8$ or @9n:test,id).

Consult your disk drive manual for further information about the error channel.


ARE YOU SURE? has been removed - so be careful again on scratch and format.


Splashscreen

A funky name for a (hopefully) useful function.

2) CBM-key along with an F-Key!

Using CBM and F1 or CBM and F3 allows you to switch between different copies of the normal screen area ($0400-$0800). Our main intention was to save some output of e.g. the monitor to another screen to not always have to re-search the memory or keep adresses in mind for examining routines. You may find different usages for this option though. :) These areas are kept untouched (as far as possible) and serve you with a reset-proof ramdisk even.

32kb ROMs only have CBM and F1 and the saved screen can be destroyed by the freeze mode sometimes. This is due to less available RAM on old AR cartridges. 64kb ROMs will use the 32kb RAM available and shouldn't cause problems here.


CBM & F7 will be used in the future to enter the SilverSurfer mode during monitor or basic mode. Menumodes on PowerUp and Freezer will support automatic detection of SilverSurfer initiated commands.

Play a little with it. Hope you like it.


Toolkit Commands

A number of extra basic commands are provided, which operate in direct mode. The commands may be abbreviated by typing just the first three characters.

MONITOR or MON will start the machine code monitor.

OLD will recover a basic program which has just been NEWed.

DELETE or DEL will delete a block of program lines. Syntax is like LIST except that the first line to be deleted must be specified e.g. DEL 1000-2000 will delete lines 1000 to 2000 inclusive. DEL 1000- will delete from line 1000 to the end of the program.

LINESAVE or LIN will save to disk a section of a basic program e.g.: LIN "PROGNAME",8,1000-2000 will save program lines from 1000 to 2000 inclusive. Lines saved in this way may be loaded back as separate basic programs, or MERGED into other programs.


MERGE or MER loads a basic program from disk and combines it with a program in memory if two lines have the same number, the new line replaces the existing line. A program may also be merged with new line numbers e.g.: MERGE "PROGNAME",8 merges a program with the program in memory. MERGE "PROGNAME",8,1000,10 will renumber the lines before they are merged, starting with line 1000 and incrementing in steps of 10 GOTO & GOSUB statements will NOT be renumbered. Merging into a long program is a lengthy process, so be patient.

APPEND or APP differs from MERGE in that the new program is tagged onto the end of the previous one. It also occurs at turbo speed, e.g.: APP "PROGNAME",8 loads the program starting at the end of the previous one. For Append to be useful, the program to be appended should have line numbers greater than the existing program.


AUTO or AUT provides automatic line numbering as you type in a program, e.g.: AUTO 1000,10 starts automatic line numbering at line 1000 and increments in steps of 10. To turn AUTO off, press RETURN against a blank line. If you subsequently want to continue automatic numbering type AUTO on its own and numbering will continue from the last line number which was automatically displayed.

FIND or FIN will perform a search on the basic program currently in ram and when a line contains matches to the given string, it'll be returned as result.

Examples:   FIND REM
            FIND 20
            FIND POKE53282
            FIND LIVES

Exceptions apply like this: the given string will be tokenized and whenever it contains a basic keyword, that will be converted as well. So you will probably not find the string "MONKEY" since it has ON in it. Putting the string into quotes won't help either, since they will be searched for as well. Also note that FIND needs a SPACE right after the command.

BOOT will load a machine code file and jump to the first address loaded. E.G. You have a program which you would normally load with LOAD "PROGNAME",8,1 followed by a SYS number. BOOT will perform the same function . NOTE that BOOT will only work when the program is started by SYSing to the first address loaded. Syntax: BOOT "PROGNAME",8.

PLIST will list any basic program directly from disk to a CBM printer (device 4), without overwriting the program in memory. Syntax: PLIST "PROGNAME",8 . This command can also be used to print the directory PLIST"$",8 . PLIST won't work with machine code and sequential files.

SLIST is the same as PLIST except that output is to the screen.

OFF & ON - used to switch the disk turbo routines off and on.

COPY or COP will start the Disk Filecopier.

BACKUP or BAC will start the Whole Disk Backup

ZAP will reset the computer and disable the RR, just like Reset + CTRL Key. Locations $0000-$07ff will be corrupted but $0800 - $0803 is restored to enable running of machine language programs with a SYS header. Basic programs won't have the pointers set correctly, so it may be necessary to re-load after the ZAP command. (or using normal reset?)

RENUM or REN (64 kb only)

This command will renumber your basic program currently in memory. It takes two parameters separated by a comma. These are the starting line number and the step size in which the line numbers are to be incremented.

Example: RENUM 1000,1


TASS or TAS (64 kb only) This command simply copies a version of Turbo Assembler into ram from $9000-$cf00. A non-ram using version will be implemented soon. Checky is working on this.

BASIC EXTENSION Hex ($), binary (%) and octal (&) numbers can also be included in basic expressions, e.g. SYS 49152 could be entered as SYS $C000.


Centronics Printer Interface

CyberpunX Replay can drive a Centronics printer connected to the parallel port. If a parallel device is connected and active, any output to the printer (device 4) will automatically be sent to the parallel port. Note that you need a suitable connecting cable before you can use a parallel printer. The interface will normally perform any necessary character translation, including most graphic characters, but you can also send untranslated characters or escape codes e.g. to change style and formatting.

To print a Basic program enter:

OPEN 4,4:CMD4:LIST

When printing is complete enter

PRINT#4:CLOSE 4

To send special printer codes and untranslated characters you need to open a special channel (secondary channel 9). Here is an example:

10 OPEN 4,4   : REM OPEN A NORMAL CHANNEL TO THE PRINTER
20 OPEN 9,4,9 : REM OPEN A COMMAND CHANNEL
30 PRINT#9,CHR$(27)+CHR$(87)+CHR$(1);: REM EXPANDED PRINT ON
40 PRINT#4,"THE QUICK BROWN FOX"
50 PRINT#9,CHR$(27)+CHR$(87)+CHR$(0);: REM EXPANDED PRINT OFF
60 PRINT#4,"THE QUICK BROWN FOX"
70 CLOSE 4:CLOSE 9: REM CLOSE PRINTER CHANNELS

This short example should print "THE QUICK BROWN FOX" in double width characters and again in normal size characters. Note the semicolon (;) at the end of the command string - this prevents a carriage return from being sent at the end of the command string. Refer to your printer manual for details of other special commands. Most, but not all commands begin with the escape character CHR$(27). The interface prints according to the screen mode - you switch between "Business" and "Graphics" modes by pressing SHIFT & CBM together.

If you find that everything gets printed on the same line, you need to set a special DIP Switch on your printer to make the paper move down at the end of each line (a Linefeed). Again, refer to your printer manual. If your printer cannot do this, you can send a special command to CyberpunX Replay which forces a linefeed with each carriage return:

@PLF - causes a linefeed to be sent with every carriage return.

You can also print characters direction with @P, e.g.

@P"THE QUICK BROWN FOX"

@P 27,87,1 "THE QUICK BROWN FOX" 27,87,0 "THE QUICK BROWN FOX"


The second example does the same as the Basic program listed above. Note how you can mix command sequences and strings on the same line.

The @P command works in Direct mode, or in the Machine Code Monitor, but not from within a program.

@P* - dumps the entire text content of the screen.

@P** - works in the Freeze Monitor, it dumps the frozen screen.

Hope all of these printer commands still work. Someone test and let me know!


Machine Code Monitor

CyberpunX Replay includes a powerful extended Machine Code Monitor. To call the Monitor from Fastload, enter MON or press F8. The Monitor is also available from the Freeze Menu. In this mode all of the memory including the screen, stack and zero page may be examined in its condition at the point at which the program was frozen.

All 64K of memory remains unaffected by the Freeze Monitor. Any alterations made will be incorporated into the program when it is restarted or saved. A working knowledge of 6502 assembly language and Hex notation is required by the user, if the Monitor is to be used effectively. Some of the Monitor instructions can cause the system to crash if the user is not fully aware of what is going on.


Command Summary

A      - Assemble.
B      - Execute a Basic command.
C      - Compare memory.
D      - Disassemble.
F      - Fill memory.
G      - Go. Execute program as per register display.
H      - Hunt for byte/text-sequence.
IO     - Displays I/O registers (freeze mode only).
I      - Interpret memory as CBM codes. Acts as I* now.
I*     - Interpret memory as CBM codes. As usual.
J      - Interpret memory as ASCII codes. Former I function.
L      - Load.
M      - Display memory in Hex.
N      - Number conversion.
P      - (prefix).  Direct output to the printer (device 4).
R      - Display registers at entry or freeze time.
S      - Save.
T      - Transfer memory.
U      - User function.
V      - Verify.
W      - Watch Freeze/BreakPoints.
X      - Exit to Basic or Freeze Menu.
*      - Toggle RAM/ROM modes.
@      - Read error channel or send disk command.
@(dev) - Changes device and display status.
@#(dev)- Only changes device.
$      - Display directory.

Special disk related commands only available in MON:

@*8    - Access drive memory (device 8).
@*9    - Access drive memory (device 9).
@*     - Return access to computer memory.
@ME    - Execute memory in disk drive.
@BR    - Read a disk sector into computer memory.
@BW    - Write a sector from computer memory to disk.

Note: Whenever using one of the commands to edit memory locations, just go over the line, edit as needed and hit

  • RETURN to accept the changes.
  • CBM+Return accept the changes, keep you in editmode and present the next editable line to you.
  • SHIFT+RETURN leaves editmode without accepting changes.

Command Description

Important Notes:

When an end address is specified it should be exclusive. The end address is one Byte greater than the last address to be operated on e.g.:

.S"PROGNAME",8,C000,D000 saves up to but not including D000.

Usually all numbers you enter after a command are interpreted as hex. (An exception is drive numbers which are always decimal). You can also force the commands to deal with decimal numbers by using a leading plus (+) sign. You will need to enter the numbers in high/low order and only 0-255 are accepted.

Examples:  M +0+186    - start hexdump at $00ba
           I +32+0     - start asciidump at $2000

A trailing hyphen (-) will scroll the output until you abort it with run/stop or start controlling it using the F-keys.

Examples:  M 1000 -    - hexdump from $1000 to xxx
           I 3000 -    - asciidump from $3000 to xxx

1) EXAMINING MEMORY.

Memory may be examined in Hex/ASCII, Disassembly, or Interpreted as ASCII or screen codes:


.D C000 D000 - disassemble from $C000 to $D000.
.M C000 D000 - display memory from $C000 to $D000.
.I C000 D000 - interpret Screen Codes from $C000 to $D000.
.D C000      - disassemble one instruction at $C000.
.M C000-     - display memory from $C000 onwards.
.D           - disassemble from the current address onwards.
.I           - interpret Screen Codes from the current address.
.I*          - interpret Screen Codes from the current address.
.J           - interpret ASCII from the current address.

The J acts as former plain I now and displays memory in ASCII format.

The display can be controlled in two ways:

a) Function keys F5 and F7 cause continual scrolling up or down respectively. Set for fast scanning through memory. Any other key will stop or start the display. F5 and F7 change the direction of the scroll. STOP or CURSOR DOWN returns to the input prompt.

b) Cursor Up and Cursor Down will scroll the display by one line at the top or bottom of the screen and return to input prompt. Best for editing. Memory may be altered - type over any byte, code or mnemonic and press RETURN. A question mark indicates an error.


2) BANK SWITCHING.

On entry, the Monitor is in RAM mode - all systems ROM's are switched out during memory access. To access the ROM's and I/O devices, use the * command, which toggles between the two modes.

In normal Monitor mode this also enables the cart ROM mirroring. I* 8000 will show you a dump of that area. (Usually bank 1 as that's where the monitor and toolkit routines mainly work.)

In FREEZE monitor mode this command also enables mirroring of $0000 to $09ff of the Cartridge RAM (!). (Written in this etext originally A good hint as well is(In Freeze Mode ofcoz):

*                       ; Switch Ram-Rom ON
@BR (track)(sector) 09  ; Loads a block from disk into the RR RAM.
@BW (track)(sector) 09  ; Saves the modded block, but this way none of the normal RAM gets
                          corrupted, and flawlessly restarting the frozen program is possible.


3) ASSEMBLY.

.A C000 LDA #$01

Assemble an instruction in standard 6502 mnemonics at $C000. The next memory address will be displayed ready for the next instruction.


Before you had to enter the $ all the time to assemble properly. Now the monitor assumes Hex all the time.

 LDA 01     will turn into LDA $01
 LDA 1000,X will turn into LDA $1000,X
 LDA (FE),Y will turn into LDA ($FE),Y
 etc...


4) REGISTER DISPLAY.

.R

The program counter, A, X & Y registers, location $01 and the stack pointer are displayed in Hex. The Status register is displayed in Binary. Alter registers by typing over the relevant byte or flag (and hit return on that line).


5) FILL MEMORY

.F C000 D000 AA

Fill memory from $C000 to $D000 with the byte $AA.

Now supports pattern fill as well.

 .F C000 D000 "foobar!!!"
 .F C000 D000 ee 20 d0


6) HUNT MEMORY

.H C000 D000 01 02 03
.H C000 D000 "STRING"
.H C000 D000 8D 2? d0
.H C000 D000 20 ?? 10

Hunt through memory for a sequence of bytes or an ASCII string. If any occurrence is detected, the address will be displayed.

Wildcard hunt added. Hunt is using a certain priority to search memory. Wildcard hunt as well as ordinary pattern hunt are only performed when no stacking is done. In this example, only the string search will be performed:

  H C000 D000 01 02 03 "TEST"

In general, command stacking only works on a few locations, so it's a good idea to avoid it. Only on the disk command Scratch, filename stacking is a good idea sometimes.


7) COMPARE

.C C000 D000 E000

Compare the area of memory from $C000 to $D000 with memory starting at $E000. If there is any discrepancy, the memory locations will be displayed together with the bytes at those locations.

This has optimized and colored output now.


8) TRANSFER MEMORY

.T C000 D000 E000

Move memory starting at $C000 and ending at $D000 memory starting at $E000. This is an intelligent transfer - memory areas may overlap and may be moved either up or down in memory.


9) GO

.G C000

Load registers as per the register display and start executing the machine code program starting at $C000. The program may end with either a BRK or an RTS instruction.


10) NUMBER CONVERSION

.N $C000
.N 49152
.N %10101010
.N $C000+$FF
.N $FF-1+$4000
.N $FF00/(2 * $AA)

Displays the result of an expression in HEX, DECIMAL and BINARY. If the expression is a single byte value, a PETASCII character is displayed.


11) OUTPUT TO PRINTER

.PM C000 D000
.PH C000 D000 "STRING"

P is used as a prefix to another command. Memory display will be directed to the printer (device 4). Hold STOP to quit.


12) EXECUTE A BASIC COMMAND

.BPRINT 8*256
.BPRINT "TEST"
.BPLIST             ''DOES THIS WORK ? I have no printer :)''


13) EXECUTE A USER FUNCTION Using this function, you can change a memory area to your own needs. The syntax is:

U <start> <end> <list_of_opcodes>

Basically, the list of opcodes is a small subroutine which will be accessed for every byte in that memory area. The original byte comes in the accumulator and the modified value has also to be in the accu. You don't have to specify an RTS or something.

So, this routine will invert the memory from $1000 to $1fff (49 FF = EOR #$FF):

U 1000 2000 49 FF

This routine will shift the high-nybbles into the low-nybbles (4A = LSR A):

U 1000 2000 4A 4A 4A 4A

Before each call of the subroutine, the carry-flag is cleared. The X-Register will be set to 0 before the very first call and can then be used freely.

Y-register must be 0 on exit, better don't touch it!


Using the X-Register you can easily watch a charset, for example (8A E8 = TXA; INX):

U 0400 0500 8A E8


As you can see, this is a powerful option giving you a lot of possibilities. But really think twice before pressing enter, a wrong opcode might lead to a serious crash and/or loss of data, of course!


Ninja added this nice function on very early 3.8 ROMs already - blame Count for the late documentation!


14) LOAD, SAVE & VERIFY (FIXME)

.L"PROGNAME"
.L"PROGNAME",8,C000
.S"PROGNAME",8,C000,D000
.S"PROGNAME",8,C000,D000,E000
.V"PROGNAME"

Load, Save, Verify. If a load address is specified, the program will be loaded to that location, otherwise it will be loaded to the address from which it was saved. Save requires a start and end address, which should be one byte after the last address to be saved. If an additional address is added to the save addresses, this will be saved as the reload address of the program (disk only). All disk I/O uses RAM locations.

NOTE: You cannot load and save memory below $0800 if the Monitor was entered from the Freeze Menu.

It is possible to save that area using the Memory Saver in freezer's Saveland now. Remember that the ending address is exclusive. You may save address $FFFF by using $0000 as the ending address. (I prefer to set IRQ's manually.)

.S"NAME",8,0800,0000

NOTE: Tape accesses are avoided by the monitor now.


15) I/O REGISTERS

.IO

Displays the I/O registers $DC00-$DC0F,$DD00-$DD0F & $D000-$D02E. Any alternations will be incorporated on Restart or Backup. This command only works if the Monitor was called from the Freeze Menu.


16) WATCH FREEZE/BREAK-POINTS

.W

Displays the memory locations of the Freeze- and Break-Points and only works in freeze mode monitor. Freezepoints are displayed in white color, Breakpoints in gray color. Disassembling freezepoints will show you the obligatory JSR $Dxxx. Having it set using the SF command and restarting will restart at the location where the $Dxxx was hit. When setting it manually in a program with the assemble command the next command will be executed after restart.

Hope this is somewhat clear, at least to the pros.

Disk Monitor Functions

In monitor mode all the usual disk command options work as normal. This includes device changing using @(device) and @#(device). Output for the error channel using @ was changed a little to save display space. The monitor mode also has some additional functions, described below.

Access drive memory

Syntax: @* (read device) (write device)

Device 0 indicates that the "device" is computer RAM. If no write device is specified, the write device will be set to the read device number. If no parameters are specified, then the monitor reverts to its default (read and write to computer RAM).

Examples:
  @*8   Read and write to device 8.
  @*89  Read from device 8, write to device 9.
  @*80  Read from device 8, write to computer RAM.
  @*08  Read from computer RAM, write to device 8.
  @*    Return to default.

All the Monitor's memory access commands can be used with drive memory. Memory can be transferred between devices by setting up the required parameters before using the T command.

As this is a real hardcore hack option, I decided to not mess with the line parsing AGAIN and limit this to devices 8 and 9. Devices 10-30 are not possible here.

Other Disk Commands

@ME (address) - executes a program in drive memory.
@BR (TRACK) (SECTOR) (MEMORY PAGE).
@BW (TRACK) (SECTOR) (MEMORY PAGE).

These are block read and write commands. If no memory page is specified, then page $CF (=$CF00) will be used.

@BR 12 01 40  - Read track 18, sector 1 to page $4000.
@BW 11 00 40  - Write page $40 to track 17, sector 0.
@BR +18,+1,40 - same as the first example.

You can specify decimal notation for the track and sector numbers by prefixing with the + character.
Separate the parameters with a comma when using decimals.


Take care when writing a disk block - if you accidentally specify the wrong parameters, you cand easily trash the disk!

These routines should work fine on devices 8-30.


Freeze & Break Points

Please read Appendix C aswell about different cartridge RAM configurations.

From the Freeze Monitor, you can set explicit Freeze and Break points in a program. Up to five Freeze or Break points can be set, which are cleared when program control passes to the Monitor. Following are the Freeze and Break instructions:


SF - Set Freeze Point
SZ - Set Break Point
RF - Remove Freeze Point (formerly CF)
RZ - Remove Break Point (formerly CB)

To set a Freeze or Break point, disassemble the required part of the program, and type the command at the address at which the program should be interrupted.

.> C000 A9 41    LDA #$41
.> C002 20 D2 FF JSR $FFD2
.> C005 60       RTS

.> C002 SF D2 FF JSR $FFD2 >RETURN<   ;Modify location $C002
.> C002 20 D3 DF JSR $DFD3            ;Freeze Point is set

Control will pass to the Freeze Monitor at address $C002 and the original instruction (JSR $FFD2) is restored.

You can explicitly clear a Freeze or Break point by typing RF or RZ at the address.

A Break point may also be referred to as a Zero Point. The use of CF, CB, and SB interfered with the opcodes CLI, CLV, CLD, CLC, and SBC, and were changed therefore.


Freeze and Break points act exactly as if you had pressed the freeze button, but you can precisely control the point at which the program is frozen. Breaks pass through the IRQ vector at $FFFE and the break vector at $0316, so they are not suitable for programs which modify these vectors.

Freeze points don't use these vectors, so they are particularly useful for programs (e.g. most games) which switch out the kernal ROM. However, because they use three bytes of code, you need to be careful not to place a Freeze at a point where program control may hit the second or third bytes of the freeze instruction, or you will crash the machine. The I/O ROM ($D000) must also be switched in.

Freeze points can be set only from the Freeze Monitor. You can directly place a freeze instruction (JSR $DFD3) using either the Monitor (in which case it will act as a subroutine, calling the Freeze Monitor and returning to the next instruction), or you can call the freezer from a Basic program with SYS 57299. On restart, the program will continue.

( Warning ! On REU-compatible RR-ROMs, the mentioned adress changes ! What to use exactly, please see from setting a freezepoint with the SF command in freeze-monitor.)


Remember - if you find that a program will not load when the cartridge is plugged in - switch the computer off and on, and select NORMAL RESET instead of configuring the memory, before loading the program.

As an expert I gotta say: Remember - Always clear your ram, but that would differ from the last sentence, hm? :)


Miscellaneous Tips

Here are some under-documented functions and things to know.


1571 Drive Notes

Switch to double sided mode with the following.

  @U0>M1   or   OPEN 15,8,15,"U0>M1":CLOSE 15

In this mode, both sides of the disk are used, giving twice the storage space when the disk is formatted. To switch to single sided (1541) mode:

  @U0>M0   or   OPEN 15,8,15,"U0>M0":CLOSE 15

The drive powers up in 1541 mode when connected to a 64, so enter the command mentioned before if you wish to use double sided mode.

NOTE: Side two of a double-sided disk cannot be read by a 1541 drive.


1581 Drive Notes

Some samples of this drive are not very happy when working with a 64 or 128 in 64 mode. If you find that the system hangs when reading the directory or error channel you should press STOP/RESTORE and enter the following commands:

  @U0>B0
  @U0>B0 or OPEN 15,8,15,"U0>B0":PRINT#15,"U0>B0":CLOSE 15

NOTE: The same command is entered twice. It is only necessary with early
      samples of the drive and should be entered each time you switch on the
      drive or reset the system.

Burning a new drive rom for the 1581 usually fixes this problem. Sometimes replacing the controller is needed, but getting these is hard. Also the 1581 JiffyDOS works fine with the CyberpunX Replay Fastloader.


FIXME

FASTLOAD Turbos & Interfaces

FASTSAVE & DISKCOPY use an interleave of 8.

The CENTRONICS interface emulates channel 4 & 5 serial printers. If you have both serial & centronics printers the first has higher priority (use ONLINE on printer if necessary). Without secondary addr your printer emulates MPS801 characters, but with secondary address 9 on CENTRONICS native(raw) chars will be printed.


FASTLOAD & TOOLKIT

If your filename in save was "*" the program will be named "". To get rid of it again, use @s: without name as well. @R:*=filename will rename the file to "". You should only do this to the first program on disk, to be able to load it back using ":*" as filename ...

Never try to access location $DE00-$DEFF, because internal configuration register latch up by any read or write command. This means, that data currently on the bus will trash the $de00 register.


This is the notorious $DExx-read bug on old Action Replay hardware. This bug is fixed on the RR-hardware.



Appendix A

64 kb only features

Features which are only available on the 64 kb version of the rom:

  • RR-Net
  • SilverSurfer
  • RAMLOAD in freezer. New RR hardware has more RAM and therefore allows real turbo-speed on load while being in freezer.
  • TASS
    • TASS is only available as plain RAM version on all CyberpunX Replay 3.x 64kb versions!

Appendix B

Programming Tips

Many people know this:

sei
lda #$00
sta $de00
jmp $fce2

This routine will take you straight to the powerup menu of the cart and is a rather nice way to quit your programs. LDA #$08 will take you straight to the Fastload Toolkit. If no Replay is present, a normal Reset will be performed.

We have been looking around in the sources to find useful routines but none were found we would recommend. It is not appreciated to use cartridge ROM routines as they are moving during releases!

Utilising the Retro Replay RAM

First a short note about the RAM Configuration. While being in Basic Toolkit the first bank of the cartridge is usually switched in. RAM sits from $8000 - $9fff 'under/over' the actual Cart Bank. When using the Disk Turbo the RAM will be used for buffering data. The same goes for most freezer operations, but still it's rather simple to use the additional RAM and I really hope some people come up with new interesting programs using the ram.

sei
lda #$23
sta $de00  ; turns RAM on at $8000, ROM Bank 0 at $e000
           ; use LDA #$20 to only turn on RAM at $8000

... do your stuff here ...

lda #$0a
sta $de00  ; back to first bank
cli
rts

THAT'S IT ! Simple, hm ??? Now tell me again programming RR is hard. :) WELL, a good idea is turn the screen off or wait for $d012 to be in the upper or lower border though.


Apendix C

Writing own extensions

When writing parameter extensions for the freezer you may want to access areas, which are currently backed up into the internal RAM. Therefore a (longish) routine is already installed in memory when being in Freeze-Mode, which does the address translation for you and gets the correct byte.

To check it out yourself, enter the monitor from the Freeze Menu and hit * to switch the RAM/ROM Config. Now you can disassemble the routine at $02a7.

That routine should be used on any accesses to ordinary RAM from $0000 to $1500 by your Parameter Extension. Zeropage $8e/$8f has to have the address you are looking for, Akku needs to have the value you want to write, Y-Register needs to be $00. JSR $02a7 and off it is. :) For reading a byte from the area mentioned before, JSR $02b3 does the trick.

In case you have code that is slowed down too much by these routines, just use $23 (or $20) on $de00 to turn the RAM on and $00 on $de00 to switch back to Bank 0 of the cart (Freezer-Bank). Please keep in mind, that you have to know more precisely what you are looking for when directly using $de00. (See Appendix C for more info.)

The user-area for your extension programs is from $0a00 to $1500.

ATTENTION! Programs exceeding $1500 will kill the memory of the frozen program from $1500 to the end of the extension.

Warning! Using the Pokefinder when having an extension loaded kills the memory page at $1000 on normal Action Replay and RR prior to Beta4.

As soon as you restart and the Disk Turbo is used, your extension is gone anyways. :) (Except for Retro Replay 64kb version from Beta4 and on.)

Hey, your extension filename needs to start with E. to have the loader recognize it. :) A simple RTS is enough to return to the freezer menu, but if you trashed the stack a JMP ($0334) may help aswell. Don't forget to re-enable Bank0 by writing $00 to $de00. As for the rest, you may do about anything you like. Just be aware that trashing the memory really affects the frozen RAM and that anything below $1500 needs to be accessed using the $02a7/$02b3 routines.


The following lines are taken from the prlink-source-code and will probably be what you have been waiting for ... :)

Old Action Replay hardware has one write-only I/O register at $de00-$deff. The ONE register is $de00.

Its bits are as follows:

Bit 7 - unused
Bit 6 - Resets FREEZE-mode (turns back to normal mode)
Bit 5 - 1=enable RAM at ROML ($8000) & I/O2 ($DF00, =$9F00-$9FFF)
Bit 4 - ROM bank selector high (A14)
Bit 3 - ROM bank selector low (A13)
Bit 2 - 1=disable cartridge (turn off the $de00 register)
Bit 1 - 1=-EXROM high
Bit 0 - 1=-GAME low


Retro Replay hardware has a compatible but heavily extended register-set.

$de00 write: This register is reset to $00 on a hard reset if not in flash
             mode. If in flash mode, it is set to $02 in order to prevent the
             computer from starting the normal cartridge.

             Bit 7 - controls bank-address 15 for ROM banking
             Bit 6 - must be set once to "1" after a successful freeze in order to set the correct memory map
                     and enable Bits 0 and 1 of this register. Otherwise no effect.
             Bit 5 - switches between ROM and RAM: 0=ROM, 1=RAM
             Bit 4 - controls bank-address 14 for ROM and RAM banking
             Bit 3 - controls bank-address 13 for ROM and RAM banking
             Bit 2 - Setting this bit will disable further write accesses to all registers & reset the c64 memory map
                     to standard, as if there is no cartridge installed at all.
             Bit 1 controls the EXROM line: A 0 will assert it, a 1 will deassert it.
             Bit 0 controls the GAME  line: A 1 asserts the line, a 0 will deassert it.


$de01 write: Extended control register. If not in Flash mode, this register
             can only be written to once. If in Flash mode, the REUcomp bit
             cannot be set, but the register will not be disabled by the
             first write. Bit 5 is always set to 0 if not in flash mode.

             Bit 7 - bank-address 15 for ROM (mirror of $de00)
             Bit 6 - REU compatibility bit. 0=standard memory map
                                            1=REU compatible memory map
             Bit 5 - bank-address 16 for ROM (only in flash mode)
             Bit 4 - bank-address 14 for RAM and ROM (mirror of $de00)
             Bit 3 - bank-address 13 for RAM and ROM (mirror of $de00)
             Bit 2 - NoFreeze   (1 disables Freeze function)
             Bit 1 - AllowBank  (1 allows banking of RAM in $df00/$de02 area)
             Bit 0 - enable accessory connector (SilverSurfer).


$de00 read or $de01 read:
             Bit 7 - feedback of banking bit 15
             Bit 6 - 1=REU compatible memory map active
             Bit 5 - feedback of banking bit 16
             Bit 4 - feedback of banking bit 14
             Bit 3 - feedback of banking bit 13
             Bit 2 - 1=Freeze button pressed
             Bit 1 - feedback of AllowBank bit 
             Bit 0 - 1=Flashmode active (jumper set)


To disable the cart: sei lda #$14 sta $de00 jsr $e453 cli rts should work pretty well.


This results in the values $00, $08, $10 and $18 for Banks 0,1,2 and 3. $80, $88, $90, $98 are used for Banks 4,5,6 and 7 on the new 64kb ROMs.

$0A in $de00 will take you to a safe basic environment.

The new registers take us to:


Appendix D

Memory Mapping

The newly introduced bits on the Retro Replay hardware allow some new fancy things and allow more compatibility with already existing hardware, but the experts should know about some things.

$de00/$df00 are the memory pages where a cartridge can have a memory page mapped in. Bit 6 of $de01 sets the page which is used to map in the IO-Page. Since this register is write once (except for bit 0), the cartridge reset routine usually sets this bit to its correct value. Whenever a REU-compatible memory map is used, $de10 to $deff will be used to map in a mirror of $9e10 to $9eff. $dfxx is free for REU then. The default for the RR hardware is to run with the IO area mapped to $df00-$dfff. This is Action Replay compatible behaviour and the mirror comes from $9f00 to $9fff then. The SilverSurfer serial interface uses registers from $de02 to $de0f when plugged in and activated. Therefore the routines in the IO areas (which are absolutely needed) have been shortened as much as possible and will require further optimizations aswell.

The RR-RAM is something special. Setting bit 5 of $de00 activates the RAM of your RR hardware, just like on AR hardware. While trying to use the banking bits 3 and 4 along with bit 5 has no effect on plain AR hardware, the new hardware will map in one of the four available 8kb RAM banks. Just like the ROM banks, the RAM is mapped in from $8000 to $9fff.


Bit 1 of $de01 allows you to select a more flexible RAM banking. If the AllowBank bit is not set, the $de02-$deff or $dfxx area will always mirror from bank 0 of the RAM, so the older cartridge images will work. With the bit set, the RR will use the selected RAM bank to map in the IO area.

We will currently keep this bit unset, since this gives the advantage that the upper 3 RAM banks can be used completely and not every time $100 hexbytes have to be wasted around $9e00/$9f00.

PLEASE NOTE that you should ONLY use the set/clear freeze and breakpoint commands from the monitor with their tokens!

I know many people writing the JSR $dfd3 manually, but since the adress will change, I recommend to keep this in mind!


A final word about the FLASH MODE: I was asked a few times already about how to access the complete 128kb ROM contents. The Flash Mode has another control bit at $de01 which is used to select all of the 128kb chip. It is not possible to use this bit during normal operation.