========================================================================= Newsgroups: comp.sys.palmtops Path: auvm!paladin.american.edu!europa.asd.contel.com!uunet!think.com!rpi!usenet.coe.montana.edu!nntp.uoregon.edu!bright!dmose From: dmose@bright.uoregon.edu (Dan Mosedale) Subject: Various portfolio programming topics (was Re: Portfolio questions) Message-ID: <1992Apr3.085334.19701@nntp.uoregon.edu> Keywords: nn Sender: news@nntp.uoregon.edu Organization: Dept. of Mathematics, University of Oregon, Eugene OR 97403-1222 References: <1992Mar29.094602.10179@nntp.uoregon.edu> Distribution: comp Date: Fri, 3 Apr 92 08:53:34 GMT Forwarded message from: hugh@bilpin.co.uk (Hugh Satow) Hi Dan! I've just seen your posting of Mar 29 in comp.sys.palmtops in which you reply to hysky@polaris.utu.fi (j.h.husgafvel) about Portfolio internals (mentioning the book by Frank Riemenschneider). I thought I'd send you a copy of the mail I sent to Hysky with some of the information I've discovered. I'd be interested to know if you disagree with anything, also if you know how the battery level is checked. Also I have a small monitor/disassembler program for the PF which I will be sending to atari.archive.umich.edu for the Atari archives. Best wishes, Hugh Satow -- hugh@bilpin.co.uk ---------------------------------------- My mail to Hysky:- Hi Hysky! Here's some info I've figured out on the Portfolio. I reckon the LCD controller is a Hitachi HD61830 (which I have a manual for), or workalike. It has two ports, address and data, with a dozen or so registers:- R0 - mode - display on/off, blink, cursor, graphics/text bits R1 - char pitch, high nybble rows - 1, low nybble 6/7/8 dots wide - 1 R2 - chars/line 2 - 128 R3 - lines/screen 1 - 128 R4 - cursor line 1 - 16 R8,9 - display start (low, high) RA,B - crsr addr (high, low) RC - write byte RD - read byte RE - clear bit (bit # in low 3 bits, LB bit is bit 0, RH is bit 7) RF - set bit If you read from the address register, DB7 is a busy flag, which should be checked before doing anything. If you want to read data, you have to do a dummy read first. (ie write RA, check busy, write RB, check busy, read RD, check busy, finally read RD). (write RA means write 0AH to addr reg, value to data reg. You can set DX to 8011H, then do an OUT (DX), AX) The cursor auto-increments on a read/write (for bits also). If you want to change the cursor addr, low order byte, you must set the high order byte as well (the Hitachi manual says) (If you only change the high order byte, thats ok) The R/W routines in ROM looks very slow, as far as I remember (they keep on setting DX I think). The CPU runs just too quickly to not need the busy checks. You can probably find an optimum number of NOPs, I decided its easier to do the busy checks. If this is the right sort of info, and you'd like more details, just say. I did a couple of routines that read and wrote the whole screen in one go, disabling & re-enabling interrupts before and after. I was going to do some graphics stuff, but haven't got round to it. (I used DOS to set graphics mode etc.) Here's some other stuff I worked out, of varying use:- All ports are between 8000H & 807FH, in blocks of 10H, I think: 8000-0F show last key pressed (bit 7 = 1 means released) see below 8010 } LCD { data } duplicated in pairs up to 801E,1F 8011 } { address } 8020 tone generator 8040-4F - word - 1/4 second ticks ? 8050-5F - word - always C202H ? 8060-6F - byte - contrast level 8070-7F - extender Control keys ------------ ^2 - 00 ^[ - 1B ^\ - 1C ^] - 1D ^6 - 1E ^_ - 1F ^bsp - 7F Key codes (the row value is the low order nybble I think) --------- (This is incomplete, )|( stands for the Atari key, <<>, <>>, <^> and are the arrow keys) 0 1 2 3 0 )|( \d s \ 1 w p z 2 1 4 3 2 g ; 4 3 r . 5 t = 6 5 \r , 7 6 y l x 8 0 9 i h v a q - j b u <<> n c o [ <>> m d 7 <^> / e ' 8 f 9 ] k Hope this helps, I don't know anything about undocumented int 61s, I've done a small music program, the tone generator is fairly straightforward, also have several games programs (logical rather than arcade) if you're interested. Also a fair amount of stuff on the serial interface as I don't have a PC, only a homebrew machine, so have had to do my own comms stuff. I'd be interested to know how they know how to put up a 'battery low' message (maybe something at 8020H or 8030H?)