Thelen Posted September 15, 2002 Share Posted September 15, 2002 hi, I have got register HPOSP0 and i want to change the horizental position of P0, and now i want to say : INC HPOSP0 why can't i do this ? i have to make it like this: (XPOSP0 is my variable for P0) LDX XPOSP0 INX STX XPOSP0 STX HPOSP0 I have this also with some other registers...like VSCROL maybe it's a stupid question but i'm just starting... Thanks, Thelen Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted September 16, 2002 Share Posted September 16, 2002 because there are some hardware registers which are "read only" and "write only"... (if you read hardware docs carefully you should find info on each hardware register...) so... hposp0, position of player0, is write only... if you would do a "INC hposp0" that would be CPU internally like get old value stored in hposp0 add #1 store back old value and this "get old value" is not possible... that's why you have to use variables instead or so called "shadow registers"... some of the guys here can tell you what kind of register is selected when you "read" hposp0... i just can not remember it... so be carefull in reading/writing hardware registers, esp. GTIA & ANTIC hve ps. you have the same "doubling" of registers in the Gameboy advance... it is a common way to get "more" registers while having a fixed amount of adress lines in the hardware... Quote Link to comment Share on other sites More sharing options...
Thelen Posted September 29, 2002 Author Share Posted September 29, 2002 I need some help again.... when i don't push the button the screen flashes with all colors (0-255 PF4), but when I push the button and hold it, the screen will only change the color something slower....why ? LDA STRIG0 BNE NOBUTTO JMP CLOOP3 NOBUTTO INC COLOR4 CLOOP3 maybe i'm doing something really stupid, but i don't understand why it is still flashing when i push the button... Thanks, Thelen Quote Link to comment Share on other sites More sharing options...
Thelen Posted September 30, 2002 Author Share Posted September 30, 2002 This is funny....on a real atari 8 bit it work's the way it should do, but on the emulator it doesn't. probably because of the pc keyboard which emulates the joystick.... Thelen 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.