nitrofurano Posted June 17, 2014 Share Posted June 17, 2014 finally i'm having one of my SG1000/MSX1 Boriel’s ZX-Basic examples working on ColecoVision The problem is that i don’t know why the joystick (accessed from i/o) is not working as expected (i don’t want to use the bios routines since i think it wastes that precious ram area, and i’m still not comfortable enough with that), and i can’t use halt as waitvbl (i think that there should be some code related to nmi there?) about the joystick, perhaps i should use di and ei before and after accessing the joystick from i/o? or is it something else? the sources (in Boriel’s ZX-Basic, and the intermediary .asm for debuging) and the resulting .rom file is there Quote Link to comment Share on other sites More sharing options...
nitrofurano Posted June 17, 2014 Author Share Posted June 17, 2014 (for some reason, i couldn’t add the attachment here successfully - http://nitrofurano.altervista.org/retrocoding/colecovision/colecovision_movingsprites_joystickioandhaltvblnotworkingfine.zip ) Quote Link to comment Share on other sites More sharing options...
nitrofurano Posted June 17, 2014 Author Share Posted June 17, 2014 (edited) (btw, if anyone can share a similar, simple and compilable example in assembly, that shows us how to code a small example of how to move sprites with joysticks read from i/o ports as nice as needed, and using halt for waitvbl, please do! this would be really amazing and very useful, and will help to improve a lot the development stage of targeting ColecoVision from Boriel’s ZX-Basic Compiler! ) Edited June 17, 2014 by nitrofurano 1 Quote Link to comment Share on other sites More sharing options...
+nanochess Posted June 17, 2014 Share Posted June 17, 2014 Maybe you can find what you're looking for in these games (all include source code): http://theadamresource.com/programs/ Quote Link to comment Share on other sites More sharing options...
nitrofurano Posted June 17, 2014 Author Share Posted June 17, 2014 awesome, thanks! i'm going to look that right now! btw, in the meanwhile, i were replacing this below right now: (i actually were using it on the sg1000 stuff i was using, i’m really stupid... :S ) asm defw $aa55,0,$7000,0,0,startboot defw 0,0,0,0,0,0,0,0,0,0,0 retn startboot: end asm with asm defw $aa55,0,$7000,0,0,startboot defw 0,0,0,0,0,0,0,0,0,0,0 ;retn push af in a,($bf) pop af ei reti startboot: end asm now, halt seems to work for waitvbl! Quote Link to comment Share on other sites More sharing options...
nitrofurano Posted June 17, 2014 Author Share Posted June 17, 2014 Maybe you can find what you're looking for in these games (all include source code): http://theadamresource.com/programs/ the games, i only found sources in C there, and i was looking for z80 assembly only... :S (i'm not that comfortable in C, and i also don’t know how to get .asm conversions from there... :S ) btw, for now, i'm only struggling with the joystick stuff - do we really need to read joystick from bios calls (i guess?), and waste that precious 12 bytes in that tiny 1kb of ram available (of course i'm not complaining, PacMan arcade machine also has 1kb of ram - and Atari 2600 even less, 128 bytes! ), or is there some wiser and neater way of accessing joysticks via i/o than what i'm trying to do? Quote Link to comment Share on other sites More sharing options...
+nanochess Posted June 17, 2014 Share Posted June 17, 2014 Check this under the section "Controls": http://www.atarihq.com/danb/files/CV-Tech.txt In short: Write any value to port C0H, wait two NOP, read port FCH for first controller joystick. Quote Link to comment Share on other sites More sharing options...
nitrofurano Posted June 17, 2014 Author Share Posted June 17, 2014 Check this under the section "Controls": http://www.atarihq.com/danb/files/CV-Tech.txt In short: Write any value to port C0H, wait two NOP, read port FCH for first controller joystick. that was exactly the documentation i'm using, but i really had no idea about these nops, let me try that! thanks! Quote Link to comment Share on other sites More sharing options...
nitrofurano Posted June 17, 2014 Author Share Posted June 17, 2014 that was exactly the documentation i'm using, but i really had no idea about these nops, let me try that! thanks! i tried with 2 (and 4 nops as well, just in case) - http://nitrofurano.altervista.org/retrocoding/colecovision/misc/example01z2e3_movingsprites_waitvbl_joystick.zip on Meka, the 1st joystick works fine and the 2nd doesn’t, and on Mess, the 2nd joystick works fine and the 1s joystick doesn’t - it’s quite weird because all the games i normally play on Mess (and i think it emulate ColecoVision fine for what i were used, i never complained about any weird situation) from the attachment above, perhaps you can figure out more easily what is happening? and which emulator (that runs on GNU/Linux) you recommend, besides these i were using? (i guess would be not that issue, i were using them normally without any special problem...) thanks again! 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.