Parallax Forums
  HomeLog InRegisterCommunity CalendarSearch the ForumHelp
   
Parallax Forums > Public Forums > Propeller Chip > TriBladeProp PCB: Uses 3 Propeller ICs for a Single Board Computer (SBC)  Forum Quick Jump
 
New Topic Post Reply Printable Version
848 posts in this thread.
Viewing Page :
 
[ << Previous Thread | Next Thread >> ] | Show Newest Post First ]

Dr_Acula
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Dec 2008
Total Posts : 606
 
   Posted 9/5/2009 5:03 AM (GMT -8)    Quote This PostAlert An Admin About This Post.
Looking forward to seeing the code.

My CP/M skynet just went live today. Well, maybe not skynet, but I have a board sitting in a shed 100 metres from my house and it is running some sbasic code, and I'm inside a steel frame house with a steel roof and I know that 2.4Ghz wifi can't get even go half the distance to the shed, and yet I can sit here and type PING <BOARDNAME> and 1 second later I get PONG back. Wifi and this network are both 10mW, but that is the cool thing about 433Mhz vs 2.4Ghz, plus the super sensitive -123db gain on the Rx.

Wireless CP/M goes further than Wifi!

Next challenge - get the zicog/triblade into the network. The triblade uses much less power, and that is important when running on solar. Or robotics. There is a bit of a catch though - the CP/M network runs at only 1200 baud (it could run faster but slower baud rates=longer distance) and I've been talking at 38400 then changing on the fly to 1200. For that, I need a few ports. I was wondering if I could please reserve ports 96,97,98,99,104,105 106 and 107? I don't think those clash with any being used by other bits of code.

The other catch is that this really needs two RS232 connections. Or 1 connection, and one local keyboard and one local display. So you can type things into the board and see the printout, but not have those bytes going out onto the airwaves. On the N8VEM the local display is an LCD display using 6 wires. There must be a cunning way to do that. eg - Q7 on the HC573 isn't going anywhere - could I run that to pin 11 on another latch chip, and run the data lines into that latch chip, and with just one more chip add a 20x4 LCD display?? Or does the new board/design render this sort of thing obsolete?

But before that, I guess the next thing is to get heater's code into a triblade. Heater, if you put just the minimum files on your drive I> (now drive A>) and zip it, how small does it go? Or is bootgen really that simple?! And, I guess I've asked this before, are you not running a triblade because of a) lack of a sd socket or b) lack of a ram chip? I've got some spare ram chips (I didn't need to make the missiles after all) and ?? does cluso have a sd socket? It is just it could really simplify things if we all had the same hardware.

And, I have to ask, how fast is your bootup now?


www.smarthome.viviti.com/build

Post Edited (Dr_Acula) : 9/5/2009 1:13:00 PM GMT


Image Attachment :
Image Preview
PingPong.jpg
  14KB (image/jpeg)
This image has been viewed 33 time(s).
Back to Top
 

heater
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Feb 2008
Total Posts : 1832
 
   Posted 9/5/2009 5:44 AM (GMT -8)    Quote This PostAlert An Admin About This Post.
At the risk of sounding like Mallred I have to announce that I cannot reveal the latest OS just yet. No, you see I have developed all this for a secret military high reliability, low power, global wireless networking project that will remain functional during the nuclear winter, slap, Err umm no sorry, I have to go shopping before the wife gets home from work....

Interesting what you say about 433MHz, here in Scandinavia they are now recycling the old mobile phone band at 450 MHz for use in data communication for remote systems such as equipment status monitoring etc. We are hoping to get such a modem for evaluation soon.

I'm sure we could reserve the ports. I was thinking we may want to move the port addresses around (or mirror them) to accommodate PropIO which has limited I/O addressing. Lets see what we can do. It's all up for grabs on the Triblade as SIMH Altair compatibility has gone out the window.

Funny, the first time I got a CP/M prompt up on the Prop was with a 2 line LCD panel I had knocking around. That and a LED for debugging.

A zipped 8Mb A: disk is a whopping 376K bytes !!

Building CP/M with the new BIOS and using BOOTGEN is dead easy under SIMH. I will package up all required sources and some instructions with the next posting.

Boot up is about 1 second. But I'm starting from files in HUB. Still that directory scanning is damn quick now.

