Compare commits
3 Commits
0161588b5a
...
15d437308e
Author | SHA1 | Date | |
---|---|---|---|
15d437308e | |||
eaeaadbdb6 | |||
e2be2bfcc6 |
2
Makefile
2
Makefile
@ -1,6 +1,6 @@
|
|||||||
all: xm_player.elf
|
all: xm_player.elf
|
||||||
|
|
||||||
OPT = -O2
|
OPT = -O1
|
||||||
|
|
||||||
MAKEFILE_PATH := $(patsubst %/,%,$(dir $(abspath $(firstword $(MAKEFILE_LIST)))))
|
MAKEFILE_PATH := $(patsubst %/,%,$(dir $(abspath $(firstword $(MAKEFILE_LIST)))))
|
||||||
LIB ?= $(MAKEFILE_PATH)/dreamcast
|
LIB ?= $(MAKEFILE_PATH)/dreamcast
|
||||||
|
@ -249,7 +249,11 @@ void interrupt()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
if (state.channel[ch].keyon == 255) {
|
const int keyon_tick = 254;
|
||||||
|
if (state.channel[ch].keyon > keyon_tick) {
|
||||||
|
state.channel[ch].keyon -= 1;
|
||||||
|
}
|
||||||
|
else if (state.channel[ch].keyon == keyon_tick) {
|
||||||
wait(); aica_sound.channel[ch].KYONB(1);
|
wait(); aica_sound.channel[ch].KYONB(1);
|
||||||
state.channel[ch].keyon -= 1;
|
state.channel[ch].keyon -= 1;
|
||||||
}
|
}
|
||||||
@ -261,7 +265,7 @@ void interrupt()
|
|||||||
}
|
}
|
||||||
for (int ch = 0; ch < 64; ch++) {
|
for (int ch = 0; ch < 64; ch++) {
|
||||||
int keyon = state.channel[ch].keyon;
|
int keyon = state.channel[ch].keyon;
|
||||||
if (keyon != 255 && keyon != 0) {
|
if (keyon != 0) {
|
||||||
state.channel[ch].keyon -= 1;
|
state.channel[ch].keyon -= 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -366,12 +370,12 @@ const int sample_data_length = (sizeof (sample_data));
|
|||||||
|
|
||||||
void deferred_load(int buf)
|
void deferred_load(int buf)
|
||||||
{
|
{
|
||||||
state.deferred_load_tick = 44100 / 2;
|
const float aica_clock_multiplier = 44.1 / 3;
|
||||||
|
|
||||||
|
state.deferred_load_tick = aica_clock_multiplier * 1000 / 2;
|
||||||
|
|
||||||
stop_sound();
|
stop_sound();
|
||||||
|
|
||||||
const float aica_clock_multiplier = 44.1;
|
|
||||||
|
|
||||||
state.sample_data_ix = xm_init(&interpreter::state.xm,
|
state.sample_data_ix = xm_init(&interpreter::state.xm,
|
||||||
buf,
|
buf,
|
||||||
sample_data,
|
sample_data,
|
||||||
|
@ -44,7 +44,7 @@ void vbr600()
|
|||||||
wait(); aica_sound.common.mcire = (1 << 6); // interrupt timer A
|
wait(); aica_sound.common.mcire = (1 << 6); // interrupt timer A
|
||||||
wait(); aica_sound.common.tactl_tima =
|
wait(); aica_sound.common.tactl_tima =
|
||||||
aica::tactl_tima::TACTL(0) // increment once every sample
|
aica::tactl_tima::TACTL(0) // increment once every sample
|
||||||
| aica::tactl_tima::TIMA(0xffff) // interrupt after 1 counts
|
| aica::tactl_tima::TIMA(0xfffd) // interrupt after 3 counts
|
||||||
;
|
;
|
||||||
|
|
||||||
//scene::logo::sound::interrupt();
|
//scene::logo::sound::interrupt();
|
||||||
@ -108,6 +108,7 @@ void main()
|
|||||||
|
|
||||||
system.IML6NRM = istnrm::end_of_render_tsp
|
system.IML6NRM = istnrm::end_of_render_tsp
|
||||||
| istnrm::v_blank_in
|
| istnrm::v_blank_in
|
||||||
|
| istnrm::end_of_transferring_punch_through_list
|
||||||
| istnrm::end_of_transferring_opaque_list;
|
| istnrm::end_of_transferring_opaque_list;
|
||||||
|
|
||||||
system.IML4EXT = istext::aica;
|
system.IML4EXT = istext::aica;
|
||||||
|
@ -64,6 +64,8 @@ void draw(ta_multiwriter& multi, int x, int y)
|
|||||||
|
|
||||||
int keyon = 128 * (state.channel[ch].keyon - 224) / 16;
|
int keyon = 128 * (state.channel[ch].keyon - 224) / 16;
|
||||||
if (keyon < 0) keyon = 0;
|
if (keyon < 0) keyon = 0;
|
||||||
|
if (keyon != 0)
|
||||||
|
printf("%d %d\n", state.channel[ch].keyon, keyon);
|
||||||
uint32_t base_color = (keyon << 16) | (keyon << 8) | (keyon << 0);
|
uint32_t base_color = (keyon << 16) | (keyon << 8) | (keyon << 0);
|
||||||
transfer_rectangle(multi.op,
|
transfer_rectangle(multi.op,
|
||||||
xi, y, 1.0 / 10000.0,
|
xi, y, 1.0 / 10000.0,
|
||||||
|
@ -131,7 +131,7 @@ void init()
|
|||||||
|
|
||||||
wait(); aica_sound.common.tactl_tima =
|
wait(); aica_sound.common.tactl_tima =
|
||||||
aica::tactl_tima::TACTL(0) // increment once every sample
|
aica::tactl_tima::TACTL(0) // increment once every sample
|
||||||
| aica::tactl_tima::TIMA(0xffff) // interrupt after 1 counts
|
| aica::tactl_tima::TIMA(0xfffd) // interrupt after 3 counts
|
||||||
;
|
;
|
||||||
|
|
||||||
wait(); aica_sound.common.mcieb = (1 << 6); // interrupt timer A
|
wait(); aica_sound.common.mcieb = (1 << 6); // interrupt timer A
|
||||||
|
Loading…
x
Reference in New Issue
Block a user