Vintage Palmtops Tips & Tricks

8Sep/110

Software for Atari Portfolio

Volkov Commander

Thanks to its popularity back then, Portfolio experienced a flood of software for virtually all applications. However, when the hype had gone down, most of the dedicated websites started to disappear and some FTP archives have become inaccessible. Nowadays, a new fortunate user of a Portfolio (with some file transfer hardware) faces the problem: where to find anything useful that I could load to my little computer and be happy with it?

Here's a short list of the sources where you can still find software for the Portfolio. They are redundant, of course, but that increases the chance, that Pofo software will survive on the Internet and we won't wake up one day to find out that the only place where the programs used to be is down.

2Aug/110

Glucholazy Atari Party 2011

Atari Portfolio with a homebrew RAM card at Głuchołazy Party

Last weekend the well-known demoscene party was held in Głuchołazy, Poland. Though it's traditionally associated with "big" Atari systems like XL/XE, ST and Falcon, I think it's worth mentioning, that a new Portfolio initiative was born this year. We already have a graphician, musician, hardware constructor, coder and tons of ideas. If we succeed, you'll probably hear about Portfolio once more.

This year, however, we spent the party in a mourning mood, having heard about the death of one of us. Radek "Raster" Štěrba was a "one-man army" in the Atari community - a talented coder, musician and hardware constructor. As if it hadn't been enough, another friend of us - Artur "Jurgi" Jurgawka - has gone on sunday.

We'll never forget you, friends!

16Jul/112

Programming graphics on Portfolio, part 2

Atari Portfolio

Go to part 1

Portfolio's display is controlled by a Hitachi HD61830 chip. As I previously said, this makes it incompatible with the PC and more difficult to program. However, the only way to use dynamic graphics in your programs is to access the controller directly.

If you'd like to update the graphics in real time (e.g. in a game), the best idea would be to redraw the screen at once, so that you don't need to bother drawing each pixel separately. It is possible thanks to the routine by Milan and Martin Hrdlička:

refresh:
	cld
	push ax
	push cx
	push dx
	push si
	push di
	push ds
	mov si, 0
	mov ax, 0b000h
	mov ds, ax
	mov di, 64
ref2:	mov cx, 30
	mov bx, si
	mov al, 0ah
	mov dx, 8011h
	cli
	out dx, al
	mov al, bl
	dec dx
	out dx, al
	sti
	mov al, 0bh
	inc dx
	cli
	out dx, al
	dec dx
	mov al, bh
	and al, 7
	out dx, al
	sti
ref1:	lodsb
	ror al, 1
	mov ah, al
	and ah, 136
	ror al, 1
	ror al, 1
	mov bl, al
	and bl, 68
	or ah, bl
	ror al, 1
	ror al, 1
	mov bl, al
	and bl, 34
	or ah, bl
	ror al, 1
	ror al, 1
	and al, 17
	or al, ah
	mov ah, al
	inc dx
	mov al, 0ch
	cli
	out dx, al
	mov al, ah
	dec dx
	out dx, al
	sti
	loop ref1
	dec di
	jnz ref2
	pop ds
	pop di
	pop si
	pop bx
	pop dx
	pop cx
	pop ax
	ret

 
Now, all you need to do is to update the graphics at B000:0000 each time before refreshing the screen. One pixel is one bit, so there are 64 lines by 240/8=30 bytes. That makes 1920 bytes and the actual position of a pixel in memory may be calculated using this formula:

byte = y * 30 + x / 8

bit = x mod 8

so, for example to draw the point at x=50, y=17 (0,0 is the top-left corner, 239,63 is the bottom-right) you need to set the bit number 2 at B000:0204 (that is 516 decimal). Obviously, clearing the bit clears the pixel.

More tips on programming graphics:

3Jul/110

Programming graphics on Portfolio, part 1

Atari Portfolio

One of Atari Portfolio's weak points is the graphics. Not only has Portfolio very modest graphics capabilites (what can be understood), but also is hardly compatible with PCs. I think this is why there were so few games written for Pofo (Folidash and Phoenix are two of them).

There are two ways to display graphics on Portfolio: using interrupt 10h or sending data directly to the graphics controller. The former is very slow, so it's only intended to use when you want to introduce simple graphic elements (e.g. in board games), but its advantage is the compatibility - you'll be able to run your program on a PC. The latter is much faster - it's actually the only way to program animations - but your code will hang the PC.

Using int 10h is also much easier. If you want to draw an oblique line, you may type:

	mov ax, 4	; set graphics mode 4
	int 10h
	mov cx, 0	; initial X coordinate
	mov dx, 0	; initial Y
