2017-10-22 15:14:18 +00:00
|
|
|
# Apple 2 DHGR/HGR BYTE Inspector
|
2016-01-24 15:53:20 +00:00
|
|
|
|
2017-10-22 15:20:33 +00:00
|
|
|
![hgr byte inspector screenshot](screenshots/hgrbyte.png?raw=true)
|
|
|
|
![dhgr byte inspector screenshot](screenshots/dhgrbyte.png?raw=true)
|
|
|
|
![view screenshot](screenshots/viewdhgr.png?raw=true)
|
2016-08-03 17:49:34 +00:00
|
|
|
|
2017-10-30 16:17:23 +00:00
|
|
|
|
2017-10-22 15:20:33 +00:00
|
|
|
# Instructions
|
|
|
|
|
|
|
|
1. Start AppleWin
|
|
|
|
2. F3 to select Slot 6, Drive 1
|
|
|
|
3. Open: `hgrbyte.dsk`
|
2017-10-26 23:33:56 +00:00
|
|
|
4. Select BASIC.SYSTEM
|
|
|
|
5. `BLOAD TUT.DHGR`
|
2017-10-30 16:17:23 +00:00
|
|
|
6. `-DHGR.BYTE`
|
|
|
|
|
|
|
|
|
|
|
|
# History
|
|
|
|
|
|
|
|
Ver 32.
|
|
|
|
- Fixed bug: Restore cursor position after when using sprite copy
|
2017-10-26 23:33:56 +00:00
|
|
|
|
2017-10-30 03:27:05 +00:00
|
|
|
Ver 31.
|
2021-07-04 15:47:08 +00:00
|
|
|
- Added `:` to save a sprite to memory from the DHGR screen
|
2017-10-30 03:27:05 +00:00
|
|
|
- Added `;` to copy a sprite from to the DHGR screen
|
2021-07-04 15:47:08 +00:00
|
|
|
- Added `SPACE` to toggle sprite top left or bottom right corners
|
|
|
|
- Added `M` to reset sprite bounding box
|
2017-10-30 03:27:05 +00:00
|
|
|
|
2017-10-29 05:25:31 +00:00
|
|
|
Ver 30.
|
|
|
|
- Added beep for illegal keys
|
|
|
|
- Added sprite info
|
|
|
|
- Added version number in bottom right
|
|
|
|
|
|
|
|
Ver 28.
|
|
|
|
- Fixed hex input
|
|
|
|
|
2017-10-26 23:33:56 +00:00
|
|
|
Ver 27.
|
|
|
|
- Ripped out ROM output routines and replaced with native code for speed
|
2017-10-26 23:35:46 +00:00
|
|
|
- Updated the status bar so that the saved bits and reverse bits are displayed
|
2017-10-26 23:33:56 +00:00
|
|
|
- Added x/2 byte column output
|
|
|
|
- Shortened memory bank indicator "AUX/MAIN" to "A/M"
|
2017-10-22 15:20:33 +00:00
|
|
|
|
|
|
|
|
|
|
|
# Keys:
|
2016-01-24 15:53:20 +00:00
|
|
|
|
2016-02-22 04:40:35 +00:00
|
|
|
```
|
2016-01-24 15:53:20 +00:00
|
|
|
ESC Quit
|
2017-10-22 15:14:18 +00:00
|
|
|
g Toggle fullscreen
|
2016-01-24 15:53:20 +00:00
|
|
|
G Toggle fullscreen
|
|
|
|
|
2017-10-22 15:14:18 +00:00
|
|
|
i Move cursor up
|
|
|
|
j Move cursor left
|
|
|
|
k Move cursor right
|
|
|
|
l Move cursor down
|
|
|
|
|
2016-01-24 15:53:20 +00:00
|
|
|
I Move cursor up
|
|
|
|
J Move cursor left
|
|
|
|
K Move cursor right
|
|
|
|
L Move cursor down
|
|
|
|
|
|
|
|
^I Move cursor to col 0
|
|
|
|
^J Move cursor to col 39
|
|
|
|
^K Move cursor to row 0
|
|
|
|
^L Move cursor to row 191
|
|
|
|
RET Center cursor
|
|
|
|
|
|
|
|
0..9 "Append" hex nibble to cursor byte
|
|
|
|
A..F
|
|
|
|
|
|
|
|
! Toggle bit 0
|
|
|
|
@ Toggle bit 1
|
|
|
|
# Toggle bit 2
|
|
|
|
$ Toggle bit 3
|
|
|
|
% Toggle bit 4
|
|
|
|
^ Toggle bit 5
|
|
|
|
& Toggle bit 6
|
|
|
|
* Toggle bit 7 (high bit)
|
|
|
|
SPC Toggle high bit of byte (bit 7)
|
|
|
|
( Set byte to $FF (Shift-9)
|
|
|
|
) Clear byte to $00 (Shift-0)
|
|
|
|
` Flip all bits
|
|
|
|
~ Flip all bits
|
|
|
|
|
|
|
|
, Shift byte left (with zero)
|
|
|
|
. Shift byte right (with one )
|
|
|
|
< Shift byte left (with zero)
|
|
|
|
> Shift byte right (with one )
|
|
|
|
[ Rotate byte left
|
|
|
|
] Rotate byte right
|
|
|
|
|
2016-02-22 04:55:08 +00:00
|
|
|
- Copy byte (Save cursor byte to temporary)
|
|
|
|
= Paste byte (Set cursor byte from temporary)
|
2016-02-22 04:40:35 +00:00
|
|
|
```
|
2016-01-24 15:53:20 +00:00
|
|
|
|
2017-10-22 15:14:18 +00:00
|
|
|
# DHGR Colors
|
|
|
|
|
|
|
|
```Basic
|
|
|
|
0 DIM M(16)
|
|
|
|
1 FOR I=0 TO 7:READ M(I*2):M(I*2+1)=M(I*2)+8:NEXT:GOTO 9
|
|
|
|
2 POKE A,X:RETURN
|
|
|
|
3 B3=C *2:IF B3 > 15 THEN B3 = B3 - 15
|
|
|
|
4 B2=B3*2:IF B2 > 15 THEN B2 = B2 - 15
|
|
|
|
5 B1=B2*2:IF B1 > 15 THEN B1 = B1 - 15
|
|
|
|
6 B0=B1*2:IF B0 > 15 THEN B0 = B0 - 15
|
|
|
|
7 RETURN
|
|
|
|
9 P=8192:PRINT CHR$(12);CHR$(21):REM 40-COL
|
|
|
|
10 TEXT:HOME:HGR2:HGR
|
|
|
|
20 FOR Y=0 TO 7
|
|
|
|
30 Z=P + Y*1024
|
|
|
|
40 A=Z+P+1:GOSUB 110
|
|
|
|
50 A=Z+128:GOSUB 210
|
|
|
|
60 A=Z+P+256:GOSUB 110
|
|
|
|
70 A=Z+384+1:GOSUB 210
|
|
|
|
80 NEXT
|
|
|
|
90 POKE 3*P-2,0:POKE 3*P-1,32:REM SQUIRT PREVIEW:DHGR
|
|
|
|
100 VTAB 22:PRINT "BSAVE PAL.DHGR,A$2000,L$4000":END
|
|
|
|
110 FOR C=0 TO 15:REM Aux/Main/Aux/Main
|
|
|
|
120 GOSUB 3:IF C=0 THEN 190
|
|
|
|
130 A = A-P: X=M(B0):GOSUB 2
|
|
|
|
140 A = A+P: X=M(B1):GOSUB 2
|
|
|
|
150 A=A+1
|
|
|
|
160 A = A-P: X=M(B2):GOSUB 2
|
|
|
|
170 A = A+P: X=M(B3):GOSUB 2
|
|
|
|
180 A=A+1:PRINT
|
|
|
|
190 NEXT:RETURN
|
|
|
|
210 FOR C=0 TO 15:REM Main/Aux/Main/Aux
|
|
|
|
220 GOSUB 3:IF C=0 THEN 290
|
|
|
|
230 A = A+P: X=M(B0):GOSUB 2
|
|
|
|
240 A=A+1
|
|
|
|
250 A = A-P: X=M(B1):GOSUB 2
|
|
|
|
260 A = A+P: X=M(B2):GOSUB 2
|
|
|
|
270 A=A+1
|
|
|
|
280 A = A-P: X=M(B3):GOSUB 2
|
|
|
|
290 NEXT:RETURN
|
2021-07-04 15:48:08 +00:00
|
|
|
900 REM DHGR: 16 colors
|
|
|
|
900 REM $00,$04,$44,$4C,$22,$2A,$66,$6E
|
2017-10-22 15:14:18 +00:00
|
|
|
901 REM $11,$19,$55,$5D,$33,$3B,$77,$7F
|
|
|
|
902 DATA 0,68
|
|
|
|
903 DATA 34,102
|
|
|
|
904 DATA 17,85
|
|
|
|
905 DATA 51,119
|
|
|
|
```
|
|
|
|
|
|
|
|
Memory order is:
|
|
|
|
|
|
|
|
* $2000 -> AUX $2000
|
|
|
|
* $4000 -> MAIN $2000
|
|
|
|
|
2017-10-22 15:20:33 +00:00
|
|
|
To view without the editor you'll need a [DHGR Viewer](src/dhgr.view.s)
|
|
|
|
|
2021-07-04 15:48:21 +00:00
|
|
|
Also included is `squirt` -- a File Manager has a DHGR previewer built-in.
|
2017-10-22 15:20:33 +00:00
|
|
|
|
2017-10-22 15:14:18 +00:00
|
|
|
|
|
|
|
# Tutankhamun
|
|
|
|
|
2017-10-22 22:27:52 +00:00
|
|
|
Source image from BrutalDeluxe's [LZ4 page](https://www.brutaldeluxe.fr/products/crossdevtools/lz4/index.html)
|
|
|
|
|
2017-10-22 15:20:33 +00:00
|
|
|
Converted to dhgr via Sheldon's [tohgr](http://wsxyz.net/tohgr.html)
|
2017-10-22 15:14:18 +00:00
|
|
|
|
|
|
|
```
|
|
|
|
tohgr.mac -dhgr tut.png
|
|
|
|
```
|
|
|
|
|
2017-10-22 15:25:00 +00:00
|
|
|
![Tutankhamun original](pics/tut.png?raw=true)
|
2017-10-22 15:20:33 +00:00
|
|
|
|
2017-10-22 15:25:00 +00:00
|
|
|
![Tutankhamun converted](pics/tut_dhgr.png?raw=true)
|
2017-10-22 15:20:33 +00:00
|
|
|
|
2017-10-22 15:14:18 +00:00
|
|
|
|
2017-10-22 22:27:52 +00:00
|
|
|
|
|
|
|
|
2017-10-22 15:14:18 +00:00
|
|
|
# Assembler
|
|
|
|
|
|
|
|
* [Merlin32](https://www.brutaldeluxe.fr/products/crossdevtools/merlin/)
|
|
|
|
|
|
|
|
|
|
|
|
# License
|
|
|
|
|
|
|
|
* [WTFPL](http://www.wtfpl.net/)
|
|
|
|
|