[comp.sys.handhelds] Becoming an official HP48SX developer????

ervin@pinbot.enet.dec.com (Joseph James Ervin) (03/21/91)

Hi all,

After completing my screen dissolver, it has occured to me to start writing
some more general audience stuff for the HP48 that can utilize the power of
machine language code.  

The first things that come to mind are games.  I have seen a number of
shareware or public domain games for the MAC that would be great to have on the
48SX.  It seems that a lot of these should be doable in terms of processor
speed and graphics, but there are some important pieces of information missing
from my understanding of the 48's internals.

Specifically, it is difficult to implement animated graphics without access to
a hardware timer.  I know there is one in the 48SX, but I have no information
regarding how to access it.  Furthermore, direct access to the IO registers
which control/sample the keyboard would be a must, it seems to me.  You'd want
to be able to do things like test for "key pressed and held" for things like
rotating your galactic meanie-destroyer, or changing your speed, etc..

This raises the question "Is it possible to become an official developer, thus
getting some form of _official_ information from HP?".  I know other vendors
offer these types of things for their machines.  What about the 48SX?

(Dr. Wickes, would you care to comment?)

I would ask this question on HP's BBS, but the long distance charges are brutal
from Massachusetts.  I will gladly pay these charges, hoever, if it turns out
that I need to go there for this information.

Anyone know of any such official arrangements from HP?

Sincerely,

>>>Joe Ervin     ervin@pinbot.enet.dec.com

bson@rice-chex.ai.mit.edu (Jan Brittenson) (03/23/91)

In a posting of [20 Mar 91 17:33:22 GMT]
   ervin@pinbot.enet.dec.com (Joseph James Ervin) writes:

 > After completing my screen dissolver, it has occured to me to start
 > writing some more general audience stuff for the HP48 that can utilize
 > the power of machine language code.

   Then it may be of interest to you that I'm in the final phase of my
MLDL (Machine Language Development Library - I hope no one objects to
my use of this classic acronym), which will contain an ML debugger and
a disassembler, both use AG mnemonics. I will soon post a beta
version.


 > Specifically, it is difficult to implement animated graphics without
 > access to a hardware timer.  I know there is one in the 48SX, but I
 > have no information regarding how to access it.

Did you examine chip-48?


 > Furthermore, direct access to the IO registers which control/sample
 > the keyboard would be a must, it seems to me.  You'd want to be able
 > to do things like test for "key pressed and held" for things like
 > rotating your galactic meanie-destroyer, or changing your speed, etc..

   Hum. I tried this, and it didn't work too well. The problem is that
the keyboard interrupts, and you have to keep playing with both
interrupts and the 0xf bit of the ST register. I found out that
instead of polling the keyboard (which is done by IN/OUT instructions,
and beware! the keyboard is somewhat oddly wired) it's much simpler to
poll the system keyboard buffer. Appended at the end is a piece of
code which will both poll the keyboard and wait for a key to get
pressed. The key is removed from the buffer. So you should combine
this with a manual scan: poll the system buffer until you have a key
and then scan the keyboard it's pressed. When it's released you go
back to checking the system keyboard buffer.


						-- Jan Brittenson
						   bson@ai.mit.edu


 O  /
  \/
  /\  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 O  \

;; kb.star -- keyboard interface

	radix	0x10

keybuf = 704ea

;; Poll keyboard. System-based version. Returns the scan code in A.A.
;; Trashes C.A, B.B, and D0. The C bit is set if a key was pressed,
;; otherwise it's cleared.
;;
;; This is a mutation of the ROM prefixed machine code routine to
;; get/peek the next entry in the keyboard buffer.


kb_poll:
	move.5	keybuf+1, d0	; KB Put ptr
	move.s	@d0, a		; A.S = put ctr
	dec	d0
	move.s	@d0, c		; C.S = get ctr
	breq.s	c, a, $100	; Ctrs are equal - buffer empty

	move	c.15, p		; P = get ctr
	inc.s	c		; Remove key
	move.s	c, @d0

	swap	c, d0
	add	p+1, c
	add	p+1, c		; C += get ctr, in bytes
	clr	p
	move	c, d0		; D0 = &next key
	clr.a	a
	move.b	@d0, a		; A.A = key
	retsetc
$100:
	clr.a	a
	retclrc


;; Wait for a key to become pressed, then return the scan code in A.A.

kb_get:
	call	kb_poll			; Get key, if any
	brcc	kb_get			; Keep trying until we get something
	ret				; Return with scan code in A.B

	end

						-- Jan Brittenson
						   bson@ai.mit.edu

231b3618@fergvax.unl.edu (Ben Hollingsworth) (03/28/91)

ervin@pinbot.enet.dec.com (Joseph James Ervin) writes:

>I would ask this question on HP's BBS, but the long distance charges are brutal
>from Massachusetts.  I will gladly pay these charges, hoever, if it turns out
>that I need to go there for this information.

>Sincerely,

>>>>Joe Ervin     ervin@pinbot.enet.dec.com

Anyone reading this apparently has access to Internet and can reach
HP's BBS at address 15.255.72.16

					-- Obi-Wan

     |\_/|
    \'o.0'/       AACK!  PTHAT!
    =(___)=
       U

lishka@uwslh.slh.wisc.edu (a.k.a. Chri) (03/29/91)

231b3618@fergvax.unl.edu (Ben Hollingsworth) writes:
>Anyone reading this apparently has access to Internet and can reach
>HP's BBS at address 15.255.72.16

Please be aware that because someone has access to UseNet news does
*NOT* necessarily imply that they have access to the InterNet.  Many
sites (my organization included) get news through UUCP transfers
overnight.  UUCP typically operates over common phone lines using
modem links.  So those who only have UUCP probably do *NOT* have
access to the InterNet (which typically requires a machine connected
via a high-speed network).

					.oO Chris Oo.
-- 
Christopher Lishka 608-262-4485     It is not safe out here.  It is wonderous,
Wisconsin State Lab. of Hygiene     with treasures to satiate desires both
   lishka@uwslh.slh.wisc.edu        subtle and gross.  But it is not for the
   uunet!uwvax!uwslh!lishka         timid. -- Q

EBERBERS%yubgef51@pucc.PRINCETON.EDU (____ Zarko Berberski ____) (04/04/91)

> Anyone reading this apparently has access to Internet and can reach
> HP's BBS at address 15.255.72.16

except if he is receiving this from bitnet gateway (mailserv- not
listserv) handhelds@gac.edu :-((

herman@corpane.uucp (Harry Herman) (04/06/91)

In <9B04160345FF00984E@yubgef51> EBERBERS%yubgef51@pucc.PRINCETON.EDU (____ Zarko Berberski ____) writes:

>> Anyone reading this apparently has access to Internet and can reach
>> HP's BBS at address 15.255.72.16

>except if he is receiving this from bitnet gateway (mailserv- not
>listserv) handhelds@gac.edu :-((

Or if the person is reading these messages through usenet, in which case
they have NO access to the BBS except to call it long distance with a
modem.