Date   
Re: LZ77 decompressor in 1802 assembly

bill rowe
 

Looking at it, translating it to assembler makes a lot of sense. The logic is fairly simple and it’s the data that’s taking up most of the space.

Good luck, I look forward to playing the results.

On Nov 8, 2019, at 10:54 AM, Richard Goedeken <richard@...> wrote:

Compilation is not a bad idea. I don't mind the exercise of porting to assembly though; it's fun. I think I'm about a third of the way done. You can get the source code from here:

http://www.ifarchive.org/indexes/if-archive/scott-adams/games/

The enhanced version is in the file called advland2019.zip. I fixed one additional minor bug (which was present in the original C and probably BASIC code) while porting to assembly, but I'm working off the same source code.

The problem with using a compiler is that I'm really constrained for space. Since just the raw data takes up more space than what's available in the ROM, necessitating compression, the code will have to be very compact.

Richard

On 11/8/19 4:22 AM, bill rowe wrote:
Richard: why not compile the C version for the 1802? I’d be happy to help.
Can I see the source for fun?

--
Bill Rowe
Olduino - an arduino for the first of us
https://olduino.wordpress.com/about-2/about/

Re: Emma 02 - V1.33 #Emulator #microboards #mcds

Dave Ruske
 

Really fantastic work, Marcel!

Dave

On Nov 7, 2019, at 3:15 PM, Marcel van Tongeren <marcel.v.tongeren@...> wrote:

Just released Emma 02 - V1.33, took me exactly 2 months.....

Re: LZ77 decompressor in 1802 assembly

Lee Hart
 

Richard Goedeken wrote:
Lee,

That is very interesting to hear. Did Dave have any external storage
with his 1802 machine running Zork?
Yes; he was running it on his Retro-Elf, which has an ATA-IDE interface card (using a solid-state memory card) for mass storage.

http://www.astrorat.com/cosmacelf/retroelfproject.html

That said, ZORK1 is only 83k. More than 64k; but not impossibly large. I don't know how big the Z-Machine program is for the 1802, but I think it was about 16k for the 8080/Z80.

So, you would need roughly 100k of memory.

One way is to find a better compression scheme. That's possible; newer methods have been devised since the 1970's.

Another way is to add some kind of mass memory. The Retro-Elf and Elf2k added ATA-IDE cards. My Z80MC added serial SD-card. Someone on this list added an SPI serial EEPROM (little 8-pin DIPs that come as large as 256k).

Another way would be to add bank-switched memory. For instance, use a big EPROM or RAM, and switch the extra address lines with an 1802 output port. Every Elf has at least one output port; the front panel LEDs. :-)

If it's in an EPROM, you only have to load it once. For example, put ZORK, the Z-machine program, and your drivers in a 27C010 128k EPROM. Let's say you're putting it in a Membership Card: Address the EPROM at 32-64k, and RAM at 0-32k. Now it works like any Elf, with RAM at the bottom.

Wire the EPROM's extra A15 and A16 address lines to the OUT4 port bits 0 and 1. Put the Z-machine program in the 1st 32k, and ZORK in the next 3 32k banks (96k total available).

To run ZORK, you would toggle in a little program to set the OUT4 port to 0 (selects bank 0 in the EPROM), and then LBR to 8000h. This runs your driver to initialize things, and then runs the Z-machine. There should also be room in that 32k bank for a monitor program and more.

When the Z-machine program wants to read from the ZORK data file, it would jump to a program in RAM that switches banks, reads the specified data, and returns to bank 0 to execute it.

I considered Zork as well when I started this, but I concluded that
it would be impossible to get on the membership card, even using all
32k of ROM.
"Impossible"? Well now, I wouldn't say that...

There is FORTH. It is one of the few (maybe the only) language that can produce programs *smaller* than machine language.

In the 1970's, I worked on an 1802 project with extremely tight memory requirements. It was a pocket data logger that had to run for a week on a 9v battery. In those days, the biggest EPROM we could get was 1k bytes. (And since it wasn't CMOS, to save power we loaded it into RAM, and then executed it from there).

Try as we might, we could not get the program into 1k. Then we bought FORTH. It reduced the program size enough to fit!

Of course, FORTH itself is machine language. But once you see the tricks it uses, you see how it reduces program size. It creates a virtual machine with a smaller but more powerful instruction set. Your program is written with it, and takes much less memory. Then FORTH uses a tiny interpreter to convert these tokens into subroutine calls and "thread" them together.

