Closed GoogleCodeExporter closed 8 years ago
You should be able to do the transfer using a Lua script.
If everything is in ~/c64 for example, it would look like:
fn, fp = getfilename();
os.execute("cat " .. fp .. "/" .. fn .. " ~/c64/picviewhires.prg >
/tmp/codenettest.prg; ~/c64/codenet /tmp/codenettest.prg &");
I'm not 100% sure about the final &, I think it should make the script return
(and grafx2 becoming responsive again) while the transfer is in progress.
If this technique works, you can attach a keyboard shortcut.
Original comment by yrizoud
on 22 Dec 2012 at 4:12
Using codenet would require us to embed network datagram support in GrafX2.
That makes it harder to port. Also, it means we are hrdcoding the protocol into
GrafX2, and we'll need different protocols for different pachines (on Amstrad
CPC I'd like to use the CPC Booster and SNArkos, for example).
So, using Lua scripts is definitely the right thing to do. If you get the
script working, please send it to us and we'll include it as an example in the
next GrafX2 version.
Since our Lua API also allows creating dialog windows, adding a configuration
screen where user can select he path to codenet executable and the IP address
is also possible.
Original comment by pulkoma...@gmail.com
on 23 Dec 2012 at 9:42
You make very valid arguments, I agree fully. I didn't know about the
getfilename function, partly because I'm using 2.3 as the C64 multicolor saver
doesn't work in 2.4 here. (I didn't raise an issue yet because I only tested my
own build in Ubuntu so far. I will test more and raise an issue if appropriate.
Anyway, I made a working script now. It sends and displays multicolor and hires
images with or without load addresses via Codenet and starts another Codenet
session on the C64 so the user can send more images without any interactions on
the C64.
As the C64-code is so small I just base64ed it into the script itself. If you
need the sources the comply with the GPL or whatnot for inclusion in the Grafx2
distribution just use the ones I attached to my first post.
Feel free to include this script anywhere.
Original comment by mikeri...@gmail.com
on 25 Dec 2012 at 9:16
Attachments:
Included in r2043.
Some comments however :
- The script is linux-only.We may want to help writing such scripts by providing some more IO functions,
- Adding a config dialog to set the IP address and some error management would be nice
Original comment by pulkoma...@gmail.com
on 29 Dec 2012 at 7:01
Personally I prefer no mandatory interactions for frequently used scripts, so I
suggest a dialog that can easily be disabled with a variable in the first lines
of the script.
Original comment by mikeri...@gmail.com
on 29 Dec 2012 at 7:05
Original issue reported on code.google.com by
mikeri...@gmail.com
on 21 Dec 2012 at 12:04Attachments: