From: werner_huysegoms@my-dejanews.com
Newsgroups: comp.sys.hp48
Subject: Re: Help!! How to Copy ROM Card to RAM card
Date: Mon, 20 Jul 1998 14:10:33 GMT
Organization: Deja News - The Leader in Internet Discussion
Lines: 158
Message-ID: <6ovj4p$jqt$1@nnrp1.dejanews.com>
References: <35b242c0.0@news.pacifier.com>
NNTP-Posting-Host: 158.169.9.11
X-Article-Creation-Date: Mon Jul 20 14:10:33 1998 GMT
X-Http-User-Agent: Mozilla/3.02 (WinNT; I) via proxy gateway CERN-HTTPD/3.0 libwww/2.17
Xref: republic.btigate.com comp.sys.hp48:13557

In article <35b242c0.0@news.pacifier.com>,
  "GaryS" <gstrowe@mail.pacifier.com> wrote:
> Greetings,
>                         Is there a program that can strip the contents from
> a ROM card with the option to copy them onto a RAM card?
>
> TIA
>
>

If it's a GX you have, here it is (in asc format):

%%HP:T(1);
"D9D202BA812BF819FF30D9D20AEC81CCD20C01008F146608FB97601BF2508156
3808A335808B1C4808AB54808AAE324808B54021D280F406F6D5CD163D214ECC
4C0CC4708B261322058D04F01D230A43F8F51110C434040F7CA13014AAE28042
331FF80531F3805310C13480480531041358051537150716F17FCD5FE80407FA
805310C80531F380431FF80531F78058F5E010208D34150DE140B2130B213072
ED"

And its source:

********************************************************************************
*
* P1CN
*
* Copy Port 1 to port n (2<=n<=max portnr available)
*
* In : n (real)
* Out:
*
* bytes: 159.0
* check: #DE27h
*
* Error conditions:
* 1. Must run on a GX (not tested)
* 2. 8052F: xyzt card1 flags
*           x: card1 present
*           y: card1 writeable
*           z: card1 merged
*           t: unused
*    80531: xyzt card2 flags
*           x: card2 present
*           y: card2 writeable
*           z,t: unused
*    card 1 must be present and not merged
*    card 2 must be present and writeable
*    --> Port Not Available
* 3. port n exists ( (80533) = #banks > n-2, n>1)
*    --> Bad Argument Value
*
* The actual copy is carried out as follows:
* 0. select bank n-1
* 1. reconfigure the bank switcher from 7F000 to 3F000
* 2. reconfigure port 1 from C0000 to 40000
* 3. copy 40000 nibbles from 40000 to C0000
* 4. reconfigure port1 from 40000 to C0000
* 5. reconfigure bank switcher from 3F000 to 7F000
* 6. DEEPSLEEP to allow card change
* It handles both 32k and 128k cards in port 1.
********************************************************************************
::
 CK1NOLASTWD
 CK&DISPATCH1
 ONE
 ::
  COERCE
  CODE
	GOSBVL  =POP#
	GOSBVL  =SAVPTR
	D0=(5)  #8052F
	C=DAT0  X
	?CBIT=0 3
	GOYES   LPNA
	?CBIT=1 1
	GOYES   LPNA
	?CBIT=0 11
	GOYES   LPNA
	?CBIT=0 10
	GOYES   LPNA
	P=      4	* 128k card
	?CBIT=1 5
	GOYES   L10
	P=      1	* 32k card
L10	C=0     A
	CPEX    4	* C.A = card size
	RSTK=C		* keep it
	CSR	A	* set up loop counter in B.A
	B=C	A
	B=B-1	A
	D0=D0+  4	* read nr of banks available in card 2
	C=0     A
	C=DAT0  B
	A=A-1   A
	GOC     LBAV
	A=A-1   A
	GOC     LBAV
	?A<C	A
	GOYES   LDOIT
LBAV    LCHEX   502
LERR    GOVLNG  =GPErrjmpC
LPNA    C=0	A
	LCHEX   A
	GOC	LERR
LDOIT   GOSBVL =DisableIntr
	A=A+A   A               * select bank n-1:
	LCHEX   #7F040		* read 2 nibs at #7F040 + 2*(n-2)
	A=A+C   A
	D0=A
	A=DAT0  B
	C=0     B               * reconfig bank switcher at 3F000
	UNCNFG
	P=      3
	LCHEX   FF
	CONFIG
	LCHEX   3F
	CONFIG
	LCHEX   C0              * reconfig port 1 at 40000
	D0=C
	UNCNFG
	CONFIG			* size does not really matter here
	LCHEX   40
	D1=C
	CONFIG
L50     A=DAT1  W               * copy
	DAT0=A  W
	D0=D0+  16
	D1=D1+  16
	B=B-1	A
	GONC    L50
	UNCNFG                  * reconfig port 1 at C0000
	C=RSTK			* get card size back
	C=-C	A
	CONFIG
	LCHEX   C0
	CONFIG
	LCHEX   3F              * reconfig bank switcher at 7F000
	UNCNFG
	LCHEX   FF
	CONFIG
	LCHEX   7F
	CONFIG
	GOSBVL  =AllowIntr
	P=      0
	GOVLNG  =GETPTRLOOP
    ENDCODE
    DEEPSLEEP
  ;
;

--
Best Regards,
Werner Huysegoms
Reply-To: werner.huysegoms@dgx11.cec.be
remove the x before replying

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum