Skip to content

Commit 15e550d

Browse files
authored
Update README-Atari.md
1 parent db6aafa commit 15e550d

File tree

1 file changed

+84
-80
lines changed

1 file changed

+84
-80
lines changed

README-Atari.md

Lines changed: 84 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,21 @@ Please read main README.md for that.
1414

1515
An 8-bit Atari computer with at least 128K of RAM: 130XE or expanded 65XE as a minimum.
1616

17-
Except the very first bank, whole extra memory is meant to be used by RAM disk.
18-
19-
Right now memory above 320K is not used. The disk driver can address it but it doesn't have space for extra
20-
Block Allocation Maps (BAMs) and so the image creator can't write such images.
21-
2217
There is only RAM disk available at the moment. I don't know how to handle communication with disk drives over SIO.
2318
Please help if you can!
2419

20+
Right now expanded memory above 320K is not used. Except the very first bank, whole extra memory is meant to be used by RAM disk.
21+
2522
Unlike Apple 2 version, this port is *binary compatible with well-behaved GEOS software released for C64/128*.
2623

27-
Unfortunately even some of BSW's own software for GEOS 64 make assumptions about the system that may cause (in best scenario) visual glitches.
24+
Unfortunately most of BSW's own big software for GEOS 64 makes assumptions about the system that cause (in best scenario) visual glitches.
2825
Many of these issues were later corrected for GEOS 128 due to 80-column mode support, but this port doesn't try to be compatible with GEOS128.
2926

3027
## Quickstart
3128

3229
Download one of the XEX files from the Releases section. Such file contains RAM disk image, GEOS Kernal, disk driver, input driver and loader for the whole thing.
3330

34-
Run emulator and make sure to choose PAL system with at least 128K/320K of RAM. Setup joystick in port 1. Load the XEX file into emulator.
31+
Run an emulator and make sure to choose PAL system with at least 128K/320K of RAM. Setup joystick in port 1. Load the XEX file into emulator.
3532

3633
GEOS will boot into DeskTop in just few seconds.
3734

@@ -69,109 +66,114 @@ Programs will not work correctly if:
6966

7067
They may not work at all or show some graphical glitches. For example, if an application tries to add some color it will write to `COLOR_MATRIX` space, which is now occupied by Player0/1/2/3 data, so mouse pointer will be temporarily overwritten.
7168

69+
| BSW Application | Remarks |
70+
|-------------|---------|
71+
| GeoPaint | too many visual glitches to be usable |
72+
| GeoFont | too many visual glitches to be usable |
73+
| IconEditor | too many visual glitches to be usable |
74+
| GeoPublish | not as bad as GeoPaint, but still not usable |
75+
| GeoCalc | crashes because it needs CBM BASIC for floating-point calculations |
76+
| GeoWrite | patched to Atari works ok-ish if you type slowly |
77+
| GeoFile | minimal visual glitches |
78+
| GeoChart | works fine except area-fill chart |
79+
| GeoDex | works fine |
80+
7281
Just like on C64 the processes (sleep and multitasking) are clocked by video frame rate.
7382

7483
### Performance
7584

76-
Atari port is supposedly faster than C64/128. It has higher CPU clock rate and linear screen organization that is easier to handle than VIC bitmap.
85+
Atari port is probably somewhat faster than C64/128. Atari has higher CPU clock rate and linear screen organization that is easier to handle than VIC bitmap.
86+
All the rectangle functions (*Rectangle*, *InvertRectangle*, *ImprintRectangle*, *RecoverRectangle*) have been optimized to reuse calculated screen coordinates.
7787

7888
Keyboard has its own interrupt and doesn't have to be scanned for every row/column.
7989

80-
All the rectangle functions (*Rectangle*, *InvertRectangle*, *ImprintRectangle*, *RecoverRectangle*) have also been optimized to reuse calculated screen coordinates.
81-
8290
### System startup
8391

8492
The boot code jumps right into DeskTop, but eventually it should at least try to run Auto-Exec applications from RAM disk.
85-
In order to do it, that code has to be moved into higher memory area (at least over $5000 out of current $2000).
93+
In order to do it, that startup code has to be moved into higher memory area (out of current $2000 to $5000-$5FFF space).
8694

87-
### Players (sprites)
95+
## Players (sprites)
8896

8997
Player 0 is reserved for mouse pointer. Player 1 is reserved for text prompt, it will support fonts of any size.
9098

91-
Players 2 and 3 can be used by applications. The *DrawSprite* function takes VIC sprite format as input.
92-
It will take every third byte to show the leftmost 8-pixels only. The sprite will appear stretched in X direction because VIC sprites have hires pixel size.
99+
Players 2 and 3 can be used by applications. The *DrawSprite* function takes VIC sprite format as an input.
100+
It will take every third byte to show only the leftmost 8-pixels. The sprite will appear stretched in X direction because unlike ANTIC/GTIA the VIC sprites can have hires pixels.
93101

94-
You can see how it works in DeskTop if you select a file and then try to drag it.
95-
96-
Missiles are not used.
97-
98-
### Memory
99-
100-
There are severe memory constraints. GEOS on C64 uses all available memory (64K), under I/O space and otherwise.
102+
You can see how it works in DeskTop if you select a file and then try to drag it to the border area (under disk window).
101103

102-
Atari has less RAM available because it can't switch off I/O and allocates whole 1K of RAM for sprites (Players). I put sprites in the same space as C64's color matrix. This saves memory, but mouse pointer occasionally will get corrupted or disappear.
104+
Missiles/Player5 are not used.
103105

104-
Page 0 is used for Kernal and application virtual registers, but addresses used by C64/128 Kernal are not touched (about $80-$FF).
105-
106-
Pages 2 and 3 are not touched by loader, boot code nor GEOS Kernal itself
107-
108-
Pages $04-$5F are free to be used by applications.
109-
110-
Pages $60-$7F are screen backbuffer, but I moved them to bank 0 of expanded RAM, so any native Atari GEOS application (or pathed DeskTop) can use it.
106+
### Input devices
111107

112-
Pages $80-$8B are system variables.
108+
#### Pointer
113109

114-
Pages $8C-$8F on C64/128 are color matrix, on Atari this is reserved for Player0-3 graphics.
110+
A very simple joystick driver controls the mouse pointer. This driver doesn't support acceleration (but it should!). I couldn't get the original joystick driver to work.
115111

116-
Pages $90-$9D are reserved for disk driver, this would be swapped with expanded RAM by *SetDevice* function
112+
Joystick driver can be changed during runtime, but the code has to be ported - you can't use any joystick drivers from GEOS64/128.
117113

118-
Pages $9E-$9F have GEOS Kernal code and variables
114+
#### Keyboard
119115

120-
Pages $A0-$BF contain front buffer for 320x200 hires screen. It is shifted by 56 bytes to match exactly the 4K boundary on 101st line and keep linear addressing.
116+
Mapping of special keys:
117+
118+
| Atari key | function |
119+
|-----------|----------|
120+
| BREAK | unused |
121+
| INV | unused |
122+
| OPTION | C= (for keyboard shortcuts) |
123+
| CAPS | RUN/STOP |
124+
| ESC | <- (left arrow) |
125+
| SHIFT+Delete | Backspace |
126+
| CTRL+1..8 | F1..F8 |
127+
| CTRL+Clear | Home |
128+
| CTRL+Return | LineFeed |
129+
| Tab | Tab |
130+
| Clear | Clear |
131+
| Delete | Del |
132+
| Help | (pound sign) |
133+
134+
Cursor arrows work Atari style (CTRL+arrow key).
121135

122-
Pages $C0-$CF contain GEOS Kernal code
136+
Other console keys (START, SELECT) are not scanned and not used.
123137

124-
Pages $D0-$D7 are I/O
138+
## Memory
125139

126-
Pages $D8-$FE contain GEOS Kernal code, except 16 byte buffers at $DC00-0F and $DD00-0F. Atari Kernal emulates CIA#1 TOD clock in that space and remaining area is a buffer in case a user program wants to use TOD clock from CIA#2, write directly to user port (parallel printer port) or alter keyboard/joystick ports.
140+
There are severe memory constraints. GEOS on C64 uses all available memory (64K), under I/O space and otherwise.
127141

128-
Pages $FE-$FF contain input driver
142+
Atari has less RAM available because it can't switch off I/O and allocates whole 1K of RAM for sprites (Players). I put sprites in the same space as C64's color matrix. This saves memory, but mouse pointer occasionally will get corrupted or disappear. You may also see junk appearing in Player1 area (text prompt).
143+
144+
| Pages | Description |
145+
|-------:|:--------------|
146+
| $00 | used for Kernal and application virtual registers, but addresses used by C64/128 Kernal are not touched (about $80-$FF) |
147+
| $02-$03 | not touched by loader, boot code nor GEOS Kernal itself |
148+
| $04-$5F | free to be used by applications |
149+
| $60-$7F | screen backbuffer, but I moved them to bank 0 of expanded RAM, so any native Atari GEOS application (or pathed DeskTop) can use it |
150+
| $80-$8B | system variables |
151+
| $8C-$8F | on C64/128 this is color matrix, on Atari this is reserved for Player0-3 graphics |
152+
| $90-$9D | reserved for disk driver, this would be swapped with expanded RAM by *SetDevice* function |
153+
| $9E-$9F | GEOS Kernal code and variables |
154+
| $A0-$BF | front buffer for 320x200 hires screen, it is shifted by 56 bytes to match exactly the 4K boundary on 101st line and keep linear addressing |
155+
| $C0-$CF | GEOS Kernal code |
156+
| $D0-$D7 | I/O |
157+
| $D8-$FE | GEOS Kernal code, except 16 byte buffers at $DC00-0F and $DD00-0F. Atari Kernal emulates CIA#1 TOD clock in that space and remaining area is a buffer in case a user program wants to use TOD clock from CIA#2, write directly to user port (parallel printer port) or alter keyboard/joystick ports |
158+
| $FE-$FF | input driver (joystick) |
129159

130160
Extra memory banks:
131161

132-
bank0 $4000-$5FFF contains GEOS Kernal code (using jump table from $D800). Area $5000-$5FFF is reserved for (future) SIO disk driver.
133-
134-
bank0 $6000-$7FFF contains screen back buffer, drawing routines with imprint/recover screen from this area, not from system RAM
135-
136-
bank1 $4000-$4100 contains disk header and block allocation map (BAM)
137-
138-
bank1 $4200-$???? chained directory entries
162+
| bank | area (when mapped in) | description |
163+
|------|------|-------------|
164+
| 0 | $4000-$4FFF | GEOS Kernal code (using jump table from $D800)
165+
| 0 | $5000-$5FFF | is reserved for (future) SIO disk driver |
166+
| 0 | $6000-$7FFF | screen back buffer, drawing routines with imprint/recover screen from this area, not from system RAM |
167+
| 1 | $4000-$40FF | disk header and block allocation map (BAM) |
168+
| 1 | $4100-$41ff | first directory block
139169

140170
all the remaining areas are free to be used by files
141171

142172
Unlike C128 there is no special handling for desk accessories - they will have swap file created on RAM disk, which will be only a little slower than copying memory to reserved space.
143173

144-
### Input devices
145-
146-
#### Pointer
147-
148-
A very simple joystick driver controls the mouse pointer. This driver doesn't support acceleration (but it should!).
149-
150-
Joystick driver can be changed during runtime, but you can't use any joystick drivers from GEOS64/128.
151-
152-
#### Keyboard
153-
154-
Mapping of special keys, mostly untested:
155-
156-
- BREAK, INV do nothing
157-
- OPTION is C= key for keyboard shortcuts
158-
- CAPS is RUN/STOP
159-
- ESC is <- (left arrow)
160-
- SHIFT+Delete is Backspace
161-
- CTRL+1..8 is F1-F8
162-
- CTRL+Clear is Home
163-
- CTRL+Return is LineFeed
164-
- Tab is Tab, Clear is Clear, Delete is Del
165-
- Help is pound sign
166-
- cursor arrows work Atari style (CTRL+arrow key)
167-
168-
Other console keys (START, SELECT) are not scanned and not used.
169-
170174
### Disk drives
171175

172-
There is only one disk device: RAM drive.
173-
174-
The *SetDevice* function is unimplemented but there would be enough space for a second disk driver in expanded RAM.
176+
There is only one disk device available: RAM drive.
175177

176178
The supposed disk driver for SIO devices may use hardware directly or via ROM code. There are functions *InitForIO* and *DoneForIO* that in GEOS64/128 prepare
177179
the system for using ROM routines for I/O. GEOS doesn't touch memory in $0200-$03ff. Some of zero-page registers are used by the system, but they can be easily preserved.
@@ -181,16 +183,18 @@ The requirements for a disk driver are:
181183
- it needs to read/write 256-byte sectors at a time
182184
- sectors are addressed by 8-bit track and sector numbers
183185
- if a device responds to an identifier (disk drive number) it should be possible to change that identifier (DESK TOP uses this feature to swap third drive with one of the first two, but it's purely UI issue, not a system requirement)
186+
- track 0 doesn't exist
187+
- DeskTop 64 only knows about 1541/71/81 drives. For simplicity disk driver may present itself as a 1541, but it must map sector (18,0) to directory header and sector (18,1) to first directory block even if *GetDirHead* and *Get1stDirEntry* functions handle that already. Present RAM drive does just that.
184188

185189
GEOS Kernal implements on top of that a Commodore DOS-like file system. Track number 0 is forbidden, so the largest possible disk/partition (see my [CIAIDE project](https://github.com/ytmytm/c64-ciaide)) may have
186190
up to 255 tracks, 256 sectors each for a total of almost 16MB.
187191

188192
Current RAM drive implementation:
189193

190-
- uses expanded memory that starts in bank 1, bank 0 is reserved for GEOS Kernal
194+
- uses expanded memory that starts in bank 1
191195
- uses tracks with 128 sectors each
192196
- DeskTop ignores track&sector information for disk directory so track 18 (directory) is mapped to track 1
193-
- Limited to 256K (Atari 320K), can be quite easily updated to 1024K if reusing 1581 drive code
197+
- Limited to 256K (Atari 320K), can be quite easily updated to 1024K if reusing 1581 drive code for BAM (block allocation map)
194198

195199
### Printer drivers
196200

@@ -200,7 +204,7 @@ There are none, they will have to be ported. See Disk Drive section for notes ab
200204

201205
There is no CIA time-of-day (TOD) clock, timekeeping is done by counting vertical blank interrupts. During banked operations a short interrupt routine is called and some of these events may be lost.
202206

203-
TOD clock from CIA#1 is emulated by converting current time into BCD and storing into $DC08-$DC0A, where DeskTop can read it directly.
207+
TOD clock from CIA#1 is emulated by converting current time into BCD and storing into $DC08-$DC0A, where DeskTop reads it directly.
204208

205209
There is no support for an alarm clock. It's tied to CIA TOD clock hardware feature.
206210
The system doesn't provide any function to set the alarm (it's done in hardware by a Desk Accessory) you can only choose if/how it should react to the alarm.
@@ -215,10 +219,10 @@ It's best to use Linux or WSL for that.
215219
Install Python3 and cc65 suite and then:
216220

217221
- if you like, run Makefile from `cc65/apps` (this will build filesel.cvt - tiny application launcher for DeskTop replacement among others)
218-
- put the CVT files that you want to have in the system into `ramdisk/cvt/`
219-
- run top-level Makefile to assemble system and link it into XEX file
222+
- put the CVT files that you want to have in the system into `ramdisk/cvt-128k/` or `ramdisk/cvt-320k`
223+
- run top-level Makefile to assemble the system and link it into XEX file
220224

221-
By default Makefile will produce file for a system with 128K (130XE). For more, pass `SYSTEM=atari320` option:
225+
By default Makefile will produce a file for a 128K system (130XE). For more, pass `SYSTEM=atari320` option:
222226
```
223227
make SYSTEM=atari320
224228
```

0 commit comments

Comments
 (0)