damosan Posted January 31, 2021 Share Posted January 31, 2021 I'm working with PMG on a gr.8 screen. Has anyone come up with a quick way of mapping PM graphics coords to the underlying screen resolution? Thanks. Quote Link to comment Share on other sites More sharing options...
Wrathchild Posted January 31, 2021 Share Posted January 31, 2021 what do you mean? they appear at the same co-ords regardless of the screen resolution Quote Link to comment Share on other sites More sharing options...
damosan Posted January 31, 2021 Author Share Posted January 31, 2021 2 minutes ago, Wrathchild said: what do you mean? they appear at the same co-ords regardless of the screen resolution Left margin is like 47 and the right is 206ish? I need to map that to 0 - 319. Quote Link to comment Share on other sites More sharing options...
Wrathchild Posted January 31, 2021 Share Posted January 31, 2021 (edited) PM pixels are a colour clock wide and so would 'align' every 2 pixels in hirez mode so effectively you just want (x/2)+xmargin then Edited January 31, 2021 by Wrathchild 1 Quote Link to comment Share on other sites More sharing options...
phaeron Posted January 31, 2021 Share Posted January 31, 2021 P/M horizontal coordinates are 48-208 for a normal width screen. 48 aligns the left edge of a player or missile with the left edge of the playfield, at any P/M width. 208 aligns the left edge of P/M with the right edge of the playfield. 1 Quote Link to comment Share on other sites More sharing options...
TGB1718 Posted January 31, 2021 Share Posted January 31, 2021 I'm currently writing a utility that uses Graphics 3 screen, I know the top left corner positions and set these to their base values, then horizontal position is calculated as follows to move P0 one pixel left (or right) with joystick movement. POKE(HPOSP0,HP0+x-6+((x-10)*3)); Vertical is calculated to move 4 lines UP or DOWN to maintain one pixel movement mycorsor is pointing at PMBASE + base position of P0 + offset into P0 for(i=4;i<8;i++) POKE(mycursor+i,0); // clear old cursor for(i=0;i<4;i++) POKE(mycursor+i,cursor_data); // write new cursor 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.