Jump to content

Edmond D

Members
  • Posts

    218
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by Edmond D

  1. Snickers11001001 has provided you with an excellent tutorial of the RND function. I'd suggest that you skim through Commodore's manuals on Basic (both the Vic-20 and the C64) just to round out your knowledge of V2 Basic. They are simple but cover a ton of useful information with an appropriate sequence for rapid learning. Start with the user's guides, then move onto the programmer's guides. There are also several magazines from that period that have well written lessons too. See https://www.commodore.ca/commodore-manuals/ for a list of some, goolge for other sources.
  2. Start by writing a basic program that prints a single digit number to the screen. Then expand upon it for a second digit. The RND() function with examples can be found at https://www.c64-wiki.com/wiki/RND ( the C64 & X16 run V2 Basic) You'll need to either use the online emulator or get it installed on your machine. See https://www.commanderx16.com/forum/index.php?/files/category/1-official-software/ For assembly, you can enter the monitor and start entering simple/short sequences by hand and executing them. See https://www.c64-wiki.com/wiki/Final_Cartridge_3#Monitor_Program for very terse instructions and realize that you'll quickly outgrow it as a programming platform, rather use it to debug/troubleshoot. Once you've had enough "hand coding", there is a package for programming on the X-16 here - https://sites.google.com/view/x16asmenv/home I believe the plan is for this to be in the final ROM for the X16. After that, there are several cross compilers available for different OSes. Some require you to compile them to use, others include binaries to run. You'll need to be able to transfer the compiled programs between the host and the emulator, which has its own learning curve. Feel free to continue asking questions as you go, and even post along the way on your experience into X-16 programming.
  3. It was about file access, then it became a tokenizer, followed by cross platform development, then onto a mis-use of Python. Perhaps a new thread in another forum "I believe Python has flaws" would be appropriate. I'd read it but know little about Python. If the x16 development team released a new emulator or hardware we'd be all over it and not bending threads in new directions
  4. Yes - but then there's the learning curve of python, plus the challenge of translating the c# code (with it's own curve) if I had it, then building the app. I figure that I've learnt/dabbled in about 50 computer languages since the 80's (starting with CBM Basic 2.0 on a PET then VIC 20.) Add on the amazing number of apps I've had to learn/use, plus the number of OSes that have come and gone on many different hardware platforms. I've also invested tons of times with major PLC platforms and programmable instruments on various industrial networks. Some things have stuck with me such as C, but others have been one-off ventures; interesting but were of little value in the long run. APL anyone? My point is that the X16 is going to be a hobby platform for me. I know basic and 6502 assembly so I'm well set. The tools for assembly (and perhaps C) will take me some time. VERA will be new, plus the whole how many sound different chips/types packed into the box now. I look forward to enjoying building the X16 hardware and hope to build a copy hardware/software projects. I might even perhaps create some tutorials covering things most already here take for granted. So, it's not that I'm against diving into new things such as building a tokenizer tool, rather I've got lots (too much) I want to do. Plus there's always supporting the community here in some way.
  5. Thanks for the prompt response. I'm primarily on a MAC platform so moving to C# or Python would be a significant investment of time & effort. So I'm going to put it on a wish list for someday....
  6. What language is your tokenizer written in? I ask because I'd like to have something that would work on all major OSes .
  7. Here are some random thoughts: - Might I suggest start with video and post a transcription of the audio out. It would reduce the time to make both forms for a start. - Writings can get parsed by a translator, or worked through by a non-native reader which allows others to understand the content where video/audio is harder to parse for meaning (or at least that is the way for me.) - I recently read the thread on basic optimization on the forum. A lot of writing & reading! The format allowed me to go back and re-read sections that I didn't get the first time. However a good tutorial should never leave the student unsure of what they are learning. Knowing the target student really helps. Having recently joined and trying to read all posts suggests to me that most forum people are probably not who you want to help. Who are you going to target and what skillset do you think they have? - Perhaps create a simple prototype of a pattern in both formats measuring the time taken. Then post it and ask for feedback on the format, not the content. Then see what the reception by the community is like. You'll get feedback whether you like it or not, or agree/disagree too!
  8. Thanks Rob for the correction of your code in the original post. The code works as expected. Yes that worked correctly: Likewise the read code worked once I gave it the proper SEQ file name. regards, Edmond
  9. The multiply bug looks to be addressed according to the sample program listed at https://www.c64-wiki.com/wiki/Multiply_bug
  10. I encountered an issue with line 110 of the reading code. I modified the line and it appears that reading N$ gave all the data in the line. I'm sure the issue is with me
  11. A Little Background on the Above While computers are everywhere these days, the specific knowledge on getting the emulator to run on a modern MAC has been a trial for me. I’m attempting to address this problem problem with this thread. It’s a huge internet, and even just a big slice for just the X16 - one can’t just sit down one evening, read everything on the this retro computer and be good to go by sunrise. My intent was to be as helpful as possible for the beginner. My hope is that these instructions help those who are fans of the 8 bit era enjoy the X16. Remember that not everyone who sat in front of a early computer became a programmer, hardware engineer or even a geek Now probably the people needing this information are smart - “into” computers in some way. They probably have a lot of knowledge, but not a lot of experience with the software packages used to get the emulator running. That’s OK, the point of this post is to give them just enough information to be successful in getting the X16 Emulator on their machine. As mentioned, it should be a once-in-a-lifetime experience for them. It was for me. While I’m not an expert any of these packages I did get the emulator to run after some trial and error which I hope others can can avoid using these steps. Finally if you are an expert reading this thread thanks for reading it all. If I’ve missed something or mis-stated anything let me know via a private message and I’ll edit the post to correct my mistake. The last thing I want is to mislead anyone.
  12. WARNING - these instructions are somewhat verbose. They are posted with the intent to help, but can’t cover EVERYTHING that you might require to get the emulator running. Like any information on the internet, please use the information below at your own risk. The ideal case it all just works and you’ll never have to come back and read this post again. The hope is that these instructions will take you about 30 minutes read and complete the install. This procedure was developed on a Mac Mini 2018 3Ghz 6 Core i5 running macOS Big Sur 11.5.1 and covers the R38 release. It may work for future releases of the emulator. Here are the steps you need to do in short, followed by a little more description: Install Homebrew Install SDL2 Install the CX16 Emulator 1 Install Homebrew Homebrew is a package installer - a software tool that makes adding capabilities to your system easy. It is installed using the MAC’s Terminal app. You can find Terminal using Launchpad in the Utils group. Navigate to the webpage https://brew.sh to copy the line of text for Install Homebrew (they have a clipboard button at the end of the line.) Start a Terminal window. Paste the line of text and the install will start. You’ll most likely be propped for your admin password a couple of times as it progresses. There will be text output in the terminal window documenting the steps taken, much of it may seem strange. You’re looking for the line “==> Installation successful!” If you don’t get that message, save the output of the terminal window to a text file and then consult https://github.com/Homebrew/discussions/discussions for a possible solution. Without Homebrew installed the next step cannot be completed. If you want to know more about Terminal & Homebrew, see https://appletoolbox.com/use-the-mac-terminal-the-basics/ https://en.wikipedia.org/wiki/Homebrew_(package_manager) Or consult your favourite search engine. 2 Install SDL2 The next step is to install SDL2 - a software package that enables the Emulator to access your MAC’s hardware. Like the first step you use the Terminal to do this installation. See https://formulae.brew.sh/formula/sdl2 for the line you’ll need to enter. There will be more output in the Terminal window. My install ended with the lines: Pouring sdl2--2.0.14_1.big_sur.bottle.tar.gz /usr/local/Cellar/sdl2/2.0.14_1: 91 files, 5.1MB Your install may state different version numbers. At the time of writing I updated to version 2.0.16 by issuing the command “brew install sdl2” again. You might want to update once in a while, but it isn’t required by the emulator as far as I know. Reference: https://www.libsdl.org 3 Install the CX16 Emulator Navigate to https://www.commanderx16.com/forum/index.php?/files/file/25-commander-x16-emulator-winmaclinux/ in your browser. Download the Mac version x16emu_mac-r38.zip. Extract the zip via a double click. Move the extracted folder to be a sub directory of your Applications folder (Macintosh HD/Applications.) Note that the folder already contains a compiled copy of the rom.bin file. You don’t have to figure out how to compile it, that work has been done for you. To start the emulator, right or control click on x16emu. Your security settings may prevent it from running, if so consult https://support.apple.com/en-us/HT202491 to allow it to run. You’ll notice that a new Terminal window opens displaying the command used to start the emulator. You can manually start the emulator from the Terminal application which allows one to specify the many options listed in the Starting section of the emulator’s User Guide. Once you got it installed, examine the documentation in the docs sub folder (/Applications/x16emu_mac-r38/docs) Also at the information on https://www.commanderx16.com/forum/index.php?/files/category/8-official-docs/. Look through the X16 Emulator User Guide to discover how to benefit from the many features of the emulator. There is a lot of technical documentation, don’t panic if some of the information doesn’t make sense to you at this time. Congratulations! The X16 emulator should now be installed and ready for you. If you found these instructions helpful, just let me know via a reaction to this post. If there is anything unclear, start a new post in https://www.commanderx16.com/forum/index.php?/forum/5-x16-software-support/ and perhaps I or another member of the community can help you.
  13. I suggest you use the online Emulator FIRST (can be skipped if desired.) Try out the emulator online here - https://www.commanderx16.com/emulator/x16emu.html It’s quick and easy and gets you playing with the prototype system with a single click. Go ahead and type in: 10 PRINT “THE X16 WILL RULE THE WORLD!”; 20 GOTO 10 RUN If you want to try out some of the great software for the X16 that has been developed, browse the downloads https://www.commanderx16.com/forum/index.php?/files/, select a program and then click on the “Try it now” button. I mention the above since it will work on your MAC with little fuss and no significant effort on your part. It may leave you content, or firm up your enthusiasm to get the emulator installed and working on your machine. See the next item below for the detailed install notes.
  14. Thanks - missed thinking about VCC when I looked at the connector.
  15. I'm hoping that I'll be able to develop some hardware cards for the CX16, mainly as a hoist prototype board. I see +12,-12 and +3.3 V on the connector, but no + 5V one. I assume that a simple 7805 regulator on the board will be retro and support all the old 5V retro logic chips that I have. I know there are much better regulators out there but the old 7805s are what I have in my parts bin.
  16. Hi Rob, Thanks for the welcome message. Yes, I've been trying to get up to speed on all the people and the X16 itself. There are many smart people working on the project, and they have a ton of background experience needs to make the X16 a product. There's lots to read learn spread all over the internet I do see a need to help others start using the platform on their own machine so when the hardware ships there ready to dive in and enjoy. In the VIC 20 days one could open the box, plug things together and slap in a cartridge and be happy. Right now with the online emulator and the library of software with the "try it now" button gets people there. There does seem to be the next step The move to the emulator on my MAC wasn't the smoothest or most straightforward. I plan on adding an How To article in the near future. After that I'll be taking on getting an assembly cross-development platform up and running, then documenting it so that others can make the leap and focus on getting programming rather than fighting to get things set up. Anyway, thanks gain for the welcome. I see that you're very active in doing so in the community which is wonderful. Helping others to engage is what builds a community. regards, Edmond
  17. Hi All, while I've been aware and enjoying this project for awhile, I've not yet introduced myself yet. Now that I want to help it along as I learn about the X16, I'll correct my oversight. In the early 80's I encountered a PET in my school math classroom (grade 7 in Ontario, Canada.) Video games were bursting on the scenes, and pretty well everyone was aware of the Atari 2600. But the new "home" computers were coming out and affordable for my parents, so a VIC-20 arrived. I got hooked! While Omega Race was great, I got into playing around in programming, and saved up $100 Canadian for dataset. That allowed me to save my work, and trade cassettes with the others who had a VIC. I started to buy Compute magazines, and even got some TorPet ones. There was a local computer club of 8-bitters (not sad people!), but rather enthusiasts like myself who had a full gambit of the computers of the time. Anyway, I got into some assembly as I spent time working thought the programmers guide. I didn't write much ASM code, but looked at what was out there. I went through the Compute's second book of machine code and event worked through the Atari 400/800 ROM source. It was interesting to see how the structure was set up - I remember looking at the basic LET command and how it was shoehorned into locations where there was space left over between the sound and graphic routines. My last year of high school in New Brunswick I had access to a SuperPet and the Waterloo languages. I learnt them all as I was kicked out of the sole computer course by the typing teacher because I let her know I knew more than her and could easily prove it :-). Anyway, I eventually became a computer engineering technologist and worked in the industrial controls markets. I've worked on hardware & software in factories that made computers, cars and ice cream, plus many more products world wide. I've also had a brief time in GIS putting mapping technologies onto the internet. I think I've learnt over 20 computer languages and programmed on more platforms, but the VIC will always be a favourite, hopefully to be displaced by the X16! I still have my VIC 20, plus a couple of things I've save along the way. My goal is to get my act together and start using them again. As well, to work on doing something with the X16 and helping others discover the pleasure of working on a computer that is fully understandable without years of work. I'm sure this story sound familiar to many, and probably parallels your own childhood experience. In short: 10 PRINT "Hello World" regards, Edmond
×
×
  • Create New...

Important Information

Please review our Terms of Use