src/mess/drivers/vboy.c
| r15945 | r15946 | |
| 8 | 8 | and http://www.vr32.de/modules/dokuwiki/doku.php? |
| 9 | 9 | |
| 10 | 10 | TODO: |
| 11 | | - fix graphics (many things to add!) |
| 11 | - fix Affine rotation |
| 12 | - galactic: ball isn't shown? |
| 13 | - galactic: on the rotation layer, half of it isn't shown; |
| 14 | - innsmout: arrow OBJ graphics are misplaced; |
| 15 | - spaceinv: Taito logo only if you press the button, framebuffer? |
| 16 | - spaceinv: missing shots |
| 17 | - ssquash: misplaced map; |
| 18 | - ssquash: gameplay seems busted; |
| 12 | 19 | - vleague / vproyak: keeps going into auto pause with 100 usec timer? |
| 20 | - wariolnd: brightness gets suddently darker during intro, CPU bug? |
| 13 | 21 | |
| 14 | 22 | ****************************************************************************/ |
| 15 | 23 | |
| r15945 | r15946 | |
| 243 | 251 | if(def & 0x40) // END flag |
| 244 | 252 | return 1; |
| 245 | 253 | |
| 246 | | if (mode < 2) |
| 254 | if (mode < 2) // Normal / Hbias Mode |
| 247 | 255 | { |
| 248 | 256 | fill_bg_map(state, bg_map_num); |
| 249 | 257 | if (lon && (!right)) |
| r15945 | r15946 | |
| 293 | 301 | } |
| 294 | 302 | } |
| 295 | 303 | else |
| 296 | | if (mode==2) |
| 304 | if (mode==2) // Affine Mode |
| 297 | 305 | { |
| 298 | 306 | fill_bg_map(state, bg_map_num); |
| 299 | 307 | |
| r15945 | r15946 | |
| 302 | 310 | // Left screen |
| 303 | 311 | for(y=0;y<=h;y++) |
| 304 | 312 | { |
| 305 | | float h_skw = vboy_paramtab[y*8+0]; |
| 313 | float h_skw = vboy_paramtab[y*8+0] / 8.0; |
| 306 | 314 | int prlx = vboy_paramtab[y*8+1]; |
| 307 | | float v_skw = vboy_paramtab[y*8+2]; |
| 308 | | float h_scl = vboy_paramtab[y*8+3]; |
| 309 | | float v_scl = vboy_paramtab[y*8+4]; |
| 315 | float v_skw = vboy_paramtab[y*8+2] / 8.0; |
| 316 | float h_scl = vboy_paramtab[y*8+3] / 512.0; |
| 317 | float v_scl = vboy_paramtab[y*8+4] / 512.0; |
| 310 | 318 | |
| 311 | | INT32 mx = (INT32)h_skw / 8; |
| 312 | | INT32 my = (INT32)v_skw / 8; |
| 313 | | INT32 dx = (INT32)h_scl / 512; |
| 314 | | INT32 dy = (INT32)v_scl / 512; |
| 315 | | |
| 316 | 319 | for(x=0;x<=w;x++) |
| 317 | 320 | { |
| 318 | 321 | int src_x,src_y; |
| r15945 | r15946 | |
| 320 | 323 | INT16 x1 = (x+gx-gp); |
| 321 | 324 | int pix = 0; |
| 322 | 325 | |
| 323 | | src_x = (mx + prlx) + (dx * x); |
| 324 | | src_y = (my) + (dy * y); |
| 326 | src_x = (INT32)((h_skw + prlx) + (h_scl * x)); |
| 327 | src_y = (INT32)((v_skw) + (v_scl * y)); |
| 325 | 328 | |
| 326 | 329 | pix = state->m_bg_map[((src_y) & 0x1ff)*0x200+((src_x) & 0x1ff)]; |
| 327 | 330 | |
| r15945 | r15946 | |
| 338 | 341 | // Right screen |
| 339 | 342 | for(y=0;y<=h;y++) |
| 340 | 343 | { |
| 341 | | float h_skw = vboy_paramtab[y*8+0]; |
| 344 | float h_skw = vboy_paramtab[y*8+0] / 8.0; |
| 342 | 345 | int prlx = vboy_paramtab[y*8+1]; |
| 343 | | float v_skw = vboy_paramtab[y*8+2]; |
| 344 | | float h_scl = vboy_paramtab[y*8+3]; |
| 345 | | float v_scl = vboy_paramtab[y*8+4]; |
| 346 | float v_skw = vboy_paramtab[y*8+2] / 8.0; |
| 347 | float h_scl = vboy_paramtab[y*8+3] / 512.0; |
| 348 | float v_scl = vboy_paramtab[y*8+4] / 512.0; |
| 346 | 349 | |
| 347 | | INT32 mx = (INT32)h_skw / 8; |
| 348 | | INT32 my = (INT32)v_skw / 8; |
| 349 | | INT32 dx = (INT32)h_scl / 512; |
| 350 | | INT32 dy = (INT32)v_scl / 512; |
| 351 | | |
| 352 | 350 | for(x=0;x<=w;x++) |
| 353 | 351 | { |
| 354 | 352 | int src_x,src_y; |
| r15945 | r15946 | |
| 356 | 354 | INT16 x1 = (x+gx+gp); |
| 357 | 355 | int pix = 0; |
| 358 | 356 | |
| 359 | | src_x = (mx - prlx) + (dx * x); |
| 360 | | src_y = (my) + (dy * y); |
| 357 | src_x = (INT32)((h_skw - prlx) + (h_scl * x)); |
| 358 | src_y = (INT32)((v_skw) + (v_scl * y)); |
| 361 | 359 | |
| 362 | 360 | pix = state->m_bg_map[((src_y) & 0x1ff)*0x200+((src_x) & 0x1ff)]; |
| 363 | 361 | |
| r15945 | r15946 | |
| 370 | 368 | } |
| 371 | 369 | } |
| 372 | 370 | else |
| 373 | | if (mode==3) |
| 371 | if (mode==3) // OBJ Mode |
| 374 | 372 | { |
| 375 | 373 | int start_offs, end_offs; |
| 376 | 374 | |