|
Post by D-Type on Apr 8, 2018 9:24:43 GMT -5
A 20 minute intro video to my project: (later videos will be shorter!)
Contents: What is a Vectrex?
What is Forth?
Why do I want to use Forth with the Vectrex?
A bit of my history programming Forth.
Where did my Vectrex came from.
Some comments on the Vectrex programming community.
A little about CamelForth.
How we developed for 8-bit embedded single-board computers in the early 90's.
Why Forth and not assembler, C or BASIC?
Some novel features of Forth.
The Jupiter Ace was built around Forth, not BASIC.
Jupiter Ace programs: Centipede and Moon Buggy.
A look at some Forth code, using RPN.
Our first Forth words, Hello World!
Definition of the objectives of my project.
Feedback welcome...
|
|
|
Post by D-Type on Apr 8, 2018 12:21:54 GMT -5
Time to get into the nuts and bolts of it all: (I thought it'd be a quicker to explain than in the previous video. I was wrong, it's another 20 minutes ) Contents:Comparing the Vectrex and ScroungeMaster 2 memory maps. RUM & Mine Storm ROM reside where the Forth ROM would ideally be. SM2 has 8k RAM, Vectrex only 1k, that's a bit tricky. Fitting a quart into a pint pot: Adjusting CamelForth ROM to fit where the Vectrex cartridge normally is and squeezing the Forth RAM areas into 1K. What about the interactive terminal, that'll need a serial port. Where's do we fit in the serial port? Let's ask Grant Searle. Note: I'm mixing up hexadecimal (referred to usually as just 'hex', base 16) and decimal (base 10) numbers in the video like a boss - sorry! 80 (Hex) bytes = 128 (decimal) bytes. If you're going program the Vectrex, you'll need to get used to it. Being able to convert between Hex and Binary will be handy too
|
|
|
Post by Malban on Apr 11, 2018 10:51:51 GMT -5
It seems to me that the Forth RAM dictionary could be 256 bytes. Since the BIOS RUM RAM only uses $80 bytes - so you could start the Forth RAM dictionary at: $c880 - $c980 - that would be 256 bytes...
Or so I read your memory map wrong?
Regards
Malban
|
|
|
Post by D-Type on Apr 11, 2018 18:03:20 GMT -5
It seems to me that the Forth RAM dictionary could be 256 bytes. Since the BIOS RUM RAM only uses $80 bytes - so you could start the Forth RAM dictionary at: $c880 - $c980 - that would be 256 bytes... Or so I read your memory map wrong? Regards Malban Actually, yes, I think you're right, when I did the mapping, I just stuck with the $100 boundaries and didn't think about it too much, but yes, it looks like $80 more is available, I'll tweak that. Once I've got into the Vectrex BIOS a bit more, maybe I can have a bit of the $80 bytes starting at $c800 also! I've already reduced the start of the return stack to accommodate the other BIOS RAM at the top of the 1k, I didn't explain that area very well in the video, but what's on the screen is correct. Of course if you're going to write a program and paste it into the Forth interactive terminal to be compiled by the 6809, even 256 bytes will not get you very far, it will be mostly useful for interactive testing and debugging. CamelForth 6809 comes with a cross compiler, so real program code will be compiled on the PC and go straight into ROM. This is why I'm keen to avoid putting the UART anywhere low in memory, so I don't have to hack the compiler to avoid it.
|
|
|
Post by D-Type on Oct 3, 2018 17:23:51 GMT -5
wiki.forth-ev.de/doku.php/events:ef2018:vectrexI presented my Vectrex running Forth at the EuroForth 2018 conference, using PowerPoint and YouTube, video is at the URL above. It's 47 minutes long including some pauses to get YouTube clips working, plus some bad audio at the end, so you have to be committed. My project has a long way to go, but Forth does now actually run on the Vectrex.
|
|
|
Post by D-Type on May 31, 2019 17:23:43 GMT -5
Vectrex Programming with Forth - Part 3 - It's Alive!
After a full year since the last videos I did, I finally got a spare half an hour to record another video. This time I have Forth running on the Vectrex and can show you round a little bit. This was a quick and dirty video, done in one take, don't expect too much. 10 minutes only, that's more like it.
Contents:
A quick look around the four parts:
- Chromium Compiler/Assembler
- CamelForth (VecForth)
- Vectrex API
- User Program
Cart header code
VecFever cart header code
A few of the API BIOS interface words
Test program
Compiling the code
Transfer the binary to VecFever & Emulate
Forth running interactively, to terminal and Vector monitor:
- Run turtle program
- Run grid (Slow & Fast) program
- Create a new Forth "Hello" word (colon definition)
- Running a precompiled "Hello World!" program
- Playing a simple Pontoon game
|
|
|
Post by D-Type on May 31, 2019 17:29:08 GMT -5
Vectrex Programming with Forth - Part 4 - Porting a Game - 2048
See list further down for topics discussed.
Like London buses, you wait for ages and then two come at once. Now I have Forth running, time to make a game - 2048. Actually, I wasn't working on this to begin with, but I came across the Forth source code in Rosetta Code and I thought it would be easy and fun to port it as a little diversion. And so it was, it only took a few days, though it's not complete, and just a proof of concept, but I learned things I didn't know before. 13 minutes this time.
Contents: RosettaCode - 2048 in Forth
Cut, paste and run in Gforth
Review changes to code to make 2048 run on the Vectrex using BeyondCompare:
- No ?DO or CASE statement
- New keys to play
- Write text to vector display and/or terminal
Cross-compile, send to VecFever
Run Hello World! to vector display and terminal
Run 2048 to vector display
Pause program and dump the memory, then restart
Abort! I trashed the stack, so need to resend down to the VecFever
|
|