Mikebloke Posted April 19, 2018 Share Posted April 19, 2018 Hi everyone, bit of a heavy first post I guess. I'm not the smartest tool in the box, and although I've done my fair share of programming, I'm only really just dipping my toe into Assembly for console homebrew. Because I like nothing to be easy, I wanted to start with the Channel F, which I have on hardware in the form of a Grandstand (as I'm British) with about half the original library boxed. I've delved into the VES wiki, got the MESS program working, taken a good look at some example code on the wiki of which I understand some of it, but when I try to assemble through dasm any of this code it brings up a string of errors in the form of "Unknown Mnemonic" starting with the "org" instruction every time. In fact, I've only got one of them to assemble and run in MESS at all, and that is F8 of Nations by nycurt! Am I doing something really stupid that I can't even assemble code provided by the wiki in the program that the wiki provides? I'm following the same instructions that is provided in the documentation for dasm going through command prompt, and ensuring the files start with the F8 label. I did manage to get the Lights Out by Sean Riddle to assemble and boot up in MESS, but it can't get past creating the grid, whereas the .bin file provided on the wiki works fine. Any help with this I would be really grateful, and I'll provide anything anyone needs to know from my end about what I'm doing, just would really like to take a shot at this but feel I'm falling at the first hurdle! Quote Link to comment Share on other sites More sharing options...
Kurt_Woloch Posted April 19, 2018 Share Posted April 19, 2018 Did you set the directive "processor F8"? If you did that and it still doesn't work, how about posting your code so that we can inspect what's possibly wrong? Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted April 20, 2018 Share Posted April 20, 2018 Try using DASM, and use this code in a batch file: dasm gametitle.asm -lgametitle.txt -f3 -v5 -ogametitle.bin pause Welcome to the Channel F, we need more programmers for it! Quote Link to comment Share on other sites More sharing options...
Mikebloke Posted April 20, 2018 Author Share Posted April 20, 2018 Did you set the directive "processor F8"? If you did that and it still doesn't work, how about posting your code so that we can inspect what's possibly wrong? Yes I did, although I get the feeling some of the example code on the VES wiki isn't all designed to jump into dasm, its probably me just being stupid and not realising there is two different assemblers being used for the code available. Try using DASM, and use this code in a batch file: dasm gametitle.asm -lgametitle.txt -f3 -v5 -ogametitle.bin pause Welcome to the Channel F, we need more programmers for it! Thank you! This actually has helped, a little. I've now managed to get the Scrolling Mountains example to assemble in dasm and load correctly into MESS. Now to try changing things! Quote Link to comment Share on other sites More sharing options...
carlsson Posted April 23, 2018 Share Posted April 23, 2018 You might have had some bad luck. I tried a few of the sources. Tetris runs after assembly, though the latest version of Pac-Man generates a much too large file and won't start. Combined with that you got both Scrolling Mountains and F8 of Nations to work, and almost got Lights Out to work, it seems promising that source code posted can be made to run without a lot of hand work. Quote Link to comment Share on other sites More sharing options...
+SpiceWare Posted April 23, 2018 Share Posted April 23, 2018 processor needs to be indented like this using tab(s) or space(s): processor F8 If it's all the way to the left you'll get errors: processor F8 Quote Link to comment Share on other sites More sharing options...
Mikebloke Posted April 23, 2018 Author Share Posted April 23, 2018 You might have had some bad luck. I tried a few of the sources. Tetris runs after assembly, though the latest version of Pac-Man generates a much too large file and won't start. Combined with that you got both Scrolling Mountains and F8 of Nations to work, and almost got Lights Out to work, it seems promising that source code posted can be made to run without a lot of hand work. Yeah, I think there is a more up to date version of dasm around too, not sure if that effects anything. I've started playing around with code in examples like the Scrolling Mountains and the early version of Pac Man without the Ghosts to get the feel of it, actually coding from scratch still makes my head hurt though as I don't know exactly what is needed as a minimum. Everything I've tried so far just boots the system games. processor needs to be indented like this using tab(s) or space(s): processor F8 If it's all the way to the left you'll get errors: processor F8 I think the other issue was that some things like the disassembled code for the carts released on the system might have a different syntax, so it doesn't easily just load from f8tool disassembly to dasm assembly. Its probably my ad hoc way of learning a new language too its probably not particularly useful in something like assembly to break working code to learn what works. Quote Link to comment Share on other sites More sharing options...
Kurt_Woloch Posted April 25, 2018 Share Posted April 25, 2018 (edited) OK, now I've got the compiler to work as well. Here are some important bits that shouldn't miss: processor f8 org $800 cartridgeStart: .byte $55, $2B ; cartridge header ;here is where the actual code comes in org $ff0signature: .byte "·K.Woloch· 2018" This will set the correct processor type. The next org command will let the binary start at $0800, which is where ROM starts on the Channel F. Then we have the cartridge header as the first two bytes. The Channel F checks this on startup (after clearing all registers) and only if it's correct, starts execution at $0802. The org $ff0 command places the last bytes given at $0ff0, which is where the cartridge space ends (really? How do you do bigger carts?) The signature gives the content of those last 16 bytes, but it's not important what that is since it isn't checked. I've added the resulting binary of my programming efforts as well. It's not very much yet, and far from a playable game, but it may be a hint of what I'm thinking of... Oh, and here's the main character of the game, but it isn't implemented yet... roadtest.bin Edited April 25, 2018 by Kurt_Woloch 1 Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted April 25, 2018 Share Posted April 25, 2018 Looks good, Kurt, but I thought Mike was going to program a Channel F game. I'm so confused. Quote Link to comment Share on other sites More sharing options...
Mikebloke Posted April 25, 2018 Author Share Posted April 25, 2018 OK, now I've got the compiler to work as well. Here are some important bits that shouldn't miss: processor f8 org $800 cartridgeStart: .byte $55, $2B ; cartridge header ;here is where the actual code comes in org $ff0 signature: .byte "·K.Woloch· 2018" This will set the correct processor type. The next org command will let the binary start at $0800, which is where ROM starts on the Channel F. Then we have the cartridge header as the first two bytes. The Channel F checks this on startup (after clearing all registers) and only if it's correct, starts execution at $0802. The org $ff0 command places the last bytes given at $0ff0, which is where the cartridge space ends (really? How do you do bigger carts?) The signature gives the content of those last 16 bytes, but it's not important what that is since it isn't checked. I've added the resulting binary of my programming efforts as well. It's not very much yet, and far from a playable game, but it may be a hint of what I'm thinking of... 0000.png Oh, and here's the main character of the game, but it isn't implemented yet... playercar.PNG Even this is helpful! Thanks. Every little bit helps. Looks good, Kurt, but I thought Mike was going to program a Channel F game. I'm so confused. Oh I will, and I will show it off once I don't feel embarrassed by it XD Quote Link to comment Share on other sites More sharing options...
carlsson Posted April 25, 2018 Share Posted April 25, 2018 Since there probably won't be demand for an entire F8 programming subsection - there is not even a general Channel F subsection - I suppose several people can post in the same thread unless it starts to become confusing with multiple projects interleaving eachother. Quote Link to comment Share on other sites More sharing options...
Kurt_Woloch Posted April 27, 2018 Share Posted April 27, 2018 OK, thank you for the heads up. And sorry for partially hijacking this thread. I will start my own now concerning my progress and a few more programming questions... Quote Link to comment Share on other sites More sharing options...
Mikebloke Posted May 4, 2018 Author Share Posted May 4, 2018 I don't mind, its actually been helpful. Its bank holiday weekend in the UK so I'm hoping to take advantage and show off what I've managed to modify out of the Pac Man example at least, if nothing else! Quote Link to comment Share on other sites More sharing options...
carlsson Posted May 4, 2018 Share Posted May 4, 2018 It'll be nice to take part of. Are you perhaps working towards Lock and Chase, Turtles or something similar? Quote Link to comment Share on other sites More sharing options...
Mikebloke Posted May 5, 2018 Author Share Posted May 5, 2018 It'll be nice to take part of. Are you perhaps working towards Lock and Chase, Turtles or something similar? That's actually a more sensible first step than I had in my head, I was originally looking at something like "Adventure" but given I can't get a blank screen to load up correctly without help, Turtles might be more doable! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.