Post by Yiannis on Dec 14, 2022 11:00:39 GMT
Hello friends,
I have been obsessed for quite a while with my Commodore 128 and went through an extensive "phase" of my life to find something useful to do with it beyond demos and upgrades. I wanted to have it "there" running something that can give value. Eventually I found a task and believe it or not, I secretly use it in my workplace to act as an AIS Shipping monitoring device. What it means is that it reads from the User's Port RS232 data provided via an AIS transponder, decodes them and presents them on the screen as a "radar". Let me give you a history of my development iterations and you will understand why I contacted you.
At version one, everything was written in BASIC 8.0. I had no time to experiment with ML and VDC other than prove in a quick and dirty way that the data could be decoded and presented. Here is the result www.facebook.com/100003265481276/videos/2930245633760924/
Basic could decode the basic 5 AIS Messages in about 240-to 300 jiffies so it was OKish for start. Given the slow serial port (2400) I was buffering things in an arduino and that get me going and as you can see from the video it worked. Of course when the data flow was big enough, I was running in syncronisation issues so between screen refreshes I had to close the serial, and then open it again.
Once I was happy with it, I converted the whole decoder in ML. That was a revelation. I am now able to process about 80 messages per second or something like 0.7.juffies per message and I am sure it can go further down. So this is the time to integrate my ML code with BASIC 8 but we all know BASIC 8 has an altered memory map and I don't know where to put my ML, where to start. I tried to "load it" where it says printer routines (as I don't care about them) and Solid routines and it didn't work. I can leave the code in the $1300/$1800 but then it cannot run the BASIC. (or it breaks it). So I am about to revert to BASIC 7.8. I guess that this will be friendlier to the "default" 1300/1800. However I am planning to develop a 3D printer visualiser (to see my 3D model on the 128 as it is built) so the 3D facilities of Basic 8 might become relevant again in the future. Also it is nice that I can do double buffering via BASIC 8 so my "AIS radar" screen is moving smoothly.
So two questions. First, do you have any memory MAP for Basic 8 or any idea where to safely put about 1.5k of ML code? And if not or alternatively, using your 7.8 basic could I do some kind of background drawing and then show the screen?
Finally let me give you an indication about my plan ahead:
1. Next iteration I will provide Interrupt requests for the ML code so that it will work in the background "firing event" once a message is decoded to be "gathered and visualised"
2. Reduce the footprint of the ML by moving the data variables structure to Block 1/Bank1 and creating there a buffer of messages (a FIFO list) where I can consume messages from BASIC or any other software
3. Potentally moving the code there(?) perhaps that would be a solution for BASIC 8 memory map issue but i don't want to start developing new features while I am eager to see the results (and BASIC 7.8 will do it for now)
4. My final step will be to ditch the BASIC and do the graphics in ML.
I will be glad if you could provide me any pointer esspecially towards the BASIC 8 mapping or and backdoor way for the BASIC 7.8 to draw in the background. Perhaps again my questions are very childish and there are asnwers in front of my eyes as I am quite new to the ML code (old enough to write a decoder but not to disect the inners of CBM 128)
I have been obsessed for quite a while with my Commodore 128 and went through an extensive "phase" of my life to find something useful to do with it beyond demos and upgrades. I wanted to have it "there" running something that can give value. Eventually I found a task and believe it or not, I secretly use it in my workplace to act as an AIS Shipping monitoring device. What it means is that it reads from the User's Port RS232 data provided via an AIS transponder, decodes them and presents them on the screen as a "radar". Let me give you a history of my development iterations and you will understand why I contacted you.
At version one, everything was written in BASIC 8.0. I had no time to experiment with ML and VDC other than prove in a quick and dirty way that the data could be decoded and presented. Here is the result www.facebook.com/100003265481276/videos/2930245633760924/
Basic could decode the basic 5 AIS Messages in about 240-to 300 jiffies so it was OKish for start. Given the slow serial port (2400) I was buffering things in an arduino and that get me going and as you can see from the video it worked. Of course when the data flow was big enough, I was running in syncronisation issues so between screen refreshes I had to close the serial, and then open it again.
Once I was happy with it, I converted the whole decoder in ML. That was a revelation. I am now able to process about 80 messages per second or something like 0.7.juffies per message and I am sure it can go further down. So this is the time to integrate my ML code with BASIC 8 but we all know BASIC 8 has an altered memory map and I don't know where to put my ML, where to start. I tried to "load it" where it says printer routines (as I don't care about them) and Solid routines and it didn't work. I can leave the code in the $1300/$1800 but then it cannot run the BASIC. (or it breaks it). So I am about to revert to BASIC 7.8. I guess that this will be friendlier to the "default" 1300/1800. However I am planning to develop a 3D printer visualiser (to see my 3D model on the 128 as it is built) so the 3D facilities of Basic 8 might become relevant again in the future. Also it is nice that I can do double buffering via BASIC 8 so my "AIS radar" screen is moving smoothly.
So two questions. First, do you have any memory MAP for Basic 8 or any idea where to safely put about 1.5k of ML code? And if not or alternatively, using your 7.8 basic could I do some kind of background drawing and then show the screen?
Finally let me give you an indication about my plan ahead:
1. Next iteration I will provide Interrupt requests for the ML code so that it will work in the background "firing event" once a message is decoded to be "gathered and visualised"
2. Reduce the footprint of the ML by moving the data variables structure to Block 1/Bank1 and creating there a buffer of messages (a FIFO list) where I can consume messages from BASIC or any other software
3. Potentally moving the code there(?) perhaps that would be a solution for BASIC 8 memory map issue but i don't want to start developing new features while I am eager to see the results (and BASIC 7.8 will do it for now)
4. My final step will be to ditch the BASIC and do the graphics in ML.
I will be glad if you could provide me any pointer esspecially towards the BASIC 8 mapping or and backdoor way for the BASIC 7.8 to draw in the background. Perhaps again my questions are very childish and there are asnwers in front of my eyes as I am quite new to the ML code (old enough to write a decoder but not to disect the inners of CBM 128)