Discussion:
Apple II port
(too old to reply)
mark.l...@gmail.com
2021-01-10 19:07:53 UTC
Permalink
Hi guys,

I'm reaching out on behalf of David Murray of the 8-Bit Guy YouTube channel. He is looking for somebody who'd be interested in taking the lead on porting a project (C64 -> Apple II), in exchange for a share of the profits from distributing the game.


Attack of the PETSCII Robots



I'm wondering anyone here might be interested or knows somebody who might be interested?


Thanks.


-Mark
Steve Nickolas
2021-01-13 06:41:44 UTC
Permalink
Post by ***@gmail.com
Hi guys,
I'm reaching out on behalf of David Murray of the 8-Bit Guy YouTube
channel. He is looking for somebody who'd be interested in taking the
lead on porting a project (C64 -> Apple II), in exchange for a share of
the profits from distributing the game.
Attack of the PETSCII Robots
http://youtu.be/6d-B9_iwcl8
I'm wondering anyone here might be interested or knows somebody who might be interested?
Thanks.
-Mark
I don't know how well I'd be able to run such a project though I kind-of
proposed the idea over on his FB group.

Could try to be involved in such, at least. Especially to see if a
"PETSCII mode" could be done well enough on the /// ;p

-uso.
mark.l...@gmail.com
2021-01-13 15:42:51 UTC
Permalink
Steve,

Thanks for the reply!

He's hoping to find somebody he can turn over the 6502 source, maps and graphics to who can run with it. Realistically, such an effort may be best tackled by multiple people. Is there any particular part of the project that you think may be able/interested in working on?

Since Apple III would significantly limit the audience , he's hoping to do a 64k release for Apple II+ and above, or if 128k is needed, for Apple IIe 128k systems and and above.


-Mark
Post by Steve Nickolas
Post by ***@gmail.com
Hi guys,
I'm reaching out on behalf of David Murray of the 8-Bit Guy YouTube
channel. He is looking for somebody who'd be interested in taking the
lead on porting a project (C64 -> Apple II), in exchange for a share of
the profits from distributing the game.
Attack of the PETSCII Robots
http://youtu.be/6d-B9_iwcl8
I'm wondering anyone here might be interested or knows somebody who
might be interested?
Thanks.
-Mark
I don't know how well I'd be able to run such a project though I kind-of
proposed the idea over on his FB group.
Could try to be involved in such, at least. Especially to see if a
"PETSCII mode" could be done well enough on the /// ;p
-uso.
Steve Nickolas
2021-01-13 15:54:45 UTC
Permalink
Post by ***@gmail.com
Steve,
Thanks for the reply!
He's hoping to find somebody he can turn over the 6502 source, maps and
graphics to who can run with it. Realistically, such an effort may be
best tackled by multiple people. Is there any particular part of the
project that you think may be able/interested in working on?
Not sure what elements I'm most useful with. I am not good with graphics
code (because my 6502-fu is weak), but probably could handle other stuff
(because I do know the hardware pretty well).
Post by ***@gmail.com
Since Apple III would significantly limit the audience , he's hoping to
do a 64k release for Apple II+ and above, or if 128k is needed, for
Apple IIe 128k systems and and above.
I think 48K ][+ or 64K ][+ make the most sense (depending on what
operating system is preferred).

ProDOS probably makes more sense even though it pushes the requirements up
to 64K, because it makes the game hard drive installable.

I have basic file and directory access code but it's basically mooched
from PDOS RDOS. It might be enough.

-uso.
mmphosis
2021-01-14 04:40:28 UTC
Permalink
It is a really amazing accomplishment and looks to be a great game for the
PET.

I would start by taking the PET version and porting it to the 48K Apple II.
It should be able to run with few changes in TEXT mode to start. It would
look horrible, and you'd lose 1 line of text as the Apple II is 24 rows, and
the Commodore has 25 rows. This would be a starting point.

PETSC][ ROBOTS

Next, I would do what he did with the C64 and VIC-20 ports from the PET. I
have some ideas on how to jazz up the display like he did on the C64
version: use the Apple hi-res bitmap(s). And perhaps scale back like he did
on the VIC-20 version because there are some technical challenges to the
game play: speed and making things look reasonably good.

* The displays are different.

The (1977) Apple II:
8K bitmap with it's lovely arrangement in memory
effectively 140 x 192 with color (squashed aspect ratio like the VIC-20?)
or, 280 x 192 monochrome (like the PET text but up to 8 times slower because
bitmap)

vs.

The (1982) C64:
1k color map + 1k text
editable fonts and the memory fonts consume
sprites and the memory sprites consume
effectively 320 x 200 without using the bitmap

It probably makes sense to target a 64K ProDOS version, but a 48K DOS 3.3
version should also be possible.

I don't know much about mockingboard, but it might be an option for music.
Some simple sounds out the old Apple $C030 hooter should be possible too.
Steve Nickolas
2021-01-14 08:59:14 UTC
Permalink
Post by mmphosis
It is a really amazing accomplishment and looks to be a great game for the
PET.
Agreed.
Post by mmphosis
I would start by taking the PET version and porting it to the 48K Apple II.
It should be able to run with few changes in TEXT mode to start. It would
look horrible, and you'd lose 1 line of text as the Apple II is 24 rows, and
the Commodore has 25 rows. This would be a starting point.
Agreed.

That it was adjusted for a 22x23 character mode means 40x24 should be more
than doable.
Post by mmphosis
PETSC][ ROBOTS
Next, I would do what he did with the C64 and VIC-20 ports from the PET. I
have some ideas on how to jazz up the display like he did on the C64
version: use the Apple hi-res bitmap(s). And perhaps scale back like he did
on the VIC-20 version because there are some technical challenges to the
game play: speed and making things look reasonably good.
This.
Post by mmphosis
* The displays are different.
8K bitmap with it's lovely arrangement in memory
effectively 140 x 192 with color (squashed aspect ratio like the VIC-20?)
or, 280 x 192 monochrome (like the PET text but up to 8 times slower because
bitmap)
vs.
1k color map + 1k text
editable fonts and the memory fonts consume
sprites and the memory sprites consume
effectively 320 x 200 without using the bitmap
It probably makes sense to target a 64K ProDOS version, but a 48K DOS 3.3
version should also be possible.
If the original could run on a CBM 3032 - that's 32K RAM and a 6502 -
keeping in mind that the DOS is split between the system ROM and the disk
drive's ROM, where on the ][ it's purely RAM...

...and keeping in mind the 8-16K of screen memory that is part of system
memory on the ][, but not on the 3032...

48K with DOS 3.3 is probably doable. 64K with ProDOS is almost certainly
doable.

(And in theory one could do a fully PETSCII version in the text mode on a
///, but that's another story. Simulated PETSCII "text" mode might be an
option for the ][ though...)
Post by mmphosis
I don't know much about mockingboard, but it might be an option for music.
Some simple sounds out the old Apple $C030 hooter should be possible too.
Sounds about right.

-uso.
Scott Alfter
2021-01-14 23:15:33 UTC
Permalink
Post by Steve Nickolas
48K with DOS 3.3 is probably doable. 64K with ProDOS is almost certainly
doable.
Another point in ProDOS's favor: you can easily hook in a Hi-Res character
generator that can then be manipulated with the usual PRINT, HTAB, VTAB,
etc. commands. I wrote one years ago...thought it was DHR-only, but it does
Hi-Res as well. I went looking through my archives, found it, and put it up
on GitLab:

https://gitlab.com/salfter/hr-dhr-character-generator/

Look under releases for the original archive. For PETSCII, you'd need to
create the additional characters and modify the generator code to use them.
I'd guess the easiest way to do that would be to create a second character
set and pull from that in inverse mode. You'll lose inverse text, but it'll
let you define 96 (or maybe 128?) completely different characters.

_/_
/ v \ Scott Alfter (remove the obvious to send mail)
(IIGS( https://alfter.us/ Top-posting!
\_^_/ >What's the most annoying thing on Usenet?
Steve Nickolas
2021-01-15 04:50:11 UTC
Permalink
Post by Scott Alfter
Post by Steve Nickolas
48K with DOS 3.3 is probably doable. 64K with ProDOS is almost certainly
doable.
Another point in ProDOS's favor: you can easily hook in a Hi-Res character
generator that can then be manipulated with the usual PRINT, HTAB, VTAB,
etc. commands. I wrote one years ago...thought it was DHR-only, but it does
Hi-Res as well. I went looking through my archives, found it, and put it up
https://gitlab.com/salfter/hr-dhr-character-generator/
Look under releases for the original archive. For PETSCII, you'd need to
create the additional characters and modify the generator code to use them.
I'd guess the easiest way to do that would be to create a second character
set and pull from that in inverse mode. You'll lose inverse text, but it'll
let you define 96 (or maybe 128?) completely different characters.
_/_
/ v \ Scott Alfter (remove the obvious to send mail)
(IIGS( https://alfter.us/ Top-posting!
\_^_/ >What's the most annoying thing on Usenet?
It might be more ideal to decouple it from PRINT and call it directly
seeing that we are dealing with a program written in 6502, rather than
BASIC - that way you could theoretically go all the way up to 256 glyphs,
or maybe more as necessary. (Even the full C64 version uses character
graphics, albeit with a loadable font; something which the Apple ][ cannot
do but which, as above, is not hard to fake.)

For what it's worth, a few days ago I created a font in the raw format
used by my Apple /// software which implements PETSCII as well as I
figured I could within the limit of the system, i.e., that the /// (like
the ][) has a 7x8 character box instead of the 8x8 of the PET (and other
Commodore systems).

The C64 version has two binaries: one uses the PET font and the other uses
a custom font. (Note that PET fonts are essentially the same as CGA
fonts; the 4032 even uses a clone of the CRTC chip found in MDA, CGA and
EGA display adaptors. I once wrote a PET emulator that exploited this
fact.

-uso.
Steve Nickolas
2021-01-15 06:53:03 UTC
Permalink
Here is my attempt at approximating the 128 PETSCII (graphics mode) glyphs
for an Apple ][.

Obviously this is not the route one would want to take to implement Attack
of the PETSCII Robots on a ][, but if one wanted to do a "PET-emulation
mode", this was what I came up with.

Loading Image... for an idea of how this character set
looks when fed through the Apple /// character generator.

-uso.

0800:1C 22 2A 3A 1A 02 3C 00 08 14 22 3E 22 22 22 00
0810:1E 24 24 1C 24 24 1E 00 18 24 02 02 02 24 18 00
0820:0E 14 24 24 24 14 0E 00 3E 02 02 0E 02 02 3E 00
0830:3E 02 02 0E 02 02 02 00 18 24 02 32 22 24 18 00
0840:22 22 22 3E 22 22 22 00 1C 08 08 08 08 08 1C 00
0850:38 10 10 10 10 12 0C 00 22 12 0A 06 0A 12 22 00
0860:02 02 02 02 02 02 3E 00 22 36 2A 2A 22 22 22 00
0870:22 22 26 2A 32 22 22 00 1C 22 22 22 22 22 1C 00
0880:1E 22 22 1E 02 02 02 00 1C 22 22 22 2A 12 2C 00
0890:1E 22 22 1E 0A 12 22 00 1C 22 02 1C 20 22 1C 00
08A0:3E 08 08 08 08 08 08 00 22 22 22 22 22 22 1C 00
08B0:22 22 22 14 14 08 08 00 22 22 22 2A 2A 36 22 00
08C0:22 22 14 08 14 22 22 00 22 22 22 1C 08 08 08 00
08D0:3E 20 10 08 04 02 3E 00 1C 04 04 04 04 04 1C 00
08E0:00 02 04 08 10 20 00 00 1C 10 10 10 10 10 1C 00
08F0:00 08 1C 2A 08 08 08 08 00 00 04 02 7F 02 04 00
0900:00 00 00 00 00 00 00 00 08 08 08 08 00 00 08 00
0910:14 14 14 00 00 00 00 00 14 14 3E 14 3E 14 14 00
0920:08 3C 0A 1C 28 1E 08 00 06 26 10 08 04 32 30 00
0930:04 0A 0A 04 2A 12 2C 00 10 10 08 00 00 00 00 00
0940:10 08 04 04 04 08 10 00 04 08 10 10 10 08 04 00
0950:08 2A 1C 3E 1C 2A 08 00 00 08 08 3E 08 08 00 00
0960:00 00 00 00 00 08 08 04 00 00 00 3E 00 00 00 00
0970:00 00 00 00 00 0C 0C 00 00 20 10 08 04 02 00 00
0980:1C 22 32 2A 26 22 1C 00 08 0C 0A 08 08 08 3E 00
0990:1C 22 20 18 04 02 3E 00 1C 22 20 18 20 22 1C 00
09A0:10 18 14 12 3E 10 10 00 3E 02 1E 20 20 22 1C 00
09B0:18 04 02 1E 22 22 1C 00 3E 22 10 08 08 08 08 00
09C0:1C 22 22 1C 22 22 1C 00 1C 22 22 3C 20 10 0C 00
09D0:00 00 08 00 00 08 00 00 00 00 08 00 00 08 08 04
09E0:30 18 0C 06 0C 18 30 00 00 00 3E 00 3E 00 00 00
09F0:06 0C 18 30 18 0C 06 00 1C 22 20 10 08 00 08 00
0A00:00 00 00 00 7F 00 00 00 08 1C 3E 7F 7F 1C 3E 00
0A10:08 08 08 08 08 08 08 08 00 00 00 7F 00 00 00 00
0A20:00 00 7F 00 00 00 00 00 00 7F 00 00 00 00 00 00
0A30:00 00 00 00 00 7F 00 00 04 04 04 04 04 04 04 04
0A40:20 20 20 20 20 20 20 20 00 00 00 00 03 04 08 08
0A50:08 08 08 10 60 00 00 00 08 08 08 04 03 00 00 00
0A60:01 01 01 01 01 01 01 7F 01 03 06 0C 18 30 60 40
0A70:40 60 30 18 0C 06 03 01 7F 01 01 01 01 01 01 01
0A80:7F 40 40 40 40 40 40 40 00 1C 3E 3E 3E 3E 1C 00
0A90:00 00 00 00 00 00 7F 00 36 7F 7F 7F 3E 1C 08 00
0AA0:02 02 02 02 02 02 02 02 00 00 00 00 60 10 08 08
0AB0:41 63 36 1C 1C 36 63 41 00 1C 22 22 22 22 1C 00
0AC0:08 1C 2A 77 2A 08 08 00 20 20 20 20 20 20 20 20
0AD0:08 1C 3E 7F 3E 1C 08 00 08 08 08 08 7F 08 08 08
0AE0:05 0A 05 0A 05 0A 05 0A 08 08 08 08 08 08 08 08
0AF0:00 00 40 3E 15 14 14 00 7F 7E 7C 78 70 60 40 00
0B00:00 00 00 00 00 00 00 00 0F 0F 0F 0F 0F 0F 0F 0F
0B10:00 00 00 00 7F 7F 7F 7F 7F 00 00 00 00 00 00 00
0B20:00 00 00 00 00 00 00 7F 01 01 01 01 01 01 01 01
0B30:55 2A 55 2A 55 2A 55 2A 40 40 40 40 40 40 40 40
0B40:00 00 00 00 55 2A 55 2A 7F 3F 1F 0F 07 03 01 00
0B50:60 60 60 60 60 60 60 60 08 08 08 08 78 08 08 08
0B60:00 00 00 00 70 70 70 70 08 08 08 08 78 00 00 00
0B70:00 00 00 00 0F 08 08 08 00 00 00 00 00 00 7F 7F
0B80:00 00 00 00 78 08 08 08 08 08 08 08 7F 00 00 00
0B90:00 00 00 00 7F 08 08 08 08 08 08 08 0F 08 08 08
0BA0:03 03 03 03 03 03 03 03 07 07 07 07 07 07 07 07
0BB0:70 70 70 70 70 70 70 70 7F 7F 00 00 00 00 00 00
0BC0:7F 7F 7F 00 00 00 00 00 00 00 00 00 00 7F 7F 7F
0BD0:40 40 40 40 40 40 40 7F 00 00 00 00 0F 0F 0F 0F
0BE0:70 70 70 70 00 00 00 00 08 08 08 08 0F 00 00 00
0BF0:0F 0F 0F 0F 00 00 00 00 0F 0F 0F 0F 70 70 70 70
I am Rob
2021-01-16 01:50:22 UTC
Permalink
Post by Steve Nickolas
Here is my attempt at approximating the 128 PETSCII (graphics mode) glyphs
for an Apple ][.
Plugged them in and the font looks good. Now will load the graphics screen into an editor and see what each character looks like with a color fill.
I am Rob
2021-01-16 01:48:11 UTC
Permalink
Post by Steve Nickolas
Post by Scott Alfter
Another point in ProDOS's favor: you can easily hook in a Hi-Res character
generator that can then be manipulated with the usual PRINT, HTAB, VTAB,
etc. commands. I wrote one years ago...thought it was DHR-only, but it does
Hi-Res as well. I went looking through my archives, found it, and put it up
https://gitlab.com/salfter/hr-dhr-character-generator/
Look under releases for the original archive. For PETSCII, you'd need to
create the additional characters and modify the generator code to use them.
I'd guess the easiest way to do that would be to create a second character
set and pull from that in inverse mode. You'll lose inverse text, but it'll
let you define 96 (or maybe 128?) completely different characters.
It might be more ideal to decouple it from PRINT and call it directly
seeing that we are dealing with a program written in 6502, rather than
BASIC - that way you could theoretically go all the way up to 256 glyphs,
or maybe more as necessary. (Even the full C64 version uses character
graphics, albeit with a loadable font; something which the Apple ][ cannot
do but which, as above, is not hard to fake.)
I can do a little better. The HRCG I am using just needs one normal set defined to save memory.
To get inverse characters, just type INVERSE in applesoft or LDA #$63 : STA $32 in ML.
And can have way more than 256 glyphs. Each page of memory can have 32 glyphs and the hi-byte of the page is entered with just a POKE. Can be advanced 1 page at a time and use the same 32 text characters to print each glyph under applesoft, or advance 8 pages and have 2, 3 or more sets of 256 glyphs from ML by just adjusting the hi-byte.

The only bad thing about using color on the Apple II are that his tiles are based on 3x3 characters instead of 4x3.
Steve Nickolas
2021-01-16 09:51:17 UTC
Permalink
Post by I am Rob
The only bad thing about using color on the Apple II are that his tiles
are based on 3x3 characters instead of 4x3.
There is the "VIC option" of making the main game window double-width,
although I don't know whether it would be worth it.

-uso.
mark.l...@gmail.com
2021-01-16 16:56:09 UTC
Permalink
Quick update, for anyone who would like to contribute -

Ian Brumby setup a slack channel on Apple2Infinitum. David Murray is on there providing additional information.

Apple2Infinitum
http://apple2.gs:3000/
Channel: #petscii-robots

mark.l...@gmail.com
2021-01-14 15:42:07 UTC
Permalink
mmphosis,

Thanks for your reply. Sounds like you have some great ideas!

Are you be interested in taking the lead on a project to do this port?



-Mark
Post by mmphosis
It is a really amazing accomplishment and looks to be a great game for the
PET.
I would start by taking the PET version and porting it to the 48K Apple II.
It should be able to run with few changes in TEXT mode to start. It would
look horrible, and you'd lose 1 line of text as the Apple II is 24 rows, and
the Commodore has 25 rows. This would be a starting point.
PETSC][ ROBOTS
Next, I would do what he did with the C64 and VIC-20 ports from the PET. I
have some ideas on how to jazz up the display like he did on the C64
version: use the Apple hi-res bitmap(s). And perhaps scale back like he did
on the VIC-20 version because there are some technical challenges to the
game play: speed and making things look reasonably good.
* The displays are different.
8K bitmap with it's lovely arrangement in memory
effectively 140 x 192 with color (squashed aspect ratio like the VIC-20?)
or, 280 x 192 monochrome (like the PET text but up to 8 times slower because
bitmap)
vs.
1k color map + 1k text
editable fonts and the memory fonts consume
sprites and the memory sprites consume
effectively 320 x 200 without using the bitmap
It probably makes sense to target a 64K ProDOS version, but a 48K DOS 3.3
version should also be possible.
I don't know much about mockingboard, but it might be an option for music.
Some simple sounds out the old Apple $C030 hooter should be possible too.
Michael 'AppleWin Debugger Dev'
2021-01-14 18:48:34 UTC
Permalink
Attack of the PETSCII Robots
Michael's misc. reverse engineering notes:

For those not familiar with the PRG format it has this format:

* 2-byte header, little endian load address
* n bytes of data

That is why all these files appear to be 2 bytes bigger then they need to be.

| File Name | Size | Glyphs | Width | Height | Comment |
|:------------|-----:|-------:|------:|-------:|:--------------|
| PETFONT.PRG | 2050 | 256 | 8 px | 8 px | 8 bytes/glyph |
| GFXFONT.PRG | 4098 | 512 | 8 px | 8 px | 8 bytes/glyph |
| TILESET.C64 | 5121 | 640 | 8 px | 8 px | 16x16px tile |
| LEVEL-? | 8962 | | 128 | 64 |768 byte header|
| in game | n/a | n/a | 11 | 7 | |

To view LEVEL-A.PRG into GIMP:
1. Rename the file to have an .data extension
2. File > Open
3. Select File Type: Raw image data
4. Image Type: Gray 8 bits
5. Offset: 770 <-- 2 bytes PRG header + 768 byte header!
6. Width: 128
7. Height: 64

Screen is 40x25 chars
Game window is 33x21 chars
Tiles are 16x16 px, or 2x2 chars.

The screen is laid out like this:

0 1 2 3 x
0123456789012345678901234567890123456789 y
00 02 04 06 08 0A 0C 0E 10WEAPON 00
01 03 05 07 09 0B 0D 0F | 01
11 13 15 17 19 1B 1D 1F 21 02
12 14 16 18 1A 1C 1E 20 | 03
22 24 26 28 2A 2C 2E 30 32 04
23 25 27 29 2B 2D 2F 31 | 05
33 35 37 39 3B 3D 3F 41 43------ 06
34 36 38 3A 3C 3E 40 42 | ITEM 07
44 46 48 4A 4C 4E 50 52 54 08
45 47 49 4B 4D 4F 51 53 | 09
55 57 59 5B 5D 5F 61 63 65 10
56 58 5A 5C 5E 60 62 64 | 11
66 68 6A 6C 6E 70 72 74 76 12
67 69 6B 6D 6F 71 73 75 |------ 13
77 79 7B 7D 7F 81 83 85 87 KEYS 14
78 7A 7C 7E 80 82 84 86 | 15
88 8A 8C 8E 90 92 94 96 98 16
89 8B 8D 8F 91 93 95 97 +------ 17
99 9B 9D 9F A1 A3 A5 A7 A9 18
9A 9C 9E A0 A2 A4 A6 A8 | 19
AA AC AE B0 B2 B4 B6 B8 BA 20
--AB--AD--AF--B1--B3--B5--B7--B9-|------ 21
|HEALTH 22
|xxxxxx 23
|++++++ 24

The Rulers (x axis and y axis) are in Decimal
The sprite location is in hex

NOTE: You will need to REVERSE the bits to see the graphics properly on the Apple 2

i.e.
Glyph "@"
From: 1C 22 4A 56 4C 20 1E 00
To..: 38 44 52 6A 32 04 78 00



With VICE (C64 Emulator) press Alt-H to enter the debugger

NOTE: The default debugger font makes characters to be unreadable garbage.
To change it so it is readable:
Settings > Settings (Alt-O) > Host > Monitor > Monitor Font

To view registers:
R

To view help:
help

To view LEVEL-A in memory as a hexdump:
M 5D00

There is a function at 3F67 that scans the level header data (map state?)
D 3F67

Michael
Loading...