loop:	mov ax,0c01h	; set pixel
	mov bh, 0
	int 10h
	cmp cx, 63
	je end
	inc cx
	inc dx
	jmp loop
end:	mov ah, 1	; wait for a keypress
	int 21h
	mov ax, 7	; set graphics mode 7
	int 10h
	int 20h		; exit to DOS

 
Go to part 2

21Jun/110

Besser vorbeugen als heilen

I remember this German saying from school. It means "better to prevent than cure" and when it comes to vintage computers, this is painfully true. I'm really thrilled by the possibility, that one of my palmtops may get broken and never get back on its feet. So when I had read in PofoWiki, that every 7 of 10 Portfolio failures are associated with the display ribbon cable, I began to fear opening and closing it. I was wondering, what would be a worse disaster: losing the display and therefore making my Portfolio out of action when the ribbon would break, or breaking it myself during preventive "operation". Hopefully, the abovementioned article said that the modification is really harmless and easy to perform.

Having read the instruction, I carefully removed the plastic bolt from the rear. Now all I needed to do was to cut both edges of the bolt so that the ribbon wouldn't be held tight. I used the only tools I had at the moment - a cheap Chinese cutter and the pincers to rip the edges off. After the treatment the bolt looked like this:

I finished the edges with a fine file. I noticed that the gap is still too narrow, so I widened it with the file. It's crucial that the gap is wide enough to not touch the ribbon. The effect of my work may be seen below:

I know that the modification disfigures Portfolio in a way. If you're a devoted collector, you'll probably let go. But if you're using your Pofo intensively and the functionality means more to you than the look, read these articles (first, second - both in German, but the second one is filled with good quality photos) and consider doing it.

17Jun/1120

Atari Portfolio and no file transfer device

Atari Portfolio

Sounds familiar? Unfortunately, I won't tell you how to copy files using psychokinetic abilities. Instead I'll write about a brilliant idea by Viktor T. Toth, who found out how to write programs on Portfolio without any external compiler. If you're an assembler coder, you'll probably find it useful to write your own small applications. If not, I'll try to put some listings on my blog, including a serial transmission program (that is, the program that is not built-in, so you must copy it somehow to your Portfolio; if you don't have a parallel interface or a card, you're in deep ass).

The idea behind Viktor's solution was that you're - in limited fashion - able to machine-code from within DOS. The only obstacle is that not all ASCII codes may be entered using keypresses (e.g. 03 - Ctrl+C ). His workaround consists of two short programs that don't contain any "illegal" codes, so you can type them from DOS prompt. When you have successfully finished the second one, you'll be able to "compile" text files with hex-coded programs. Now you only need to write your program on a regular PC, compile it to a .com file, view that file with a hex editor and re-type the codes on your Portfolio.

The original step-by-step instructions are here, but I'll write a short tutorial, just in case 😉

First, you need to create CAT.COM. This tiny program allows you to enter any character (except Ctrl+C and Ctrl+S) and redirect it to a file. When in the DOS prompt, press Atari+LOCK to turn on NUM LOCK and type:

echo \180^G\128\196^A\205!\136\194\180^B\205!\235\241>cat.com

NOTE: \xxx means "hold Alt and type three digits from the numeric (red) keyboard". You should see a semigraphic character when you release Alt. ^x means Ctrl+X. ! is simply an exclamation mark (Shift+1).

If you made no mistakes, the file should be 17 bytes long and run without hanging the computer. And now, here comes the hard part. With CAT.COM you'll write the next program, H2C.COM, but this time the characters won't show up. Type:

cat>h2c.com

Now, make sure that NUM LOCK is on (the cursor changes to underline) and then hit the following keys:

\180 ^H \205 ! < x t (
< : | ^B ^D ^I \177 ^D
\210 \224 $ \240 P \180 ^H \205
! < x t \233 < : |
^B ^D ^I $ ^O [ ^H \216
\136 \194 \180 ^B \205 ! \235 \208
\205 spc ^C

If you're lucky, you'll get a 50-byte-long file.

Now it's time to test the compiler. The example code on Viktor's page is long and complicated. Instead, open the built-in editor and type this:

b4 09 ba 0b 01 cd 21 b4 4c cd 21 x

without spaces and newlines! Save the file as HELLO.HEX and execute:

h2c<hello.hex>hello.com

Yet you have to merge the text to your code. You may use either the text editor or CAT.COM, but remember to redirect CAT.COM's output to append the text to the end of HELLO.COM:

CAT.COM>>HELLO.COM

Type:

Hello world!$

(the string must be terminated with $). Hit Ctrl+C (or save the file and hit Esc, when using editor).

If everything went right, typing HELLO should result in the good old hello message.

 

[Edit: 2013/10/13]

Read the comments to this post to find another solution to this problem by DH.