Jump to content

tobiasvl

New Members
  • Content Count

    8
  • Joined

  • Last visited

Community Reputation

0 Neutral

About tobiasvl

  • Rank
    Combat Commando

Contact / Social Media

Profile Information

  • Gender
    Male
  • Location
    Norway
  1. Ah, thank you! I'm guessing Turner is correct, it fits with what the F8 Programming Guide says. Yes, it'd be strange if you could LD r15 like that, but there's no AS QL, for example, so it'd be nice to have those logical instructions work for r15. It seems they don't though. I can double check with MESS/MAME. I'll look at making the table readable on a phone (probably with scrolling, as it can't possibly fit horizontally). Thanks for pointing it out. I'll also replace the r15 opcodes with NOPs. (Perhaps the same should be done on the wiki.)
  2. Hey! Hope it's OK to bump this, there's a limit to how many niche Channel F programming threads I'm comfortable with creating here. My project hit a little snag with the timer interrupt stuff, and then the lockdown happened and I was stuck at home with two kids for several weeks, etc etc. Picking up the F8 again now though. But I realized I never thanked @e5frog for his great reply – sorry. It was indispensable. Still didn't get the timer to work like I want it to, but that's on me and not you. MESS is great. You're quite right, I have experience with other assembly languages/architectures. I do have experience with several of them, though (M6800/6502, 8080/8085, Z80/Game Boy, probably more) and I still think F8 is the strangest. But that's part of the appeal! When reading up on the F8 I realized there's no traditional (reverse) opcode table on it anywhere, at least that I've found. So I've started making one. It's not done yet, but here's what I have so far: https://tobiasvl.github.io/opcode-tables/f8/classic – any thoughts would be welcome. It's interesting to see how the decoding is laid out (there's also an octal view, selectable up top, since the matrix on the F8 is mostly octal). I plan to add some more clarifying information below the table (especially when it comes to registers and ISAR), perhaps some more tooltip texts to explain operands. A couple of questions I just had, but which I guess I can find the answer to myself: Do the three illegal opcodes $2E, $2D and $2F have any effect? Is 15 a valid scratchpad register operand? The F8 programming manual just says that 0 through 11, and 12/S, 13/I and 14/D are allowed. So I guess not, but there's nothing about that in the table on the VESwiki. So are $4F and $5F illegal opcodes? Of course if they're legal they would be equivalent to $03 and $07, but what about $3F, $CF, $DF, $EF and $FF which all would do different things to register 15? I can probably test this myself in MESS.
  3. Assembly isn't that hard, you just need to consider how the memory is laid out and how it can flow between registers. Which is clearly easier said than done. In the example above, since I realized after posting my last reply that the address is fixed and the buffer is just from $2F00 to $2FFF, so I can simply do this instead: lr ql, a li $2F lr qu, a lr dc, q I do add a byte to an arbitrary address somewhere else, though, so I'll still have to use something like what I wrote above there, luckily! Anyway. Sometimes I think assembly is easier than high-level programming. It's like building with legos. It's hard to quickly understand what a piece of assembly code does afterwards though, so I try to comment it fairly heavily while I write it. I'll share the code later when I've weeded out all this embarrassing stuff, in case it's useful.
  4. I might just be talking to myself here, but two more things have been a pain in the butt: Shift instructions don't affect the carry flag, and consequently there's no "shift with carry" instructions either. Not a big deal, easy to circumvent. A bit annoying though. The ADC instruction treats A as a signed two's complement number??? Okay, they really didn't want to have a "subtract from DC" instruction, fair enough, but this is extremely annoying when I want to add $80 or more to the DC. Are there any clever F8 idioms here that people use? This one really had me stumped for a while, would probably be nice if http://channelf.se/veswiki/index.php?title=Opcode mentioned that fact. This is what I ended up doing in my usecase: ; A holds an offset in a buffer: The 5 upper bits are the Y coordinate and the 3 lower bits are the X coordinate dci $2f00 ; location of buffer bp .adcHack ; if the number to add to $28f0 is less than $80, we just add it ni %01111111 ; if not, we clear the "sign" bit dci $2f80 ; and address the middle of the buffer instead .adcHack: adc ; add unsigned A This is going to be some real spaghetti code, I might hire @e5frog to do an optimization pass after I'm done 😝
  5. Trucking along here... How do local timer interrupts work exactly? I've read the F8 Guide to Programming, and the clock example in 8.3.3 is clear enough, but I don't understand how to tell the CPU where the interrupt routine is located. The example orgs the interrupt routine to $0200, but it doesn't seem to tell the CPU that it's there. Section 8.2.7 talks about an "interrupt address register" which holds the address for that example, but as far as I understand that's only the case when the interrupt is triggered by an external device, not when it's local... Well, I'm not sure I understand it at all. Are there any timer examples in any of the disassembled Channel F ROMs?
  6. Hehe, well, right now I'm doing something with little artistic merit in itself, but maybe some practical value.. We'll see! The F8 architecture seems nice enough, although having to wrap my head around ISAR is the biggest hurdle so far. The RAM/register dichotomy is really nice actually, being able to easily increment and decrement a "register pointer", but the missing "OR with register" instruction means it's harder than it ought to be to map a number to the corresponding register, which was the use-case I had when I asked originally. Based on the XOR/AND/XOR idea from batari I made this ugly macro: MAC OS ; adds missing instruction: OS r ; modifies r0 com lr 0, a lr a, {1} com ns 0 com ENDM Thanks for the link to the other thread, it seems a bit more hardware/collector focused and that's not really my jam, but cool to see so many people interested in the system! One other question: What's the best emulator choice nowadays, and especially on Linux? I see VESWiki uses MESS for Windows, but that's since been swallowed up by MAME, hasn't it? I fired up MAME and didn't understand anything of how it worked, so I'm using the development package from VESWiki right now with MESS from 2004 on my Windows partition.
  7. Oh, yeah! You're right, I vaguely remember this from college myself. NAND is functionally complete on its own. Thanks, I should've thought of that trick!
  8. Hey, I'm new here, hope starting a new thread for this is OK. I'm working on a little Channel F project and I have a couple of questions so far, will probably have more over the next days/weeks as I encounter them... First off: Is there really no way to OR two registers? There's XS and NS for XOR and AND respectively, but no OR (AS can be used to OR one high and one low nibble though). I guess I can do OM which does an OR of A and the value at DC0, but in order to be able to use that for a non-hardcoded value I need to use Schach RAM to put the byte I need to OR with A? That sounds so extremely convoluted I almost can't believe it! But I can work with it, of course, unless there's another way. Second: I have about 300 lines of code so far but I haven't dared draw anything to the screen yet, hehe. Just so I understand this correctly, you draw per-pixel by saying what color the pixel should be. You set it to either red, blue, green or transparent. The background color is defined by the palette columns; if it's black, all colors except transparent are displayed as white instead. Does that sum it up? Thanks!
×
×
  • Create New...