I would very much appreciate a RAM chip or two. I have now managed to obtain from the black market 2 DIP propellers including the last one the wild in Scandinavia. Most other parts are easy to get here.

OK, see you when I'm back from the bunker, err, shopping mall...


For me, the past is not over yet.

Back to Top
 

Cluso99
We live onboard



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Apr 2008
Total Posts : 2276
 
   Posted 9/5/2009 7:15 AM (GMT -8)    Quote This PostAlert An Admin About This Post.
Dr_A: Maybe you can draw a block diag of the connections you require? I am not quite sure of your config - what is standard, what you want to add, if this is permanently connected or just plugged in when you are "there", etc. Sure, almost anything is posible (except AI - for now anyway), but what is the best/easiest/fastest way to achieve this depends on what you are after.

I gather the LCD display is 6 pins plus power, so I presume 1 must be a strobe.

Are you using Blade #1 as a Terminal? If so, then you probably don't require the sram or latch which frees uo some prop pins and they can be "tapped" from the latch pins meaning they will take a SIL row of pins.

Rereading your post, I presume you are wanting to use just 1 prop with a 2 wire serial to interface to the wireless. Does the other interface (keyboard and LCD) need to be permanently attached, or is it just plugged in for testing? I presume the latter as you would not want to waste the power. If this is so, then there is an easier way if you only need 128KB SRAM. We can save the latch too! RetroBlade could do this too.

Today I saw a version of jazzed's 1.5" keychain photoframe for A$20 at JB HiFi. They had a 5" photoframe for $50 (I think). I bought a 2.5" from Target a month or so ago for about $25??? but it was aclearance sale and I couldn't find any more.

Heater: see the top of this thread for a simple build of Blade #2 to get ZiCog running - this is what I m currently using :-) Let me know what parts you don't have/can't get (I don't have any uSD or FT232RL left). An even simpler system woud be the prop, xtal, 1xSRAM, 1x74HC73 or 74LVC573, microSD and a 3V3 regulator, power connector plus r's and c's. Use an external PropPlug. You don't even require the eeprom nor the 5V reg.


Links to other interesting threads:
Back to Top
 

Toby Seckshund
Registered Member

Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Mar 2009
Total Posts : 477
 
   Posted 9/5/2009 8:37 AM (GMT -8)    Quote This PostAlert An Admin About This Post.
Hi folks,

Clusso I made up a copy of a blade2 months ago. I tested it with one of your routines 1M _202 or something like it and it came back with a bunch of lines about block reads and writes passing ok, then a rack of hex numbers and finished with i) complete.

Seemed ok (ish) but I have now found that nothing changed if one of the rams were removed, or if the second was removed as well leaving nothing left but the prop and the latch. Everything buzzes out ok and I do have the /OE mods ( from the start ). Any thoughts??


Style and grace : Nil point

Back to Top
 

Cluso99
We live onboard



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Apr 2008
Total Posts : 2276
 
   Posted 9/5/2009 9:34 AM (GMT -8)    Quote This PostAlert An Admin About This Post.
Toby: IIRC the hex is indicating errors. The "i)complete" just means the test has completed, not necessarily passed which it obviously has not.
 
I thought the code should be documented quite well so take a look at what the test is doing.
 
Put in an extra line of spin to force an error and see what happens
 
If you still have problems post what you have done.


Links to other interesting threads:
Back to Top
 

Toby Seckshund
Registered Member

Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Mar 2009
Total Posts : 477
 
   Posted 9/5/2009 10:44 AM (GMT -8)    Quote This PostAlert An Admin About This Post.
Thanks, I'll print it out and retire to the drinking chair. I seem to be able to see things on wood better than on glass (sorry trees )

Then there will be a race hazzard, Code sussed or wifey looking better, either way, BONUS!


Style and grace : Nil point

Back to Top
 

Toby Seckshund
Registered Member

Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Mar 2009
Total Posts : 477
 
   Posted 9/6/2009 5:24 AM (GMT -8)    Quote This PostAlert An Admin About This Post.
You probably have seen this before

http://www.blogcatalog.com/blog/umicroelectronics-info-about-hobby-microcontrollers-and-microelectronics/cd8bc39dd4a99e83f4994e19edb94cfa

