Posts

Showing posts with the label c code

Cross Compiled C code for Amstrad CPC

Image
So, the Atari 800 XL is running a 6502 CPU and p reviously I setup the C cross-compiler in Linux / Windows to write simple C code, compile the code, deploy to an emulator and to real hardware. Now...as I may have mentioned, my first computer was an Amstrad CPC 464 back in xmas 1984 - I was a little too young to really appreciate coding in anything other than BASIC at the time but I made a good go of it and did some interesting database / filing system type things that emulated PRESTEL screens and made some very slow BASIC games and played a lot of TAPE games.  I never really had the opportunity to write any code in C or Assembler for that hardware. Time zoomed along and I moved onto an Atari 520 STFM, then onto a 286 PC, then 386, then 486, then, well, y'know.... Around the 2007/2008/2009 period of time, I was having an external garage of the house I was living in at the time converted into an "office", but it had quite a lot of space, so I thought wouldn't it be goo...

chatGPT from DOS...yes, DOS...

Image
Whilst I refuse to sign-up for an API key for chatGPT, you might want to if you want to repeat this example.  Why am I not getting an API key?  'cos I'm building my own offline version (that I'll document and share with everyone soon!) - I could easily then plug this DOS client into my version.  sweet. CHECK OUT THE ARTICLE HERE Until then... enjoy and be amazed at the fact you can still do things with old software & hardware that relate to "new" things.  Here we have a Generative AI being accessed from DOS and if you fancy replicating it yourself, it's just some C code, after-all.. then  CHECKOUT THE GITHUB REPO HERE I have used the MTCP packet-driver for DOS on many of my early 1990s hardware allowing it to connect to WiFi (WEP access only though) and access the internet, so this isn't something "too different" - after all, calling chatGPT is just calling a REST API. However, the "difficult part" is calling the REST API with HTTP(...

Cross Compiled C code for Atari 800 XL

Image
So... I spent some time setting this up on a Windows 10 laptop environment, which involved downloading and installing cc65 and adding the /bin folder to the PATH - I'll get screenshots from that laptop and paste down below - the reason I mention this is because that setup did not have the cl65 executable that allows you to do the compile/link all in one go, you have to do it step by step, which isn't a major problem, but it is interesting to do & understand what is happening behind the scenes. In my UBuntu linux environment, all that I did was: $ sudo apt-get install cc65 Then I used snap to install atari800xl-linux This allowed me to have an emulator for the atari800xl locally. Once the cc65 (cc = cross compiler) is installed you can use it straight away. I used the code from this page as a quick example. As you can see below, the simple C code is located in it's own folder, I then used the cl65 command to make the output file, for the Atari800xl it is best to call th...

PICO C-code - (part 2) MicroPython and then down into C-Code for sdcard integration

Image
Following on from my previous post about PICO, VGA and using the PICO DEMO board .... I had concluded that I was able to use the pico demo board to get a VGA output - awesome! I had concluded that I was able to build the MCUME emulator code and that it was failing to read the SDCard.....with a "Card not ready yet" error message (3). As I'm a stubborn old-git, I refused to let something like a simple error message prevent me from proceeding. I tried a few more things, even use a bit of MicroPython in an attempt to read the card - that failed too. However, I then noticed on the website for the product that it states: Please note that VGA Demo Base only currently works with the C/C++ Pico SDK! At which point I did a Homer Simpson and face-palmed my forehead. Okay, time to get blowing off the C code cobwebs properly then.... I then tried a few variants of other people C code and found that didn't work either. I kept coming back to the PIN diagram: and the reference from...

PICO C-code - (part 1) ....and maybe a bit of VGA

Image
Right, I've done enough of the MicroPython stuff now.... let's get back into my comfort zone.... let's go back to the 1990s and write some C code 🤓  Okay, C code isn't specific to the 1990s, but it is when I was first introduced to it....(actually it may have been 1989, but who's nit-picking) and I've been using it on the Arduino for a few decades now.  So it makes sense to now remove the training wheels with the PICO and get back to the lower-level.  As I'm wanting to do stuff with the VGA screen output, it makes sense to go down a layer (I'm keeping above the ASM waterline for now!) The image above actually comes from THIS webpage, however, I didn't follow those instructions, I did however learn something new...scrolling down the article, the nice chap let's us know that GPIO Pin 30 is a RUN pin and if you flip it then it does a hard-reset - this saves you having to unplug the USB cable and plug it back in every time you want to reset - that...

Let's rewind the Web

Image
As an amusing piece of BBC News, this story came out after I published the info about it being BBS time, well, I was writing it for what seems like ages, so maybe it was 10 mins before or after, whatever.... https://www.bbc.co.uk/news/technology-55908193 The funny thing is.... he's a multi-millionaire sitting on a tax haven island someplace getting bored - yes, read how much he sold the Bebo site for,........twice!  Yes, I fully appreciate that he had to put the "hard work in" in the first place to make it happen, in essence fleecing people for their details and then flogging all that data to a company who was going to try and find a way to exploit it and/or sell it to others.... That's not what I wanted to focus on though, what I was amused by was the fact that he is sitting there, bored stupid (island or no island) and he's fed up with Social Media sites ( as I was eluding to in this Page ), and was no doubt thinking to himself.... hmmmm.... what the world need...