💾 Archived View for mirrors.apple2.org.za › archive › ground.icaen.uiowa.edu › MiscInfo › Programmin… captured on 2023-01-29 at 10:15:09.

View Raw

More Information

-=-=-=-=-=-=-


I noticed when reading the A2 News and Notes July 2000 that a NEW IIgs ROM
extraction and save to file program was announced - see the quote on it below:


Grabber is a $5 shareware utility to capture ROM images of both the ROM_01 and
ROM_3 IIgs for use with emulators such as Sweet16 and Bernie ][ The Rescue.
Available now at http://sarah.sheppyware.net/

It may be of interest to note that a public domain release IIgs ROM extractor
program named GRC was made available by me several years ago.  It is a ProDOS 8
system application which can extract and save as a binary file any IIgs ROM
image; 
ROM 00, ROM 01 or ROM  3.

The ShrinkIt archive is available from the following URL:

http://www.grin.net/~cturley/gsezine/GS.WorldView/v1998/May/GRC.SHK


The documentation and release text file for it follows:
-------------------------------------------------
About the ShrinkIt archive, GRC.SHK
Author: Anonymous
Status: Public domain - with merlin src. codes included


The archive unshrinks with any ShrinkIt program - versions; 3.4 and/or ShrinkIt
GS v1.1 - to a folder titled 'GRC', containing a P8 system program GRC.SYSTEM
(2k) and the Merlin src. code file GRC.S (4k).

The program is only for use with a Apple IIgs, is simple and very user friendly
also. Follow the program screen prompts and you can't make a mistake. It will
extract and save an exact binary file image of any Apple IIgs ROM, for use with
any Apple IIgs emulator program that requires a IIgs ROM image to function.

The GRC.SHK archive was first presented in the August issue of A2-2000, within
the folder GS.ONLY.  I'm placing it here as a single archive for the public
needs, as any individual sees fit to use it.

Cheers & Enjoy!

Charles T. 'Dr. Tom' Turley
Editor - A2-2000

Email: cturley@grin.net
-----------------------------


The merlin src. codes for the program are listed below. They are also included
with the program archive.
-----------------------------------------------------------------------
 lst off
 xc
 xc
 org $2000
 dsk grc.system
 typ sys

mli equ $bf00
mli_bye equ $65
mli_create equ $c0
mli_open equ $c8
mli_write equ $cb
mli_close equ $cc
init equ $fb2f
home equ $fc58
rdkey equ $fd0c
crout equ $fd8e
prbyte equ $fdda
cout equ $fded
idroutine equ $fe1f
setnorm equ $fe84
setkbd equ $fe89
setvid equ $fe93

begin cld
 ldx #$f8
 txs
 jsr setkbd
 jsr setvid
 jsr setnorm
 jsr init
 jsr home
 sec
 jsr idroutine
 bcc found_gs
 jsr print_message
 asc "THIS PROGRAM REQUIRES AN APPLE IIGS!"
 HEX 8d8d
 asc "PRESS ANY KEY TO QUIT: "
 hex 00
 jsr rdkey
 jmp done
found_gs sty rom_version
 lda #$fe
 ldx #$02
 cpy #$03
 bne not_rom_3
 lda #$fc
 ldx #$04
not_rom_3 sta first_bank
 stx number_banks
 jsr print_message
 asc "GS ROM Capture v1.0"
 hex 8d8d
 asc "This Apple IIgs has ROM version $"
 hex 00
 lda rom_version
 jsr prbyte
 jsr crout
 jsr print_message
 asc "with "
 hex 00
 lda rom_version
 cmp #$03
 beq show_256
 jsr print_message
 asc "128"
 hex 00
 jmp size_done
show_256 jsr print_message
 asc "256"
 hex 00
size_done jsr print_message
 asc "K of ROM."
 hex 8d8d00
 lda rom_version
 ora #$30
 sta pathname+4
 jsr mli
 dfb mli_create
 dw create_parms
 bcs done
 jsr mli
 dfb mli_open
 dw open_parms
 bcs done
 lda ref_num
 sta write_parms+1
 sta close_parms+1
 lda first_bank
 sta current_bank
bank_move lda #$00
 jsr move_chunk
 jsr mli
 dfb mli_write
 dw write_parms
 bcs abort
 lda #$80
 jsr move_chunk
 jsr mli
 dfb mli_write
 dw write_parms
 bcs abort
 inc current_bank
 dec number_banks
 bne bank_move
abort jsr mli
 dfb mli_close
 dw close_parms
done jsr mli
 dfb mli_bye
 dw quit_parms
 brk
move_chunk clc
 xce
 rep #$30
 and #$00ff
 pha
 lda current_bank
 and #$00ff
 sta $08
 pla
 xba
 sta $06
 ldy #0
:1 lda [$06],y
 sta $3000,y
 iny
 iny
 cpy #$8000
 bcc :1
 sec
 xce
 rts
print_message pla
 sta $06
 pla
 sta $07
 ldy #0
:1 inc $06
 bne :2
 inc $07
:2 lda ($06),y
 beq :3
 ora #$80
 jsr cout
 jmp :1
:3 lda $07
 pha
 lda $06
 pha
 rts
create_parms dfb 7
 dw pathname
 dfb $c3
 dfb $00
 dw $0000
 dfb $01
 ds 4
open_parms dfb 3
 dw pathname
 dw $1000
ref_num ds 1
write_parms dfb 4
 ds 1
 dw $3000
 dw $8000
 ds 2
close_parms dfb 1
 ds 1
quit_parms dfb 4
 ds 6
pathname str 'ROMx'
rom_version ds 1
first_bank ds 1
number_banks ds 1
current_bank ds 1

-------------------------

Just thought I should bring this public domain program to the attention of 
the Apple II community for their needs - again!

Cheers,
Tom