Real FORTH Inc. FORTH is expensive. I wound up writing my own version (8TH), optimized for smaller programs.

This experience makes me believe that a Z-machine written in FORTH, and a more efficient compression algorithm for the DATA file, could make it all fit in 64k. :-)

Lee Hart

--
There is a computer disease that anybody who works with computers knows
about. It's very serious, and interferes completely with your work. The
trouble with computers is that you 'play' with them! (Richard Feynman)
--
Lee Hart, 814 8th Ave N, Sartell MN 56377, www.sunrise-ev.com

Re: LZ77 decompressor in 1802 assembly

Richard Goedeken <richard@...>
 

Lee,

That is very interesting to hear. Did Dave have any external storage with his
1802 machine running Zork? I considered Zork as well when I started this, but I concluded that it would be impossible to get on the membership card, even using all 32k of ROM. If I remember right, this was originally written for a PDP11 with 1MB of RAM, and the Z-machine was created by the guys at Infocom in order to make it run on the 8-bit microcomputers of the era with only 32k of RAM and a 180k disk. I always thought that was a brilliant design.

Richard

On 11/7/19 8:53 PM, Lee Hart wrote:
From: Richard Goedeken <richard@...>
That's hilarious; someone else had the exact same idea?
Great minds think alike. :-)

I searched via google and the vcfed.org website but couldn't find anything about it.
I know that Dave Runkle was running ZORK on an 1802 at VCFMW last year. So,
he had an 1802 version of the Z-Machine interpreter. You might ask him
about it.

When I first mentioned my idea to Chuck, he suggested putting the BASIC program image in the EPROM, but with only 12k of space free I don't think
it would fit.
RCA BASIC3 is 12k, if I remember correctly. Chuck's version may be a little
bigger with his additions.
But if you get a compression program working, you could always compress
BASIC, and then load it and execute it from RAM. :-)

Re: LZ77 decompressor in 1802 assembly

Richard Goedeken <richard@...>
 

Compilation is not a bad idea. I don't mind the exercise of porting to assembly though; it's fun. I think I'm about a third of the way done. You can get the source code from here:

http://www.ifarchive.org/indexes/if-archive/scott-adams/games/

The enhanced version is in the file called advland2019.zip. I fixed one additional minor bug (which was present in the original C and probably BASIC code) while porting to assembly, but I'm working off the same source code.

The problem with using a compiler is that I'm really constrained for space. Since just the raw data takes up more space than what's available in the ROM, necessitating compression, the code will have to be very compact.

Richard

On 11/8/19 4:22 AM, bill rowe wrote:
Richard: why not compile the C version for the 1802? I’d be happy to help.
Can I see the source for fun?

Re: LZ77 decompressor in 1802 assembly

bill rowe
 

Richard: why not compile the C version for the 1802? I’d be happy to help.

Can I see the source for fun?

On Nov 7, 2019, at 10:30 PM, Richard Goedeken <richard@...> wrote:

That's hilarious; someone else had the exact same idea? :) I searched via google and the vcfed.org website but couldn't find anything about it.

When I first mentioned my idea to Chuck, he suggested putting the BASIC program image in the EPROM, but with only 12k of space free I don't think it would fit.

I am porting an enhanced version of this game (Adventureland), written in C (which I worked on earlier this year) to 1802 assembly language. Hopefully I will be able to fit it in the available ROM space with compression; it's gonna be really cool. I'll put the code on github when I'm done, and I'll release a binary ROM image for a membership card with 32k ROM in the upper memory space and 32k RAM in the lower.

Richard

On 11/7/19 3:52 PM, Douglas wrote:
If it matters to you, I believe the scott adams port has been done. If I'm not mistaken I saw the game engine running one of the games on a Elf 2000 at VCF East a few years ago by a member on the east coast... can't remember his name, but you could query on the VCF mailing list.

--
Bill Rowe
Olduino - an arduino for the first of us
https://olduino.wordpress.com/about-2/about/

Re: LZ77 decompressor in 1802 assembly

Lee Hart
 

From: Richard Goedeken <richard@...>
That's hilarious; someone else had the exact same idea?
Great minds think alike. :-)

