The Usotsuki Posted January 21, 2015 Share Posted January 21, 2015 I wonder how hard it would be to port stuff over to the Arcade Board from other systems. Unfortunately I can't seem to get CP/M to boot on the current MESS so the possibility of running the Z80 and the AB side by side isn't there, which would make the idea of porting from, say, ColecoVision be a bit less daunting, slower Z80 aside. Though there is the CreatiVision which uses a 6502, 9918 and PSG (though, SN76489 rather than AY8910)... Quote Link to comment https://forums.atariage.com/topic/234084-now-that-mess-supports-the-arcade-board/ Share on other sites More sharing options...
Keatah Posted January 21, 2015 Share Posted January 21, 2015 Oh how neat. This is like that Sprite Board thing, right? How complete is this emulation/support? Quote Link to comment https://forums.atariage.com/topic/234084-now-that-mess-supports-the-arcade-board/#findComment-3158852 Share on other sites More sharing options...
JamesD Posted January 21, 2015 Share Posted January 21, 2015 (edited) I've had so much trouble with MESS I pretty much gave up using it. Way too volatile. I don't have any details on the arcade board but it shouldn't be too difficult to patch a program to use different addresses. However, you'll probably have to extract the actual game from a cart image and relocate it in memory which would be a bit more work. I suppose you could automated the process by patching an emulator to automate the work for you. That way if you can patch one game you can pretty much patch them all as long as they don't bank switch which would require more work. Porting from 6502 to Z80 would be pretty time consuming and you are basically talking about a complete disassembly and rewrite. Since the arcade board has pretty much zero support and next to no owners, I have to wonder what the point is though. *edit* Or is this a different arcade board than I'm thinking of? Edited January 21, 2015 by JamesD Quote Link to comment https://forums.atariage.com/topic/234084-now-that-mess-supports-the-arcade-board/#findComment-3158874 Share on other sites More sharing options...
JamesD Posted January 21, 2015 Share Posted January 21, 2015 (edited) You are talking about the Apple II board, not the one someone did for S100 buss. So... slightly more complex. I don't know how much of the Apple II hardware the CP/M board has access to so it may not even be possible. (I forgot I was in the Apple II section) Edited January 21, 2015 by JamesD Quote Link to comment https://forums.atariage.com/topic/234084-now-that-mess-supports-the-arcade-board/#findComment-3158881 Share on other sites More sharing options...
The Usotsuki Posted January 21, 2015 Author Share Posted January 21, 2015 The Z80 SoftCard has full access to all the Apple memory (it doesn't have any of its own), but in a different arrangement. The "Arcade Board" is a TMS9918 sprite card with an AY8910 on it (though addressed differently than the Mockingboard). There seems to be a bug of some sort, because the memory test breaks, but at least BDEMO works pretty well, as do most of the test programs. Here's a test disk. The switch "-sl4 arcbd" is needed to give to MESS to enable it, and it puts the 9918 display on the right opposite the regular display. Quote Link to comment https://forums.atariage.com/topic/234084-now-that-mess-supports-the-arcade-board/#findComment-3159060 Share on other sites More sharing options...
JamesD Posted January 22, 2015 Share Posted January 22, 2015 As long as the Z80 has full access my comments should hold. You *may* need to relocate code and will definitely need to change addresses. Speed will probably be an issue on games that reuse sprites a lot so pick something simple to start. The Colecovision doesn't use an AY sound chip but a conversion could be done. The AY has a wider range so it's a matter of extracting channel and converting frequency info between chips for the most part. I'd suggest a Mockinboard to handle the sound due to the extra channel but there are extra steps involved when writing to a Mockingboard. Otherwise you have to drop a channel or multiplex a channel. I wouldn't even know where to begin on the last option other than alternate between channel settings every interrupt. Set the AY waveform to a square wave since the SN waveform is fixed. It will require more code and data though since the physical interface on the AY chip is more complex. I think the SN has channel and frequency combined if I remember right. On the AY it is separate and you may need to set high and low parts of the frequency. Changes to the player shouldn't be huge but the amount of data will increase. The Creatavision steps would be similar but you could skip the CP/M board. You'd need to convert to keyboard and Apple joystick. Quote Link to comment https://forums.atariage.com/topic/234084-now-that-mess-supports-the-arcade-board/#findComment-3159247 Share on other sites More sharing options...
The Usotsuki Posted January 22, 2015 Author Share Posted January 22, 2015 Keyboard's easy enough. Hell, accessing the keyboard is easier on the Apple than prolly any other 8-bit platform. XD Joystick... Well, I have the Applesoft disassembly by Bob Sander-Cederlof, I can probably use the PDL() code as a base for handling the joystick. What might be particularly interesting is a port of Zelda. What might be a better *start* would be code to set up the 9918 in 40x24 text mode and use it for text display. Quote Link to comment https://forums.atariage.com/topic/234084-now-that-mess-supports-the-arcade-board/#findComment-3159258 Share on other sites More sharing options...
JamesD Posted January 22, 2015 Share Posted January 22, 2015 (edited) Keyboard's easy enough. Hell, accessing the keyboard is easier on the Apple than prolly any other 8-bit platform. XD Joystick... Well, I have the Applesoft disassembly by Bob Sander-Cederlof, I can probably use the PDL() code as a base for handling the joystick. What might be particularly interesting is a port of Zelda. What might be a better *start* would be code to set up the 9918 in 40x24 text mode and use it for text display. Mod the MESS code to use one of the newer graphics chips and use 80x24 text. Edited January 22, 2015 by JamesD Quote Link to comment https://forums.atariage.com/topic/234084-now-that-mess-supports-the-arcade-board/#findComment-3159267 Share on other sites More sharing options...
The Usotsuki Posted January 22, 2015 Author Share Posted January 22, 2015 IIRC, wouldn't the extra lines on the V9938 interfere with access to the AY8910? Though 40x24 would be a start. It would still be an improvement over Apple text - especially if CP437 were loaded onto the RAM. Quote Link to comment https://forums.atariage.com/topic/234084-now-that-mess-supports-the-arcade-board/#findComment-3159273 Share on other sites More sharing options...
JamesD Posted January 22, 2015 Share Posted January 22, 2015 IIRC, wouldn't the extra lines on the V9938 interfere with access to the AY8910? Though 40x24 would be a start. It would still be an improvement over Apple text - especially if CP437 were loaded onto the RAM. I'd have to do a little research. I thought the 9938 and 9958 were interfaced the same on the CPU side but could address more dedicated video RAM. As long as they don't require any more memory addresses to the CPU it wouldn't be a problem. If the AY is addressed before the VDP then it shouldn't matter either. Quote Link to comment https://forums.atariage.com/topic/234084-now-that-mess-supports-the-arcade-board/#findComment-3159824 Share on other sites More sharing options...
JamesD Posted January 22, 2015 Share Posted January 22, 2015 I glanced at the docs. The 9938 requires 4 memory addresses. Quote Link to comment https://forums.atariage.com/topic/234084-now-that-mess-supports-the-arcade-board/#findComment-3159851 Share on other sites More sharing options...
The Usotsuki Posted January 23, 2015 Author Share Posted January 23, 2015 Hm. The TMS9918 is hooked to 4 lines on the Arcade Board, though code is set up to use 2 for read and 2 for write always. It should be doable, then, but might break the demos (that's prolly fixable, especially for the big demo which defines the addresses as variables in code). Running as a ][+ instead of a //e, I recognize the particular failure mode of the "softcard" device under CP/M 2.2: it's the same one that came up when *I* tried implementing a Z80 in Dapple. So I guess it "works", but not well enough for CP/M. I do have a couple smaller (i.e., 8 KB) MSX games to possibly bring over, and both have Apple ][ versions... Quote Link to comment https://forums.atariage.com/topic/234084-now-that-mess-supports-the-arcade-board/#findComment-3159860 Share on other sites More sharing options...
JamesD Posted January 23, 2015 Share Posted January 23, 2015 (edited) I finally found the 9918 info buried in the docs. It uses 4 addresses as well. I think the newer chips are backwards compatible but they support additional internal registers and commands. *edit* Not sure what you meant by lines so I double checked. Section 4 of the 9918 manual has the info. Edited January 23, 2015 by JamesD Quote Link to comment https://forums.atariage.com/topic/234084-now-that-mess-supports-the-arcade-board/#findComment-3159918 Share on other sites More sharing options...
The Usotsuki Posted January 24, 2015 Author Share Posted January 24, 2015 (edited) It's a start! ETA: I'm starting to see success staring back at me. 10 POKE 49347, 0: POKE 49347, 0 20 FOR I=128 TO 135: READ X: POKE 49347, X: POKE 49347, I: NEXT 30 DATA 0,208,2,0,0,32,0,245 40 PRINT:PRINT CHR$(4)"BLOAD MSX.FNT,A$4000" 50 POKE 49347, 0: POKE 49347, 0 60 PRINT "INITIALIZING MEMORY": FOR I=0 TO 16383: POKE 49346, 0: NEXT 70 POKE 49347, 0: POKE 49347, 64 80 PRINT "COPYING FONT": FOR I = 0 TO 2047: POKE 49346,PEEK (16384+I): NEXT 90 PRINT "PRINTING A TEXT PATTERN" 100 FOR I=0 TO 255: POKE 49346, I: NEXT Edited January 24, 2015 by The Usotsuki Quote Link to comment https://forums.atariage.com/topic/234084-now-that-mess-supports-the-arcade-board/#findComment-3161036 Share on other sites More sharing options...
The Usotsuki Posted January 24, 2015 Author Share Posted January 24, 2015 Well... I kind-of have this and I kind-of don't. This works... 10 FOR I=2088 TO 3007 20 A1=I-256*INT(I/256):A2=INT(I/256) 30 A3=(I+16344)-256*INT((I+16344)/256):A4=INT((I+16344)/256) 40 POKE 49347,A1:POKE 49347,A2:X=PEEK(49344):POKE 49347,A3:POKE 49347,A4:POKE 49346,X 50 NEXT I 60 FOR I=1 TO 40:POKE 49346,160:NEXT works, but my attempt to translate it to 6502... abslot = 4 abbase = $C080+(abslot<<4) abrddat = abbase abwrdat = abbase+2 abwrreg = abbase+3 .org $9000 entry: lda #$28 sta $05 lda #$08 sta $06 lda #$00 sta $07 lda #$48 @1: lda $05 sta abwrreg lda $06 sta abwrreg ldx abrddat lda $07 sta abwrreg lda $08 sta abwrreg stx abwrdat inc $05 bne @2 inc $06 @2: inc $07 bne @3 inc $08 @3: lda $07 cmp #$98 bne @1 lda $08 cmp #$4B bne @1 rts lda #' '+$80 ldy #$40 @4: sta abwrdat dey bne @4 rts ...fails horribly. This is the code to scroll the 40x24 display up one line. Quote Link to comment https://forums.atariage.com/topic/234084-now-that-mess-supports-the-arcade-board/#findComment-3161398 Share on other sites More sharing options...
The Usotsuki Posted January 25, 2015 Author Share Posted January 25, 2015 It's alive! http://3.buric.co/tms01.zipThe code's a bit messy but AFAICT it works. There's no support for graphics (yet, I'm considering it) or the 32x24 text mode, or slots other than 4 (you can easily reassemble for that by changing "abslot").Here's the commands:USR() and &POKE are the equivalent of PEEK and POKE for the VDP's memory. They work just like the 6502 equivalents.&COLOR= sets the color of the display. TMS seemed to like white on medium blue and a lot of 9918-based systems seemed to go with it; this is 245. (Color values are computed background*16+foreground.)&TEXT initializes the TMS9918 in text mode. This code comes pretty much straight out of the manual. &DEF loads a font quickly into the memory (faster than doing 2048 peeks and pokes). You'll see this used in the HELLO file.&HOME clears the screen. &HTAB and &VTAB move the cursor. These all work like the FPBASIC commands.&ON enables, and &END disables, I/O redirection to the 9918. (The Arcade Board has an AY8910, but I haven't yet rewritten the bell code to use it in place of the system beeper.) &END is equivalent to PR#0:IN#0.When PRINTing, most control characters work as expected with Ctrl-L clearing the screen.INVERSE text is somewhat supported, but you need to use POKE 50,127 to avoid undesirable side effects (NORMAL works *cough* normally).I'm open to improvements - I am a terrible 6502 coder after all. Quote Link to comment https://forums.atariage.com/topic/234084-now-that-mess-supports-the-arcade-board/#findComment-3161563 Share on other sites More sharing options...
JamesD Posted January 25, 2015 Share Posted January 25, 2015 I'm open to improvements - I am a terrible 6502 coder after all.I'd start with a few comments. Quote Link to comment https://forums.atariage.com/topic/234084-now-that-mess-supports-the-arcade-board/#findComment-3161614 Share on other sites More sharing options...
The Usotsuki Posted January 25, 2015 Author Share Posted January 25, 2015 There are comments - although putch, getch and scroll are admittedly poorly commented. In getch's case it's because I never really finished it, but only implemented the bare minimum to get it working and showing a cursor. Quote Link to comment https://forums.atariage.com/topic/234084-now-that-mess-supports-the-arcade-board/#findComment-3161621 Share on other sites More sharing options...
trash_44fr Posted January 25, 2015 Share Posted January 25, 2015 It's alive! http://3.buric.co/tms01.zip Unfortunately, the link appears to be broken. Quote Link to comment https://forums.atariage.com/topic/234084-now-that-mess-supports-the-arcade-board/#findComment-3161721 Share on other sites More sharing options...
Keatah Posted January 25, 2015 Share Posted January 25, 2015 Link works fine. Quote Link to comment https://forums.atariage.com/topic/234084-now-that-mess-supports-the-arcade-board/#findComment-3161728 Share on other sites More sharing options...
The Usotsuki Posted January 25, 2015 Author Share Posted January 25, 2015 Checked it and it works on my end. o.o; Typical of me it's some awful, brute force coding. But I think I get how at least the 9918 interfacing works. I figured this would be the most practical starting point, rather than trying to port stuff right away and watching my head explode. Quote Link to comment https://forums.atariage.com/topic/234084-now-that-mess-supports-the-arcade-board/#findComment-3161759 Share on other sites More sharing options...
The Usotsuki Posted January 25, 2015 Author Share Posted January 25, 2015 http://3.buric.co/tms02.zip This version will work under ProDOS. Also I cleaned up the source a little bit. I'm not sure what I want to try to tackle next - Graphics II (which will be &HGR) or Graphics I. I should probably try to figure out how to move the system bell to the Arcade Board, by modifying what's left of my "Mockingbell" code... Quote Link to comment https://forums.atariage.com/topic/234084-now-that-mess-supports-the-arcade-board/#findComment-3161791 Share on other sites More sharing options...
JamesD Posted January 25, 2015 Share Posted January 25, 2015 (edited) There are comments - although putch, getch and scroll are admittedly poorly commented.Those aren't comments, those are labels. *edit* I just grabbed the latest version and it looks much better. Edited January 25, 2015 by JamesD Quote Link to comment https://forums.atariage.com/topic/234084-now-that-mess-supports-the-arcade-board/#findComment-3162144 Share on other sites More sharing options...
The Usotsuki Posted January 31, 2015 Author Share Posted January 31, 2015 I'm trying to figure out stuff about the graphics mode now. Wish I could dump the VRAM from a running MSX, SG or ColecoVision. My as yet unreleased current code base allows me to set up the modes (&GR1, &HGR) but I can't really do much with them yet. Quote Link to comment https://forums.atariage.com/topic/234084-now-that-mess-supports-the-arcade-board/#findComment-3166842 Share on other sites More sharing options...
The Usotsuki Posted January 31, 2015 Author Share Posted January 31, 2015 http://3.buric.co/tms04.zip Being able to use &GR1 as if it were a text mode might be helpful in me trying to experiment with sprites. Quote Link to comment https://forums.atariage.com/topic/234084-now-that-mess-supports-the-arcade-board/#findComment-3166927 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.