[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [N8VEM-S100:5124] JAIR 8080 Board- It's alive!



Since XMODEM was originally written on CP/M, I think you could get a CP/M XMODEM program SAVEed and then run that from *inside* CP/M and not have to drop back to the monitor, etc. for each file.

Andrew B

On Monday, September 1, 2014 4:42:12 PM UTC-7, Crustyomo wrote:
Jeff,

Excellent! I'm really happy to hear your enjoyment in building this card.  I'm curious, what front panel are you using to operate the board?

I am using a 1GB SD card from DANE-ELEC.  It can only work with FAT16 which can only work on SD Cards up to 4G.  I'm like you, more into hardware than software, but I'm learning as I go along (mostly from all my mistakes).  I have had issues trying to get some other SD cards working, so I kind of stuck with the 1GB and left those issues for some future investigation.  I would really like to know which card(s) work for you. 

Now, for loading files.... Hmm, there aren't many ways to do this.  If the CP/M image file would have a BIOS that works with a certain emulator, then you could go that route.  Let me explain how CP/M is booting.  When you boot up my ROM, you have 3 choices, Enter Monitor, Change name of files for the disks A to D and Boot to CP/M.   To boot CP/M, I jump to the Cold Boot routine that is part of the CP/M BIOS.  Hmm, let me back up 1 step.  When you boot my ROM, it copies itself to upper RAM, disables Shadow ROM (thus allowing the low memory to be RAM) and it jumps to the welcome screen (3 choices).  The ROM is designed so the CP/M BIOS loads at a specific location.
Here's what the memory looks like when you boot to the welcome screen.

DA00:   Code for Welcome Screen (3 choices)
Dxxx:    Code for the Monitor (uses routines in BIOS)
EE00:    CP/M BIOS

Now, when you load CP/M, a jump to the cold boot at EE00 causes the first XX number of sectors to be loaded from the file in "Disk-A" at DA00, so the memory now looks like this:

DA00:  CP/M  (CCP and BDOS)
EE00:   CP/M BIOS  (as loaded from Boot ROM, NOT from Disk-A).

So, you can have some other CP/M bios on "DISK-A" at sector XX+1, my ROM will not load that other BIOS, because my ROM should have all the BIOS you'll ever need for CP/M.

Now, back to loading files....    the only way I can think of doing it with what's there is.... 
1. Boot system to Monitor
2. Use either Xmodem or Hex file transfer to get a file into RAM
3. Boot to CP/M
4. Use CP/M's built in command SAVE to write the file to "DISK-A".

You might need more detail on these steps.
2.  Transfer a file to Memory.
   You can do this with XMODEM.  from the Monitor, type:
   X U 100  <Enter>
Then start an XMODEM transfer from your terminal program.
Or you can do this with HEX File transfer mode... While at the monitor prompt, just ASCII upload the .HEX file, the first colon will initiate the transfer, be sure your hex file has the :00000001FF end of file line at the bottom of the file.
Your HEX file must start at address 0x0100, this is a CP/M thing (also a DOS thing).  CP/M loads all it's programs at 0x0100. Space in page 0 is reserved for the FCB and stack.... Hmm, I wonder if it's this limited stack space that is causing the problems with CP/M...
If you wish to write a program in CP/M, it must start at 0x100, this will be the first instruction executed after the file loads.

Step 3.  You can either reset and boot to CP/M or from the monitor, type G DA00 to Jump to DA00 (the CP/M cold boot).

Step 4.  Rich Cini describes this CP/M instruction very well in his paper, I hope I don't mess it up here...
The program you loaded at 0x100 is still there.
At the a> prompt, type
SAVE  10  filename.ext
This will write 10 pages of 256 bytes from 0x100 to the file name you specify.
Of course, if you need only 1 page, then write just 1 page.  You need to know how many pages your loaded program is.
Final note, I'm not sure if 10 is decimal or hex ie, it could mean "ten" or "sixteen".   I'm sure if you search for help on the CP/M save command, someone will document it in full.

I used this same method to load all the extra CP/M files in CP/M v1.4 on my IMSAI (using real 8" drives).

Finaly, regarding RAM test, I wrote this to Harold.... I hope it suffices for you.

The RAM test does 4 tests, a page march, byte march (within each page) and a bit march (within each byte).
The 4th test is a sequential write that will leave incrementing values in RAM.

After each test, it will report success (if it doesn't jump to report a failure first).
It will also display some memory locations or patterns on the Front Panel LED display of the IMSAI (the ALTAIR does not have this so writes to I/O 0xFF are lost to the bit bucket).
You cannot ram test the page where the Stack is located (I think).   Since the Monitor is running in upper RAM, you can test the lower ram.    Enter:
R 00 7F
to test the memory from 0x0000 to 0x7FFF.
If you want to run a quick test of 1 page (say page 00), type
R 00 00

The Page March, writes 00's to all pages, then fills a page with FF's and reads this back while verifying all the other pages are still 00's.  It repeats this for every page, then does the test again, this time writing FF's to all pages and 00's to the page being tested.

Byte march does the same but within a single page and repeats for all pages selected.
And bit march is even a finer test of bits within each byte.  Again marching 1's then 0's.

In this way, any data written that does not read back the same flags an error, further, any crossed cells or address lines will be detected if the data in the other areas of RAM change when they should not.

It's a good ram test and I've used it to find bad memory on some production boards I used to repair (years ago).



Regards,
Josh


Date: Mon, 1 Sep 2014 10:42:23 -0400
From: jga...@optonline.net
Subject: [N8VEM-S100:5124] JAIR 8080 Board- It's alive!
To: n8ve...@googlegroups.com

Hi Josh (& all that are interested),
  I have finished the build of the JAIR 8080 board and I can get into the monitor, test some RAM, ports, examine memory, etc.  I have been unable to boot CP/M however.  I thinks that it must be the way I prepared the SD card of the card that I am using.  I have normally used windiskimager to create disk images on SD cards.  Windiskimager typically uses .img image files to create a disk image on the card.  I tried using the .bin file as the source but the SD card doesn't appear bootable so I assume I did something wrong.  Also what size cards are you using?  Most of my cards are SDHC of 4,8 or 16gb capacities.  I do have a few 1gb standard SD cards that I can try also.
  I have to admit that I was pretty excited to see your design come to life.  It is very cool indeed.  Also I realize that you are preparing for VCF-MW so it may have to wait but does any guide exist for the monitor commands.  I was able to figure out most of them but I am not sure about the RAM test, unassemble, dump & SD card functions.

On 8/2/2014 11:57 AM, Crusty OMO wrote:
Hi Guys,

I have been able to get CP/M 2.2 booting from the SD-Memory card.  Please find the JAIR-Firmware V1.zip file on the wiki page.
http://n8vem-sbc.pbworks.com/w/browse/#view=ViewFolder&param=S-100%20ALTAIR-IMSAI%208080%20CPU%20Board

It will boot CP/M 2.2 and give the "a>" prompt.  (I thought it would be a capital A, but it's not.)



--
You received this message because you are subscribed to the Google Groups "N8VEM-S100" group.
To unsubscribe from this group and stop receiving emails from it, send an email to n8vem-s100+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.