Jump to content
Sign in to follow this  
Mikebloke

Getting the F8 Assembler to work for Fairchild Channel F homebrew

Recommended Posts

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!

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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...

 

post-8393-0-34199500-1524681774.png

 

Oh, and here's the main character of the game, but it isn't implemented yet...

 

post-8393-0-41461500-1524682010.png

roadtest.bin

Edited by Kurt_Woloch
  • Like 1

Share this post


Link to post
Share on other sites

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...

 

attachicon.gif0000.png

 

Oh, and here's the main character of the game, but it isn't implemented yet...

 

attachicon.gifplayercar.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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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...

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites

It'll be nice to take part of. Are you perhaps working towards Lock and Chase, Turtles or something similar?

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...