Okay, I think I loaded this successfully. I get an image on my TV but it looks a bit garbled. What should it look like?
david-betzs-macbook-pro:test dbetz$ p2load testcard.bin,8000 BaggersNPotatoheads_16_bit_graphics_driver_NTSC.BIN
Found propeller version 32 on /dev/cu.usbserial-A700fKXl
Loading 'testcard.bin' at 0x00008000
................................................................................................
Loading 'BaggersNPotatoheads_16_bit_graphics_driver_NTSC.BIN' at 0x00000e80
..
Okay, here is what I did. I didn't end up adding the -x or -r options because it isn't really possible to split the load up into multiple invocations of p2load. This is because the first thing that p2load does is goes out looking for a serial port with a Propeller attached and doing that messes up any loader that might already be running on the Propeller. So, I ended up just allowing multiple files to be loaded on the same command line. You can mention as many files as you like on the command line. Each file can optionally be followed by a comma and a hex address where the file should be loaded. If you precede a file with -s the first 0xe80 bytes will be stripped off of it before it is loaded. That allows something like what Sapieha asked for originally:
I've also added a -c option that will let you do a COGNEW to start a COG passing it a parameter. I'm expecting this will probably be a mailbox address. The following example will do a COGNEW of the COG image at 0x2000 passing it the parameter 0xf00.
p2load prog.obj -c 2000:f00
I'm doing a build now to make sure I didn't break anything and then I'll check this in and build a Windows version.
I'm still wondering why the test image that Bagger's supplied is garbled on my screen. Is it possible that this is a big-endian image rather than little-endian as you'd expect on the Propeller?
Hi David, just saw this, will grab loader and have a look when I get back.
btw, it should be the same as mine, as the data is little endian.
I'm not sure what's happening then. I can recognize the image but it is garbled. All I do is write byte-for--byte directly into hub memory. I don't do any swapping.
I just updated the top post in this thread with a Windows version of p2load that can load multiple files at a time. It also has the untested feature allowing you to launch COG images. This is described in the top post.
Just checked with new data, yeah works a treat, thanks, and soooooo much faster
Nice one matey!
Thanks! I can probably make p2load even faster by getting rid of the ACK after every packet. The link should be reliable so that probably isn't really necessary.
Could you send me the revised image file so the picture on my TV will look better? :-)
Okay, here is what I did. I didn't end up adding the -x or -r options because it isn't really possible to split the load up into multiple invocations of p2load. This is because the first thing that p2load does is goes out looking for a serial port with a Propeller attached and doing that messes up any loader that might already be running on the Propeller. So, I ended up just allowing multiple files to be loaded on the same command line. You can mention as many files as you like on the command line. Each file can optionally be followed by a comma and a hex address where the file should be loaded. If you preceed a file with -s the first 0xe80 bytes will be stripped off of it before it is loaded. That allows something like what Sapieha asked for originally:
I've also added a -c option that will let you do a COGNEW to start a COG passing it a parameter. I'm expecting this will probably be a mailbox address. The following example will do a COGNEW of the COG image at 0x2000 passing it the parameter 0xf00.
p2load prog.obj -c 2000:f00
I'm doing a build now to make sure I didn't break anything and then I'll check this in and build a Windows version.
Sorry for the flurry of updates. I forgot that someone asked for an option to start the ROM monitor instead of the user program. I've added the -m option to do that. You still need to use -t to get into terminal mode so you can interact with the monitor.
To load a program and enter the monitor type something like this:
p2load prog.BIN -m -t
I also fixed a bug that was preventing the use of the -b option to change the baud rate. So you can now try this to load Bagger's image display code even faster:
Auto works for me. BUT I have some things that dont like auto scans - Had big problems with that in PropellerTools before them added manually control for COM's.
But I have Question / Request for one more -flag as last one in command line ============== -r address,parameter
If that are possible for You?
Auto works for me. BUT I have some things that dont like auto scans - Had big problems with that in PropellerTools before them added manually control for COM's.
But I have Question / Request for one more -flag as last one in command line ============== -r address,parameter
If that are possible for You?
Okay, I'll add that. I'll make it the same as the syntax for -c though:
-r address:parameter
I hope that's okay.
By the way, I said in my original post that I hadn't tested the -c option but it turns out it uses the same internal mechanism as -m that starts the ROM monitor so I'm pretty sure it will work for starting other COG images as well.
Okay, I'll add that. I'll make it the same as the syntax for -c though:
-r address:parameter
I hope that's okay.
By the way, I said in my original post that I hadn't tested the -c option but it turns out it uses the same internal mechanism as -m that starts the ROM monitor so I'm pretty sure it will work for starting other COG images as well.
Thanks.
I think that with that last one -- We have very good testing tool for Prop II.
And that looks very good --- -r address:parameter
I've updated the top post with a new version of p2load that supports the -r option. Sorry it took so long! I had started a Windows build of all of propgcc and that takes FOREVER!
F:\-Morph-Temp\_NANO_\Emulator\P2Terminal_cordic\p2load._M>p2load -v driver_NTSC.obj -r e80:0
Trying COM1
error: hardware lost
Trying COM9
Found propeller version 32 on COM9
Loading 'driver_NTSC.obj' at 0x00000e80
.
Loading 'e80' at 0x00000e80
error: can't open 'e80'
I've updated the top post with a new version of p2load that supports the -r option. Sorry it took so long! I had started a Windows build of all of propgcc and that takes FOREVER!
F:\-Morph-Temp\_NANO_\Emulator\P2Terminal_cordic\p2load._M>p2load -v driver_NTSC.obj -r e80:0
Trying COM1
error: hardware lost
Trying COM9
Found propeller version 32 on COM9
Loading 'driver_NTSC.obj' at 0x00000e80
.
Loading 'e80' at 0x00000e80
error: can't open 'e80'
Oops! Sorry about that. Will be fixed in a second.
Comments
Okay, I think I loaded this successfully. I get an image on my TV but it looks a bit garbled. What should it look like?
I've also added a -c option that will let you do a COGNEW to start a COG passing it a parameter. I'm expecting this will probably be a mailbox address. The following example will do a COGNEW of the COG image at 0x2000 passing it the parameter 0xf00. I'm doing a build now to make sure I didn't break anything and then I'll check this in and build a Windows version.
IMHO, this is a very good loader now. We can use many different approaches to get data and code into a P2.
btw, it should be the same as mine, as the data is little endian.
Nice one matey!
Could you send me the revised image file so the picture on my TV will look better? :-)
This will come in very handy for a lot of us.
To load a program and enter the monitor type something like this:
I also fixed a bug that was preventing the use of the -b option to change the baud rate. So you can now try this to load Bagger's image display code even faster:
I've updated the top post with the new Windows version.
Nice work.
If You will consider that request so.
Now only Initial COMxx port setting that can handle Ports bigger as 9
Sorry. Don't see flag for COM's before I posted my post.
Thanks
Auto works for me. BUT I have some things that dont like auto scans - Had big problems with that in PropellerTools before them added manually control for COM's.
But I have Question / Request for one more -flag as last one in command line ============== -r address,parameter
If that are possible for You?
Okay, I'll add that. I'll make it the same as the syntax for -c though:
-r address:parameter
I hope that's okay.
By the way, I said in my original post that I hadn't tested the -c option but it turns out it uses the same internal mechanism as -m that starts the ROM monitor so I'm pretty sure it will work for starting other COG images as well.
Thanks.
I think that with that last one -- We have very good testing tool for Prop II.
And that looks very good --- -r address:parameter
p2load -b 1000000 testcard.bin,8000 BaggersNPotatoheads_16_bit_graphics_driver_NTSC.bin
It worked super fast! So, nice one! I doubt I'll need to add serial support to P2Prep, this is awesome, thanks matey!
Cheers,
Jim.
I think I don't understand something.
F:\-Morph-Temp\_NANO_\Emulator\P2Terminal_cordic\p2load._M>p2load -v driver_NTSC.obj -r e80:0
Trying COM1
error: hardware lost
Trying COM9
Found propeller version 32 on COM9
Loading 'driver_NTSC.obj' at 0x00000e80
.
Loading 'e80' at 0x00000e80
error: can't open 'e80'
Thanks