I searched via google and the vcfed.org website but couldn't find
anything about it.
I know that Dave Runkle was running ZORK on an 1802 at VCFMW last year. So, he had an 1802 version of the Z-Machine interpreter. You might ask him about it.

When I first mentioned my idea to Chuck, he suggested putting the BASIC
program image in the EPROM, but with only 12k of space free I don't think it
would fit.
RCA BASIC3 is 12k, if I remember correctly. Chuck's version may be a little bigger with his additions.

But if you get a compression program working, you could always compress BASIC, and then load it and execute it from RAM. :-)


--
Excellence does not require perfection. -- Henry James
--
Lee A. Hart http://www.sunrise-ev.com

Re: LZ77 decompressor in 1802 assembly

Richard Goedeken <richard@...>
 

That's hilarious; someone else had the exact same idea? :) I searched via google and the vcfed.org website but couldn't find anything about it.

When I first mentioned my idea to Chuck, he suggested putting the BASIC program image in the EPROM, but with only 12k of space free I don't think it would fit.

I am porting an enhanced version of this game (Adventureland), written in C (which I worked on earlier this year) to 1802 assembly language. Hopefully I will be able to fit it in the available ROM space with compression; it's gonna be really cool. I'll put the code on github when I'm done, and I'll release a binary ROM image for a membership card with 32k ROM in the upper memory space and 32k RAM in the lower.

Richard

On 11/7/19 3:52 PM, Douglas wrote:
If it matters to you, I believe the scott adams port has been done. If I'm not mistaken I saw the game engine running one of the games on a Elf 2000 at VCF East a few years ago by a member on the east coast... can't remember his name, but you could query on the VCF mailing list.

Re: LZ77 decompressor in 1802 assembly

Douglas
 

If it matters to you, I believe the scott adams port has been done. If I'm not mistaken I saw the game engine running one of the games on a Elf 2000 at VCF East a few years ago by a member on the east coast... can't remember his name, but you could query on the VCF mailing list.

Emma 02 - V1.33 #Emulator #microboards #mcds

Marcel van Tongeren
 

Hi,

Just released Emma 02 - V1.33, took me exactly 2 months.....

Anyway I think this is a nice one :). I replaced the CDP18S6xx emulators which I had added in V1.32 with one Microboard System emulator. This one emulates the 11 CPU boards (CDP18S600 to 610) as well as multiple memory boards, display, UART, printer, FDC, tape, I/O and video boards. Option to specify 24 Microboards at the same time, with the current supported boards I don't think you can 'fill it'. There is a limitation as CPU boards have to go in slot 1 and some of the boards can only be used 'once' (display, printer, FDC, tape, I/O and video). 

I have some pre defined configurations loadable via the File / Configuration / Load menu, including the MCDS, MS2000 as well as a 'demo' configuration using the COMX ROM on the CDP18S661 video boards.

Download: https://emma02.hobby-site.com/download.html
Change Log: https://emma02.hobby-site.com/changelog.html

Available for OS X, windows (32/64 bit), linux (rpm/dev)

As always bug reports, questions or comments are welcome.

Cheers, Marcel.

Re: RCA MCDS Tape I/O Board Question

ajparent1/kb1gmx
 

A schematic of the tape portion of the board.  More to see what is
being done and what 1851 IO pins are used (least it appears to be).

The memory part is no big secret and easily made.
That and I'd likely use denser parts.

Allison

Re: RCA MCDS Tape I/O Board Question

ekeefe8051
 

Hello,
 
I have the CDP18S652B RCA MCDS Tape Board. 
 

I've dumped the ROMs (10 2716s).

I may have the manual, but it will require some digging.

Is there something I can help with in this thread?
 
ED

Re: RCA MCDS Tape I/O Board Question

ajparent1/kb1gmx
 

If you wish you can email me off line.

I tried to load the widgets, supposed to have that lib and it installed but no good
same error.


Allison

Re: RCA MCDS Tape I/O Board Question

Marcel van Tongeren
 

Thanks Allison, I will have a look at emulating mint and see if I can fix that.
Will be after the release.....

Re: RCA MCDS Tape I/O Board Question

ajparent1/kb1gmx
 

Thanks,  Marcel,

FYI I tried and install and under mint 17.3 Cinnamon AMD-64 .

The installer tried and croaks with a library dependency error.
screenshot included.

Allison