Don't know if there is anything of interest, to you.


Style and grace : Nil point

Back to Top
 

heater
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Feb 2008
Total Posts : 1832
 
   Posted 9/6/2009 5:32 AM (GMT -8)    Quote This PostAlert An Admin About This Post.
Attached is zicog_cpm_1_0_rc_3 a major revision of ZiCog for the Prop Demo Board and TriBlade.

Note: I have renamed zicog_demo.spin to zicog_cpm.spin.

The Good, the Bad and the Ugly release:

The Good:
1) Supports 8 * 8Mb CP/M disk drives on SD card. More is possible.
2) Supports SIMH Altair floppy disk sizes (1Mb) using the hard disk interface.
3) Includes a 440K disk definition for uses as RAM disk again using hard disk interface.
4) Now uses packed sectors. i.e. 4 * 128 byte sectors per SD block.
5) No sector skew on any disks, for speed in SD access.
6) Much faster. One second boot up.
7) SIMH AltairZ80 8Mb hard disk images are now usable directly with no pre-processing required.
8) Uses a modified SIMH CBIOSX with all floppy driver code removed, saves memory space.
9) Has a new ROM boot, ZIBOOT.COM that lives at FF00 (unlike SIMH's special set up in RAM) and boots from hard disk images.
10) Has no floppy driver support in Spin. This saves HUB memory, especially useful on Prop DemoBoard and generally simplifies things.
11) Now has 26Kb Z80 RAM space available on Prop Demo Board.

The Bad:
1) Can no longer use SIMH floppy disk images directly. SIMH floppies have sector skewing which we really don't want. N.B. My previous instruction for making disks do not work as expected.
2) I cannot get the new hard disk boot ROM code to work ZIBOOT.COM. Gets to the CP/M sign on message though then crashes. May be just not enough memory on the demo board, I had the same problem with the old DSKBOOT which works in 64K just fine. So CP/M must be written to RAM prior to start up.
3) Probably for the same reason as 2) PIP and other programs crash CP/M when finishing on the demo board as they do a warm boot.
3) Again for the same reason I could not get the AUTOEXEC initial command to function.

The Ugly:
1) This code is based on Cluso's _rr097 so I guess there are a lot of recent TriBlade mods outstanding.
2) TriBlade support is totally broken until Cluso can work his magic on it. Fortunately there is less code to tweak as we have no floppy drivers any more.
3) In order to salvage the 2K HUB RAM occupied by the CPU emulator PASM code I moved the Z80 RAM definition into zicog.spin such that the PASM code now lives in what becomes the Z80 RAM after the emulator COG is loaded.

As supplied the CP/M files CCP.COM, BDOS.COM, CBIOSX.COM are built for a 26K RAM system.
I might suggest getting those into TriBlade external RAM and getting CP/M running again before I rebuild CP/M for 64K.

So it looks like I have probably made a lot of work for you all but I think the benefits in speed and convenience are well worth it in the end.


For me, the past is not over yet.



File Attachment :
zicog_cpm_1_0_rc_3.zip   896KB (application/x-zip-compressed)
This file has been downloaded 14 time(s).
Back to Top
 

Cluso99
We live onboard



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Apr 2008
Total Posts : 2276
 
   Posted 9/6/2009 6:36 AM (GMT -8)    Quote This PostAlert An Admin About This Post.

Ouch - a lot to digest, but this will be the best and simplest for the future yeah

Thanks heater. I will take a look tomorrow and report back. cool


Links to other interesting threads:
Back to Top
 

heater
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Feb 2008
Total Posts : 1832
 
   Posted 9/6/2009 7:50 AM (GMT -8)    Quote This PostAlert An Admin About This Post.
Ooops that package is missing the files required to build the new CP/M stuff. Here is an update with them.

I have included instructions for generating CP/M 2 for ZiCog under AltairZ80 in a text file.


For me, the past is not over yet.



File Attachment :
zicog_cpm_1_0_rc_4.zip   1.24Mb (application/x-zip-compressed)
This file has been downloaded 20 time(s).
Back to Top
 

Dr_Acula
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Dec 2008
Total Posts : 606
 
   Posted 9/6/2009 3:18 PM (GMT -8)    Quote This PostAlert An Admin About This Post.
Wow, what an effort. I'm looking forward to having a look at this later today.


www.smarthome.viviti.com/build

Back to Top
 

Cluso99
We live onboard



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Apr 2008
Total Posts : 2276
 
   Posted 9/6/2009 10:05 PM (GMT -8)    Quote This PostAlert An Admin About This Post.
Heater: I have just looked at the differences. It should be pretty easy to combine the changes. I notice you have removed some now dead code and so have I so the result will be better. Off to do it now roll


Links to other interesting threads:
Back to Top
 

heater
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Feb 2008
Total Posts : 1832
 
   Posted 9/6/2009 10:29 PM (GMT -8)    Quote This PostAlert An Admin About This Post.
Think I just got a handle on the HD boot problem:

1) My 26K RAM CP/M configuration does not actually fit in the HUB space available. For odd reasons it just looked like it did. Anyway 25K should be just fine.

2) Having loaded the boot sectors they seem to be in slightly the wrong location. Off by 256 bytes. Not sure yet why this happens as at first sight the whole load process looks the same as SIMH.

Dr_A: Did you say you had located the source of BOOTGEN.COM ?

What I'd like to do is make a new BOOTGEN customized for ZiCog.

You see the SIMH boot up reads alternate sectors of the first two disk tracks. This is a form of sector skew designed to speed up booting from floppy disks. Gives time for the next sector to rotate into place while storing the last sector read.

Of course this is exactly what we don't want for ZiCog with SD. We want to read sectors sequentially from SD card blocks for maximum speed.

Just an idea.


For me, the past is not over yet.

Back to Top
 

heater
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Feb 2008
Total Posts : 1832
 
   Posted 9/6/2009 10:36 PM (GMT -8)    Quote This PostAlert An Admin About This Post.
Actually the output of SYSCPM2.SUB is a file called CPMBOOT.COM which is a concatenation of MOVER.COM, CCP.COM, BDSO.COM and CBIOSX.COM.

I've just managed to place CPMBOOT.COM in Z80 RAM in HUB from a "file" statement (instead of all the separate .COM files). Now I can start CP/M from it.

Which is nice as it cleans up some of the "ugly" part in ZiCog.

So...I could just lay down the CPMBOOT.COM on the first sectors of the SD card (with no skewing) and the tweak ZIBOOT to just read those sequentially and start CP/M !

No need for a special BOOTGEN although it would be convenient.


For me, the past is not over yet.

Back to Top
 

Cluso99
We live onboard



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Apr 2008
Total Posts : 2276
 
   Posted 9/7/2009 12:31 AM (GMT -8)    Quote This PostAlert An Admin About This Post.

Heater:

Just finished combining the code. Still need to do the few changes that TriBlade will require. blush  I also have to change the hub allocation as it will not compile - exceeds 32KB  shakehead   I will post the update to this post in a few minutes.

re COMBOOT.COM couldn't you just read them into hub via spin from the SD boot tracks, or better still, from a FAT16 file like I do??


Links to other interesting threads:
  Search the Propeller forums (uses advanced Google search)
My cruising website is:  www.bluemagic.biz   MultiBladeProp is: www.bluemagic.biz/cluso.htm

Post Edited (Cluso99) : 9/7/2009 8:42:20 AM GMT



File Attachment :
zicog.spin   195KB (application/octet-stream)
This file has been downloaded 10 time(s).

File Attachment :
zicog010_demo_rr108.spin   70KB (application/octet-stream)
This file has been downloaded 10 time(s).
Back to Top
 

heater
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Feb 2008
Total Posts : 1832
 
   Posted 9/7/2009 12:40 AM (GMT -8)    Quote This PostAlert An Admin About This Post.
Hmm... could do I guess. Can't fit FAT on the demo board but boot sectors would be fine.
Seems a bit like cheating though.
Still for now it would work a treat.


For me, the past is not over yet.

Back to Top
 

heater
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Feb 2008
Total Posts : 1832
 
   Posted 9/7/2009 1:59 AM (GMT -8)    Quote This PostAlert An Admin About This Post.
Cluso: "will not compile - exceeds 32KB"

I think perhaps that 26K CP/M version only fits in the demo board if all the space saving options are turned on in BST.

Edit: Oh yes and it won't fit in the Prop Demo Board if CPU_Z80 is selected that takes a shed load more space than CPU_8080.


For me, the past is not over yet.

Post Edited (heater) : 9/7/2009 11:15:11 AM GMT

Back to Top
 

Dr_Acula
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Dec 2008
Total Posts : 606
 
   Posted 9/7/2009 5:37 AM (GMT -8)    Quote This PostAlert An Admin About This Post.
heater can you pls send me your postal address - we have got to get you a ram chip so we are all on the same hardware!

Yes still some things need fixing:


C:\Propeller\zicog92\Cluso 7 Sept 2009>bstc -p2 -d COM1 -e -Ox zicog010_demo_rr1
08.spin
Brads Spin Tool Compiler v0.15.3 - Copyright 2008,2009 All rights reserved
Compiled for i386 Win32 at 08:17:48 on 2009/07/20
Loading Object zicog010_demo_rr108
Loading Object zicog

zicog(288,14) Error : Unresolved Symbol - ram_z80
BYTEMOVE (@ram_z80 + dma_address, hub_address, 128)
_____________^


www.smarthome.viviti.com/build

Back to Top
 

Cluso99
We live onboard



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Apr 2008
Total Posts : 2276
 
   Posted 9/7/2009 5:46 AM (GMT -8)    Quote This PostAlert An Admin About This Post.
James: This error is >32KB (see the bottom of the screen for the error details) - Oh, you are using the command line version. Maybe there is a more detailed error output??

However, I realised that I have not selected the TriBlade hardware. Unfortunately, some other things just cropped up that I was not expecting till tomorrow evening :-(


Links to other interesting threads:
Back to Top
 

Cluso99
We live onboard



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Apr 2008
Total Posts : 2276
 
   Posted 9/7/2009 9:48 AM (GMT -8)    Quote This PostAlert An Admin About This Post.

Here is the latest code (just ZiCog010_cpm_v1_0_rc4.spin and Zicog.spin changed) but it still fails compilation. Run out of time to findout why as the label is valid. One problem I had is the compiler options were hard coded in the project file.

There are a few deliberate errors as I have not handled the sector packing yet. Maybe you may get a chance to look into it.


Links to other interesting threads:
  Search the Propeller forums (uses advanced Google search)
My cruising website is:  www.bluemagic.biz   MultiBladeProp is: www.bluemagic.biz/cluso.htm



File Attachment :
zicog010_cpm_rr109.spin   58KB (application/octet-stream)
This file has been downloaded 12 time(s).

File Attachment :
zicog.spin   195KB (application/octet-stream)
This file has been downloaded 10 time(s).
Back to Top
 

heater
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Feb 2008
Total Posts : 1832
 
   Posted 9/7/2009 10:18 AM (GMT -8)    Quote This PostAlert An Admin About This Post.
Zicog.spin:

Had to uncomment defines TriBladeProp CPU_Z80

Found this in alu_neg_ovl: "wrbyte data_8, a_reg read_memory_byte"
should be " wrbyte data_8, a_reg"
No idea how that got there.

Had to remove all whites space from the end of "read_memory_byte_ret ret"
Never seen that before.

Zicog010_cpm_rr109.spin.
Uncomment the correct defines TriBladeProp and CPU_Z80

There should not be any problem with >32K as all that memory is taken for Z80 only when PropDemoBoard is defined.

Now to have a look what Cluso changed.


For me, the past is not over yet.

Back to Top
 

heater
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Feb 2008
Total Posts : 1832
 
   Posted 9/7/2009 10:20 AM (GMT -8)    Quote This PostAlert An Admin About This Post.
Cluso, what you mean as opposed to "hard coded" in the source code :)


For me, the past is not over yet.

Back to Top
 

Cluso99
We live onboard



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Apr 2008
Total Posts : 2276
 
   Posted 9/7/2009 11:27 AM (GMT -8)    Quote This PostAlert An Admin About This Post.
Hard coded as in the bst Project/Options/Defines


Links to other interesting threads:
Back to Top
 

Cluso99
We live onboard



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Apr 2008
Total Posts : 2276
 
   Posted 9/7/2009 12:17 PM (GMT -8)    Quote This PostAlert An Admin About This Post.

Here is the latest. It does not compile when set to TriBlade and CPU_Z80, but compiles with the PropDemoBoard and CPU_8080.

I have to get my head around the buffering of the 4x1 sectors to fix the TriBlade code  4 places I think?


Links to other interesting threads:
  Search the Propeller forums (uses advanced Google search)
My cruising website is:  www.bluemagic.biz   MultiBladeProp is: www.bluemagic.biz/cluso.htm



File Attachment :
zicog011_cpm_rr110.spin   58KB (application/octet-stream)
This file has been downloaded 9 time(s).

File Attachment :
zicog.spin   195KB (application/octet-stream)
This file has been downloaded 9 time(s).
Back to Top
 

Dr_Acula
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Dec 2008
Total Posts : 606
 
   Posted 9/7/2009 6:13 PM (GMT -8)    Quote This PostAlert An Admin About This Post.
Going off on a bit of a tangent here, heater asked in a PM about the source for BOOTGEN.COM.

I'm looking into how to get the boot ROM code working. Basically I'd like to have the boot code just read sectors sequentially off the SD for minimum boot times. Get rid of all that sector skewing that is in there now. This means eventually having to write a modified BOOTGEN so that TriBlade can rebuild CP/M and install it itself without SIMH.
heater

I can't seem to find this. Just to brainstorm a bit about how to build boot tracks, the first thing to say is that it is complex. I've spent a lot of time inside the N8VEM system so might have some insights there. The confusing part is that programs need to be compiled so they sit in a different part of memory. So you might have an .ORG F800 at the beginning and so all the jump instructions work at that location, but it produces a binary image that might sit somewhere else in memory until it is needed. And, at least in CP/M, you can't just pad out bytes before and after as there isn't 64k to play with. So for the N8VEM, each file has a beginning and and end and so has a known length. eg dbgmon starts with .ORG F800 and finishes with .ORG FFFF. But even though it ends with FFFF, it is not FFFF bytes long. It is in fact FFFF-F800 bytes long, and starts at 0100H (as it is directly after the loader-m program that is o0 to FF. And then you have to be careful each program does not overwrite its allowed length. This is a real pain when writing custom bits of code, eg the LCD display driver in the N8VEM which now is part of CP/M!

Because of the overwrite problem, I found it easiest (as did Andrew Lynch) to have the minimum number of programs. It comes down to three, and it could be easier to even go for one single program. But even with 3, it gets confusing as the program cpm22-zz.asm is in fact a combination of the three bits of CPM, ie the CCP, BDOS and BIOOS.

Bill Beech over at the N8VEM group has been working for some time on using the individual files in CP/M and trying to keep the source files as 'pure' as possible. He would be the expert to ask on this problem.

This is the build batch file for the N8VEM

tasm -t80 -b loader-m.asm loader-m.bin
tasm -t80 -b dbgmon.asm dbgmon.bin
tasm -t80 -b cpm22-zz.asm cpm22-zz.bin
copy /B loader-m.bin+dbgmon.bin+cpm22-zz.bin+BDRIVE.BIN Romimage.bin
pause


They all have fixed lengths and then the DOS command copy /b joins them all together.

Now, if you want to do the compiling in CP/M it gets a bit more complex. You need ddt and you even need to compile and run programs to move code around before even doing the compiling. This is the dump of syscpm2.sub

; Create a bootable image on disk A: of CP/M with CCP
; Based on original Digital Research sources for CCP and BDOS
; Required sources are CFGCCP.LIB, MOVER.MAC, CCP.MAC, BDOS.MAC, CBIOSX.MAC
; Required programs: M80.COM, L80.COM, DDT.COM, BOOT.COM, BOOTGEN.COM
XSUB
; get correct configuration
PIP MEMCFG.LIB=CFGCCP.LIB
; create MOVER.COM
M80 =MOVER/M
L80 MOVER,MOVER/N/E
ERA MOVER.REL
; create CCP.COM
M80 =CCP/M
L80 CCP,CCP/N/E
ERA CCP.REL
; create BDOS.COM
M80 =BDOS/M
L80 BDOS,BDOS/N/E
ERA BDOS.REL
; create CBIOSX.COM
M80 =CBIOSX/M
L80 CBIOSX,CBIOSX/N/E
ERA CBIOSX.REL
; put pieces together
DDT
F100 5C00 0
IMOVER.COM
R0000
ICCP.COM
R0900
IBDOS.COM
R1100
ICBIOSX.COM
R1F00
G0
; create boot file
SAVE 44 CPMBOOT.COM
ERA MOVER.COM
ERA CCP.COM
ERA BDOS.COM
ERA CBIOSX.COM
ERA MEMCFG.LIB
; now perform a cold boot to get rid of XSUB
; this restores the original BIOS jump vector which is required by BOOTGEN
BOOT
; write boot file to reserved tracks, must be last command
BOOTGEN CPMBOOT.COM A:


The very last command is bootgen.com and that is the file we don't have the source for. But I'm not sure that matters. Just a few lines up is the command
SAVE 44 CPMBOOT.COM

This is saving a simple binary file which I think is 256*44 = 11264 bytes. That fits as that is 2C00 and at the beginning the code looks like this (which is the compiled MOVER.MAC) - copied from the binary version and viewed with ddtz (z80 opcodes).

A>ddtz cpmboot.com
DDT/Z   [8101]
High = 2CFF  Max = 2CFF
> l0100
0100  LD   HL,0A00
0103  LD   DE,DC00
0106  LD   BC,2300
0109  LD   A,(HL)
010A  LD   (DE),A
010B  INC  HL
010C  INC  DE
010D  DEC  BC
010E  LD   A,C
010F  OR   B
0110  JP   NZ,0109
0113  JP   F200
0116  NOP
0117  NOP
0118  NOP
0119  NOP
>>


Then it is padded out with zeros to 0A00. This code simply takes 2300H bytes and copies them from 0A00 to DC00 and then jumps to F200. (in Z80 opcodes a LDIR could do it with even less instructions).

So, I think all you have to do is build a binary file with a shortened version of syscpm2.sub that ends after SAVE command, and adds a new BOOTGEN which we write, which takes any .COM or binary file and copies it to the boot tracks, with no sector skewing and no fancy interleaving of alternate sectors. It could then copy itself to high memory and execute.

I guess that could be some spin code. It could look at the boot tracks and copy (say) 16k (11k+ a bit spare) into the first 16k of the zicog emulation and then jump to 0000 in the zicog. If the code was the code above, the first thing it then does is copies cpm into high memory and executes.

What do you need to make that? Well, I think it needs a tiny little program that moves a file to the boottrack, but in the format we want, ie straight binary. If you want to run all this within CP/M (which I think is entirely possible), then you need a little machine code program to do this.

One thing I'm not entirely sure about is whether CP/M can write a sector to track 0 of drive n? I'm guessing here, but every drive has parameters and those parameters are set in the drive parameter block and cp/m may try to send the data to somewhere different based on its parameter block data. To keep things very simple and very consistent with all drives, I wonder if we could just say that whatever drives we create, they all should have some data on the first track that is copied 1:1 into ram and then executed? Spin may be able to do that easier than anything else. eg, you have 16k worth of data at location x in the working ram and you want to move it to track 0 on the disk image. Maybe a special I/O call to trigger that. Then a cp/m program that takes any .com program and puts it into ram at a known location (?? at 0A00 but it doesn't really matter). And certainly it would be easy to write a vb6 program to do the same from a binary file on a pc hard drive.

I've been looking at some source code for programs similar to BOOTGEN on the walnut creek archive, eg SYSGEN but they seem to be customised for different hardware.

Sorry for the long post. It has taken so long, maybe in the meantime heater/cluso have already solved this one ?!


www.smarthome.viviti.com/build

Post Edited (Dr_Acula) : 9/8/2009 2:21:01 AM GMT

Back to Top
 
[ << Previous Thread | Next Thread >> ]
New Topic Post Reply Printable Version
848 posts in this thread.
Viewing Page :
 
 
Forum Information
Currently it is Friday, November 20, 2009 10:39 PM (GMT -8)
There are a total of 393,734 posts in 55,521 threads.
In the last 3 days there were 82 new threads and 700 reply posts. View Active Threads
Who's Online
This forum has 17687 registered members. Please welcome our newest member, mark09.
54 Guest(s), 2 Registered Member(s) are currently online.  Details
Todd Chapman, Sal Ammoniac