+SmittyB Posted June 26, 2019 Share Posted June 26, 2019 I think you should just be able to change CHARBASE to whatever the high byte is for the starting address of your tiles in RAM. You would need extra RAM on the cartridge as it would take 4k for a 16 high zone (16 lines * 256 bytes per page) to store everything. 2 Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted June 26, 2019 Share Posted June 26, 2019 Online version updated: https://www.randomterrain.com/7800basic.html 2 Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted June 26, 2019 Share Posted June 26, 2019 13 hours ago, SmittyB said: I think you should just be able to change CHARBASE to whatever the high byte is for the starting address of your tiles in RAM. You would need extra RAM on the cartridge as it would take 4k for a 16 high zone (16 lines * 256 bytes per page) to store everything. Good to know. Is there a function in any of the 7800 emulators to do a binary dump of the RAM contents? And I would need 8k of RAM for mine as I will be double buffering the font. Quote Link to comment Share on other sites More sharing options...
RevEng Posted June 26, 2019 Author Share Posted June 26, 2019 mame and a7800 can dump memory from the debugger. There's a primer for the debugger at 7800.8bitdev.org. Specifically you're looking at either the save (bin) or dump (txt) debugger commands. 1 Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted June 27, 2019 Share Posted June 27, 2019 Last q: do any of the emulators have support for the XM keyboard? Might as well make it a full fledged font editor. Quote Link to comment Share on other sites More sharing options...
RevEng Posted June 27, 2019 Author Share Posted June 27, 2019 There haven't been any developer or technical docs released for the XM, so none of the emulators have support the keyboard. It's quite likely we'd also need a copy of the XM bios too, or equivalent code. Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted June 27, 2019 Share Posted June 27, 2019 If not the keyboard ... how about the CX50 keypad controllers? Joystick in the left controller, and then the keypad in the right for extra functions. Quote Link to comment Share on other sites More sharing options...
RevEng Posted June 27, 2019 Author Share Posted June 27, 2019 Sure, a7800 handles those, and a bunch of other controls. There's some very preliminary support for keypads in 7800basic (also paddles, driving controls, trakballs, amiga/st mice) but as of right now I haven't sufficiently bug-tested or updated the docs+code samples. 1 1 Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted June 27, 2019 Share Posted June 27, 2019 Keypad it is then. But: the moment the XM Keyboard specs become known, i intend my utility to be the first app written for it! 2 Quote Link to comment Share on other sites More sharing options...
+SmittyB Posted July 1, 2019 Share Posted July 1, 2019 On 6/27/2019 at 5:13 AM, Synthpopalooza said: Keypad it is then As I had a lot of trouble trying to understand keypads I've copied the code I use below in case it helps you or anyone else in the future. It's based on code I found posted in the 2600 forums back in 2012 by alex_79 so I can't take credit for it. It reads 1 button at a time and if multiple are pressed it will return the lower-rightmost. It's possible to expand this to read 3 keys simultaneously as long as each is in a different column due to hardware limitations of the keypad circuitry. rem ------------------------ rem Read Keypad - Credit to alex_79 rem ------------------------ rem +++++++++++++ rem + 1 + 2 + 3 + rem +++++++++++++ rem + 4 + 5 + 6 + rem +++++++++++++ rem + 7 + 8 + 9 + rem +++++++++++++ rem +10 +11 +12 + rem +++++++++++++ readKeypad rem disable 2-button mode on 2nd joy port... SWCHB=$ff:CTLSWB=$04:SWCHB=$00 rem SWACNT - 0 = Input, 1 = Output asm ;Set pins to output Right=#$0F, Left=#$F0 lda #$0F ;0F sta SWACNT keypadReadkeypad lda #$0F ;Right=#$0F, Left=#$F0 ldx #12 ;12 clc keypadNextRow ror sta SWCHA ldy #255 ;150 loops minimum, more delay = more reliable results keypadWait ;5*150 = 750 cycles (418us) dey ;2 cycles bne keypadWait ;3 bit INPT5 ;Right=INPT5 ;Left=INPT4 bpl keypadKeypressed dex bit INPT3 ;Right=INPT3 ;Left=INPT1 bpl keypadKeypressed dex bit INPT2 ;Right=INPT2 ;Left=INPT0 bpl keypadKeypressed dex bne keypadNextRow keypadKeypressed stx keypadCurrentKey ;Store result for later reading ;Reset SWACNT for joysticks (Set all pins to inputs) lda #$00 sta SWACNT end return 1 Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted July 1, 2019 Share Posted July 1, 2019 Got an e-mail today. Here's part of it: Quote I have been looking into porting some games over to 7800 Basic and may need some help if I get stuck. I am not allowed to use AtariAge, I am wondering if there is another website where I can get help from? Is there another web site where a person can get help with 7800basic? Quote Link to comment Share on other sites More sharing options...
RevEng Posted July 1, 2019 Author Share Posted July 1, 2019 Nope. This thread on AA is the home of 7800basic support, and where all of the active user community is. 1 Quote Link to comment Share on other sites More sharing options...
Mord Posted July 4, 2019 Share Posted July 4, 2019 Sounds like the best he'll be able to do is have someone forward his questions for him or do some extensive searches in the forum to see if the question has already been answered. At the very least there's been a lot of odd issues we've already resolved. At the very least they should re-read this thread entirely if needed. They should also keep Random Terrain's 7800Basic page bookmarked as it's excellent for looking stuff up. 1 Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted July 4, 2019 Share Posted July 4, 2019 OK, so I am trying some 320D experiments. When I compile, I get this: Problem characters in 320D_1a.png Attaching my .bas file and source incgraphics. Basically, I want to use $44 in even columns and $84 in odd columns, while BAK and P0C1 are both black. Can someone troubleshoot this? 320Dtest.bas Quote Link to comment Share on other sites More sharing options...
RevEng Posted July 5, 2019 Author Share Posted July 5, 2019 Rename your files to being with a letter. incgraphic filenames can't start with characters... it's a limitation inherited from dasm. From the guide... The graphic plotting commands will access your image by its filename, without the .png extension. Because of this, it has certain restrictions on the file naming to avoid confusing the 7800basic compiler… Each name should be unique. Each name should contain only letters and digits. Each name should begin with a letter character. Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted July 5, 2019 Share Posted July 5, 2019 So ... does 320D require the setting of Kangaroo mode off for all the color combinations to display, like in 320B? Quote Link to comment Share on other sites More sharing options...
RevEng Posted July 5, 2019 Author Share Posted July 5, 2019 I haven't really done much in 320D, but if you want to use the register that's normally transparent for a color, then yes. (true for any of the modes) Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted July 5, 2019 Share Posted July 5, 2019 So I have this code for setting Kangaroo mode on in 320B: asm lda #%01000110 ;Turn on Kangaroo Mode in 320B sta CTRL sta sCTRL end How do I modify this for 320D? Quote Link to comment Share on other sites More sharing options...
RevEng Posted July 5, 2019 Author Share Posted July 5, 2019 320B and 320D use the same CTRL "read mode", so you don't need to change that. The thing that distinguishes a particular object being either 320B or 320D is in the object's DL entry. (the "write mode") 7800basic's plot* functions will handle that for you, so long as you specified 320D with incraphic. Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted July 5, 2019 Share Posted July 5, 2019 So I don't think I am doing this correctly. I am including the incgraphics. So the idea is, I want columns 0, 2, 4, 6 to be red, and columns 1, 3, 5, 7 to be cyan. Problem is, the second lot of graphics, where the cyan should appear in the odd columns, all show solid black. I am thinking the problem might lie with the layout of 320D, or I don't have kangaroo mode set properly. Any ideas? 320Dtest.bas 320Dtest.bas.a78 320Dtest.bas.asm 320Dtest.bas.bin Quote Link to comment Share on other sites More sharing options...
RevEng Posted July 5, 2019 Author Share Posted July 5, 2019 I'll give it a look when I get a sec, hopefully tomorrow. Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted July 5, 2019 Share Posted July 5, 2019 (edited) I figured it out ... the graphics need all four colors. Even though I am setting BG and P0C1 to black, in the incgraphic there need to be distinct colors for P0C1 on columns 1 and 3. This was the result of my experiment: https://atariage.com/forums/topic/292439-character-flipping-for-extra-colors-a-primer/?do=findComment&comment=4304605 It's an interlace test that allows for a fully functional 3 color plus BG 320 display mode across 4 palettes, but with less DMA costs than 320B. It just remains to be seen how it looks on real hardware. 320Dtest.bas.a78 320Dfont.bas.a78 Edited July 5, 2019 by Synthpopalooza Quote Link to comment Share on other sites More sharing options...
+SmittyB Posted July 22, 2019 Share Posted July 22, 2019 Apologies for the long post. I've been running into a bit of a problem importing graphics which seems to put the compilation process into an infinite loop after the graphics data info but before "7800basic compilation complete.". I've just updated from '7800basic.0.6beta20170712' to '7800basic.0.6beta20190613' and it has the same problem but interestingly the situation where it used to spit out the below errors as part of the error log now just goes into the suspected infinite loop as well. The issue is that I've got 4 16*16 images I'm trying to import, so 16 160A chunks (for lack of a better word) and I can import them into 2 banks, and if I import 1 more of the 4 images in another bank it gives the below errors on the older version and gets stuck on the newer version, 1 more than that and it gets stuck compiling on both versions which is why I suspect an infinite loop. It doesn't seem to be related to any specific bank as I can import any mixture of the 4 graphics across the banks and as long as I don't go above 8 in total it compiles. It doesn't seem to be related to the images themselves or the filenames. end brace required end brace required (81298): error: Unknown Mnemonic '®hu'. (81299): error: Unknown Mnemonic '®hu'. (81612): error: Unknown Mnemonic '-mtune=generic'. (81613): error: Unknown Mnemonic '-mtune=generic'. (81618): error: Unknown Mnemonic 'int_mult_lo'. (81619): error: Unknown Mnemonic 'int_mult_hi'. (81632): error: Unknown Mnemonic 'int_mult_lo'. (81633): error: Unknown Mnemonic 'int_mult_hi'. (81788): error: Unknown Mnemonic '5'. (81789): error: Unknown Mnemonic '5'. (81792): error: Unknown Mnemonic 'int_mult_lo'. (81793): error: Unknown Mnemonic 'int_mult_hi'. (81794): error: Unknown Mnemonic 'char_mult_lo'. (81795): error: Unknown Mnemonic 'char_mult_hi'. (81826): error: Unknown Mnemonic 'int_mult_lo'. (81827): error: Unknown Mnemonic 'int_mult_hi'. (81828): error: Unknown Mnemonic 'double_mult_lo'. (81829): error: Unknown Mnemonic 'double_mult_hi'. (81854): error: Unknown Mnemonic 'char_mult_lo'. (81855): error: Unknown Mnemonic 'char_mult_hi'. (81878): error: Unknown Mnemonic '-g'. (81879): error: Unknown Mnemonic '-g'. (81882): error: Unknown Mnemonic '-g'. (81883): error: Unknown Mnemonic '-g'. (81888): error: Unknown Mnemonic 'int_mult_lo'. (81889): error: Unknown Mnemonic 'int_mult_hi'. (81906): error: Unknown Mnemonic '-m32'. (81907): error: Unknown Mnemonic '-m32'. (81910): error: Unknown Mnemonic 'int_mult_lo'. (81911): error: Unknown Mnemonic 'int_mult_hi'. (81918): error: Unknown Mnemonic 'unsigned'. (81919): error: Unknown Mnemonic 'unsigned'. (81924): error: Unknown Mnemonic '��_mult_lo'. (81925): error: Unknown Mnemonic '��_mult_hi'. (81932): error: Unknown Mnemonic 'BYTE_mult_lo'. (81933): error: Unknown Mnemonic 'BYTE_mult_hi'. (81962): error: Unknown Mnemonic '-std=gnu99_mult_lo'. (81963): error: Unknown Mnemonic '-std=gnu99_mult_hi'. (81968): error: Unknown Mnemonic 'int_mult_lo'. (81969): error: Unknown Mnemonic 'int_mult_hi'. If it helps, I'm using the 144k bankswitching scheme with banks 3 through 7 (inclusive) containing the same graphics and they all report 26*16 bytes of graphics space free which is more than enough for the 16 chunks I'm trying to import. When it compiles it reports this amount of ROM used. The negative values are where I'm using a DMA hole in that bank (a minor bug? Doesn't seem to affect anything, just makes judging space available difficult). 4186 bytes of ROM space left in the main area of bank 1. 4096 bytes of ROM space left in DMA hole 0. -6144 bytes of ROM space left in the main area of bank 2. 2048 bytes of ROM space left in DMA hole 0. 3411 bytes of ROM space left in the main area of bank 3. 4096 bytes of ROM space left in DMA hole 0. 3034 bytes of ROM space left in the main area of bank 4. 4096 bytes of ROM space left in DMA hole 0. 918 bytes of ROM space left in the main area of bank 5. 4096 bytes of ROM space left in DMA hole 0. -4879 bytes of ROM space left in the main area of bank 6. 3313 bytes of ROM space left in DMA hole 0. -4580 bytes of ROM space left in the main area of bank 7. 3612 bytes of ROM space left in DMA hole 0. 14329 bytes of ROM space left in the main area of bank 8. 0 bytes of ROM space left in the main area of bank 9. 4096 bytes of ROM space left in DMA hole 0. Quote Link to comment Share on other sites More sharing options...
RevEng Posted July 22, 2019 Author Share Posted July 22, 2019 Wow, that's a whole bunch of yuck. It looks like uninitialized memory is somehow getting included in the generated 6502 assembly. I'd like to see the *.list.txt file, if you can share it. If that does't help, I may need the entire source, so I can easily recreate the issue and track it down. PM is fine. 1 Quote Link to comment Share on other sites More sharing options...
+SmittyB Posted July 22, 2019 Share Posted July 22, 2019 I've never seen a *.list.txt file generated so unless it's being generated elsewhere I'll get the source sent across when I can. I have a lot of rubbish in my source folders so it'll take a bit of time to get a minimum example put together. 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.