|
Re: Star Wars Arcade (SEGA, 1993): fixing model1 emulation
03/25/16 06:18 PM
|
|
|
Thank you kindly. I was hoping you'd be around, wonderful! Just before I start let me make sure I understand you correctly.
1. When you say ftab_swa, you are referring to this:
Code:
// Used in swa scene 1 and unemulated: // f14 // f49_swa // f15_swa
const struct model1_state::function model1_state::ftab_swa[] = { { &model1_state::fadd, 2 }, /* 0x00 */ { &model1_state::fsub, 2 }, { &model1_state::fmul, 2 }, { &model1_state::fdiv, 2 }, { nullptr, 0 }, { &model1_state::matrix_push, 0 }, { &model1_state::matrix_pop, 0 }, { &model1_state::matrix_write, 12 }, { &model1_state::clear_stack, 0 }, { &model1_state::matrix_mul, 12 }, { &model1_state::anglev, 2 }, { &model1_state::f11, 9 }, { &model1_state::normalize, 3 }, { &model1_state::acc_seti, 1 }, { &model1_state::f14, 4 }, { &model1_state::f15_swa, 0 },
{ &model1_state::matrix_ident, 0 }, /* 0x10 */ { &model1_state::matrix_read, 0 }, { &model1_state::matrix_trans, 3 }, { &model1_state::matrix_scale, 3 }, { &model1_state::matrix_rotx, 1 }, { &model1_state::matrix_roty, 1 }, { &model1_state::matrix_rotz, 1 }, { nullptr, 0 }, { &model1_state::f24_swa, 7 }, { nullptr, 0 }, { &model1_state::transform_point, 3 }, { &model1_state::fsin_m1, 1 }, { &model1_state::fcos_m1, 1 }, { &model1_state::fsinm_m1, 2 }, { &model1_state::fcosm_m1, 2 }, { &model1_state::distance3, 6 },
{ nullptr, 0 }, /* 0x20 */ { nullptr, 0 }, { &model1_state::ftoi, 1 }, { &model1_state::itof, 1 }, { &model1_state::acc_set, 1 }, { &model1_state::acc_get, 0 }, { &model1_state::acc_add, 1 }, { &model1_state::acc_sub, 1 }, { &model1_state::acc_mul, 1 }, { &model1_state::acc_div, 1 }, // not used ? { &model1_state::xyz2rqf, 3 }, { &model1_state::f43_swa, 3 }, { &model1_state::matrix_sdir, 3 }, { &model1_state::f45, 1 }, { &model1_state::vlength, 3 }, { &model1_state::f47, 3 },
{ nullptr, 0 }, /* 0x30 */ { &model1_state::f49_swa, 6 }, { &model1_state::f50_swa, 4 }, { nullptr, 0 }, { &model1_state::f52, 0 }, { &model1_state::matrix_rdir, 3 }, { nullptr, 0 }, { nullptr, 0 }, { &model1_state::f56, 7 }, { &model1_state::f57, 0 }, { &model1_state::matrix_readt, 0 }, { &model1_state::acc_geti, 0 }, { &model1_state::f60, 0 }, { nullptr, 0 }, { nullptr, 0 }, { nullptr, 0 }, { nullptr, 0 },
{ &model1_state::push_and_ident, 0 }, /* 0x40 */ { nullptr, 0 }, { &model1_state::catmull_rom, 13 } };
2. What is the purpose of that number on the right side which seems to range from 0 to 13, is it worth trying or advisable at all to attempt changing this:
{ &model1_state::normalize, 3 }, { &model1_state::acc_seti, 1 },
...into this, for example:
{ &model1_state::normalize, 5 }, { &model1_state::acc_seti, 8 },
3. Does order of the entries matter, and is it known? In other words, is it worth trying or advisable at all to attempt changing this:
{ &model1_state::matrix_write, 12 }, { &model1_state::clear_stack, 0 },
...into this, for example:
{ &model1_state::clear_stack, 0 }, { &model1_state::matrix_write, 12 },
4. Or better yet, can you give me some example or pointers what kind of thing should I try experimenting with?
5. Considering Wing War seems to be working fine with just those implemented functions, would you say chances are Star Wars needs coding some new function to work properly, or perhaps just shifting existing things around could solve the problem?
By the way, in the Service Mode I ran the memory test and under TGP IC57 section it said "TGP TROUBLE". Maybe this testing program and the data against which it runs the test is accessible and holds useful information to figure this TGP thing out?
|
|