Jump to content

Photo

Getting the F8 Assembler to work for Fairchild Channel F homebrew


14 replies to this topic

#1 Mikebloke OFFLINE  

Mikebloke

    Space Invader

  • 16 posts

Posted Wed Apr 18, 2018 6:23 PM

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!



#2 Kurt_Woloch OFFLINE  

Kurt_Woloch

    Stargunner

  • 1,425 posts

Posted Thu Apr 19, 2018 3:13 PM

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?



#3 atari2600land OFFLINE  

atari2600land

    Channel F Viewer

  • 11,480 posts
  • Location:Salem, Oregon

Posted Thu Apr 19, 2018 7:25 PM

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!

#4 Mikebloke OFFLINE  

Mikebloke

    Space Invader

  • Topic Starter
  • 16 posts

Posted Fri Apr 20, 2018 6:07 AM

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!



#5 carlsson ONLINE  

carlsson

    Metagalactic Mule

  • 7,895 posts
  • Location:Västerås, Sweden

Posted Mon Apr 23, 2018 4:29 AM

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.



#6 SpiceWare OFFLINE  

SpiceWare

    Draconian

  • 12,466 posts
  • Medieval Mayhem
  • Location:Planet Houston

Posted Mon Apr 23, 2018 2:29 PM

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


#7 Mikebloke OFFLINE  

Mikebloke

    Space Invader

  • Topic Starter
  • 16 posts

Posted Mon Apr 23, 2018 4:07 PM

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.



#8 Kurt_Woloch OFFLINE  

Kurt_Woloch

    Stargunner

  • 1,425 posts

Posted Wed Apr 25, 2018 12:48 PM

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

Attached Files


Edited by Kurt_Woloch, Wed Apr 25, 2018 1:31 PM.


#9 atari2600land OFFLINE  

atari2600land

    Channel F Viewer

  • 11,480 posts
  • Location:Salem, Oregon

Posted Wed Apr 25, 2018 2:08 PM

Looks good, Kurt, but I thought Mike was going to program a Channel F game. I'm so confused.



#10 Mikebloke OFFLINE  

Mikebloke

    Space Invader

  • Topic Starter
  • 16 posts

Posted Wed Apr 25, 2018 4:01 PM

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



#11 carlsson ONLINE  

carlsson

    Metagalactic Mule

  • 7,895 posts
  • Location:Västerås, Sweden

Posted Wed Apr 25, 2018 5:28 PM

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.



#12 Kurt_Woloch OFFLINE  

Kurt_Woloch

    Stargunner

  • 1,425 posts

Posted Fri Apr 27, 2018 10:12 AM

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



#13 Mikebloke OFFLINE  

Mikebloke

    Space Invader

  • Topic Starter
  • 16 posts

Posted Fri May 4, 2018 4:54 AM

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!



#14 carlsson ONLINE  

carlsson

    Metagalactic Mule

  • 7,895 posts
  • Location:Västerås, Sweden

Posted Fri May 4, 2018 7:05 AM

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



#15 Mikebloke OFFLINE  

Mikebloke

    Space Invader

  • Topic Starter
  • 16 posts

Posted Sat May 5, 2018 12:12 PM

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!






0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users