Re: RCA MCDS Tape I/O Board Question

Marcel van Tongeren
 

Allison, heads up that I'm in the process of releasing Emma 02 version 1.33. Will be in the next few days or even tomorrow...
This one will have the full Microboard System emulator which could be interesting for what you are trying to do.

/Marcel.

Re: RCA MCDS Tape I/O Board Question

ajparent1/kb1gmx
 

Marcel,

Thanks, 
I run Mint, a fork off Ubuntu so if it flies there mint will be happy.
Its mostly that so often interesting stuff appears out there and 
its windows only.

I'll have a look.  Heading there now.

Allison

Re: RCA MCDS Tape I/O Board Question

ajparent1/kb1gmx
 

Chuck,

Back to hunting again as my hardcopy of most manual are the 1979 versions
and ends with UT60 and CDP18S691.   So infor on the 18S601 processor
card is well known info and the memory is also known.

Note to both Herb and you the pointer given is a 404.  I found the
SSD270 in bitsavers but in Components.  I also extracted the relevant
pages from the larger to save lookup time.  In Files under Allison as
SSD270_RCA_Microsystems_Jul82_p456-472.pdf

However following that chain takes me to the CDP18S652 and I get one
paragraph.   Lots of digging not much production for result.  Nice pictures
though.  I needed enough to understand how the cassette Io was done and 
it looks like the 1851 device (two port parallel device) was used for the bits
but its one I don't have so I'll tweak accordingly.

Target idea was a simple system 32K ram minimum and
monitor/editor/assembler in 16 or 32K Eprom.  Minimum parts
and wire wrapped.   That's actually close to to the Embedded
ELF2000, save for rather than ELFOS maybe a bit more
primitive tag and bag File System to EEprom and block
cassette tape. I may start with the EELF I have to get that
package together.  Then it has enough stuff to be self
bootstrapping design where the bootstrap if from basic
monitor and simple storage in IO addressed EEPROM
to something more sophisticated but small.

I may have to go the EMM02 route for a few pieces as a tool.
I do use Emulators and SIMs but as tools, my favorite is MyZ80,
and Dave Dunfields Northstar Horizon emulator.  Most of the
1802 emulators I have are primitive COMAC ELF sims.

Right now RCA software is desirable but least available so less useful.

Allison


 

Re: RCA MCDS Tape I/O Board Question

Marcel van Tongeren
 

Hi Allison,

Ok, have to agree with you there....  also compiling Emma 02 is not an easy task. I have tried to document it on my site and since I'm using GitHub I think it is slightly easier but still not something I recommend doing. However I do provide installers for linux (and OS X/windows), the linux port is not the most stable but it does work. Maybe the debugger tracing can do with some improvements and I still think the GUI is a bit ugly, especially on Fedora; ubuntu is slightly better.

Cheers, Marcel.

Re: RCA MCDS Tape I/O Board Question

ajparent1/kb1gmx
 

Marcel,

It took some hinting to find and it was the .ASM from Herb that had the clue.
The manuals had no mention of W (? or !).  

As to how the IO was done and what ports its less an issue of that its there.
I don't have any of those boards so I'm free to do what  makes sense.

In the end that software will need much cleanup and also refactoring
to suit my bizarre purpose.  That being NO disk (I've done the floppy
and hard disk thing)  and if I did it would be disk simulation using
a Flash.

As to motor control this will be for a fully controlled deck (not MFE
but same idea) so whatever motor control is mostly meaning less
as the intent is be able to read a given block and later go back and
replace it with an edited version.

It does seem that multiple schemes for IO and even formats are
were used by RCA going all the way back to FRED/System-00
(at least three different were tried there) so whatever I do is likely
YACF (Yet An other Cassette Format).

RCA also seems to have had an affinity to distribute on rom rather
than tape.

One last thing: The general community was often source-less.
IF you saw something for elf in poptronics or elsewhere it was
often a hex dump you could key in with maybe a few points to
modify for your IO.  That was very 70s and remained in the 80s.
Now with faster 1802s (or running faster) getting to loops and
tweaking them is a large effort.

Biggest problem with with emulators I  run linux not winders
so to run under windows takes work like physically setting up
a system or maybe getting it to run under wine or worse 
winders in Virtualbox.    One I was told just compile it,
afet getting driven nuts by their specific library it was done,
but what pain.

Allison