Chiptunes-pms150c.git
8 months agofix notes bank selection
Tobias Girstmair [Tue, 27 Apr 2021 19:27:26 +0000 (21:27 +0200)]
fix notes bank selection

we want the 2nd "bank" when i2&3 != 0, so when f.z is not set. hence, we
want to skip adding 8 to the index when f.z is set. yep, it's confusing.

8 months agofix IDXR invocation and minor bugs
Tobias Girstmair [Tue, 27 Apr 2021 14:37:49 +0000 (16:37 +0200)]
fix IDXR invocation and minor bugs

- IDXR was called with the wrong endianness, and the hi-byte of notes_ix
  is now properly cleared. also, we use one less SRAM location.
- in the big multiplication in g(), we accidentally used SRC instead of
  SR in some places. by pure chance the bug wasn't triggered.
- some space is now left after the interrupt vector, so new code can be
  appended to the end, and the GOTO programmed 'over' with a NOP.
- fix some typos in comments.

this gets the music mostly working; there are some wrong notes, but it
is recongizable.

8 months agoincrease PWM frequency to 64kHz
Tobias Girstmair [Tue, 27 Apr 2021 08:15:07 +0000 (10:15 +0200)]
increase PWM frequency to 64kHz

audio is still borked, though

8 months agomake timer16 overflow every 512 cycles
Tobias Girstmair [Tue, 27 Apr 2021 08:07:49 +0000 (10:07 +0200)]
make timer16 overflow every 512 cycles

music is still _way_ to slow; need to investigate.

8 months agofix debug signal
Tobias Girstmair [Tue, 27 Apr 2021 07:58:05 +0000 (09:58 +0200)]
fix debug signal

the binary representation of set1 and set0 make it possible to do this
in-place. also commenting out the calibration placeholder, so we don't
break it during re-programming.

8 months agoupdate cycle count
Tobias Girstmair [Mon, 26 Apr 2021 14:09:59 +0000 (16:09 +0200)]
update cycle count

8 months agouse Makefile from test programs
Tobias Girstmair [Mon, 26 Apr 2021 13:58:00 +0000 (15:58 +0200)]
use Makefile from test programs

8 months agosave 1 instruction cycle
Tobias Girstmair [Mon, 26 Apr 2021 07:26:28 +0000 (09:26 +0200)]
save 1 instruction cycle

8 months agoadd initialisation code
Tobias Girstmair [Mon, 26 Apr 2021 07:22:58 +0000 (09:22 +0200)]
add initialisation code

prototyped seperately as 06-timer16ivr-v2/main.asm

10 months agoadd cycle count and some comments
Tobias Girstmair [Fri, 12 Mar 2021 18:42:27 +0000 (19:42 +0100)]
add cycle count and some comments

10 months agotransscribe fakeasm to realasm
Tobias Girstmair [Fri, 5 Mar 2021 13:27:59 +0000 (14:27 +0100)]
transscribe fakeasm to realasm

the memory locations (w.r.t. aliases) have been set/fixed, too.

10 months agonew version
Tobias Girstmair [Fri, 5 Mar 2021 13:20:28 +0000 (14:20 +0100)]
new version

a1 and a2 had to be renamed, since the sdcc-assembler complains about
them (yes, i started working on the port to realasm already).

10 months agonew version
Tobias Girstmair [Thu, 4 Mar 2021 22:30:41 +0000 (23:30 +0100)]
new version

10 months agonew version
Tobias Girstmair [Thu, 4 Mar 2021 22:30:05 +0000 (23:30 +0100)]
new version

10 months agonew version
Tobias Girstmair [Thu, 4 Mar 2021 22:17:40 +0000 (23:17 +0100)]
new version

10 months agonew version
Tobias Girstmair [Thu, 4 Mar 2021 22:16:27 +0000 (23:16 +0100)]
new version

10 months agonew version
Tobias Girstmair [Thu, 4 Mar 2021 21:44:02 +0000 (22:44 +0100)]
new version

10 months agonew version
Tobias Girstmair [Thu, 4 Mar 2021 21:41:24 +0000 (22:41 +0100)]
new version

10 months agonew version
Tobias Girstmair [Thu, 4 Mar 2021 21:39:43 +0000 (22:39 +0100)]
new version

10 months agonew version
Tobias Girstmair [Thu, 4 Mar 2021 21:38:26 +0000 (22:38 +0100)]
new version

code borrowed from attiny version

10 months agonew version
Tobias Girstmair [Thu, 4 Mar 2021 17:02:19 +0000 (18:02 +0100)]
new version

10 months agonew version
Tobias Girstmair [Thu, 4 Mar 2021 16:53:23 +0000 (17:53 +0100)]
new version

10 months agonew version
Tobias Girstmair [Thu, 4 Mar 2021 16:34:37 +0000 (17:34 +0100)]
new version

10 months agonew version
Tobias Girstmair [Thu, 4 Mar 2021 15:43:05 +0000 (16:43 +0100)]
new version

notes mapping:
0x84=[0]=[5]
0x9d=[1]=[4]
0xb0=[2]=[A]
0x69=[3]=[6]=[B]=[E]
0x58=[7]=[F]
0x75=[8]=[D]
0x8c=[9]=[C]

10 months agonew version
Tobias Girstmair [Thu, 4 Mar 2021 15:22:52 +0000 (16:22 +0100)]
new version

10 months agonew version
Tobias Girstmair [Thu, 4 Mar 2021 15:15:15 +0000 (16:15 +0100)]
new version

10 months agonew version
Tobias Girstmair [Thu, 4 Mar 2021 15:14:52 +0000 (16:14 +0100)]
new version

10 months agonew version
Tobias Girstmair [Thu, 4 Mar 2021 15:13:38 +0000 (16:13 +0100)]
new version

10 months agonew version
Tobias Girstmair [Thu, 4 Mar 2021 15:12:51 +0000 (16:12 +0100)]
new version

10 months agonew version
Tobias Girstmair [Thu, 4 Mar 2021 15:11:56 +0000 (16:11 +0100)]
new version

10 months agonew version
Tobias Girstmair [Thu, 4 Mar 2021 15:08:22 +0000 (16:08 +0100)]
new version

10 months agonew version
Tobias Girstmair [Thu, 4 Mar 2021 14:59:34 +0000 (15:59 +0100)]
new version

10 months agonew version
Tobias Girstmair [Thu, 4 Mar 2021 14:55:28 +0000 (15:55 +0100)]
new version

10 months agonew version
Tobias Girstmair [Thu, 4 Mar 2021 14:52:25 +0000 (15:52 +0100)]
new version

10 months agonew version
Tobias Girstmair [Thu, 4 Mar 2021 14:52:10 +0000 (15:52 +0100)]
new version

10 months agonew version
Tobias Girstmair [Thu, 4 Mar 2021 14:51:39 +0000 (15:51 +0100)]
new version

10 months agonew version
Tobias Girstmair [Thu, 4 Mar 2021 14:49:20 +0000 (15:49 +0100)]
new version

10 months agonew version
Tobias Girstmair [Thu, 4 Mar 2021 14:41:02 +0000 (15:41 +0100)]
new version

10 months agonew version
Tobias Girstmair [Thu, 4 Mar 2021 14:24:31 +0000 (15:24 +0100)]
new version

10 months agonew version
Tobias Girstmair [Thu, 4 Mar 2021 14:14:41 +0000 (15:14 +0100)]
new version

10 months agonew version
Tobias Girstmair [Thu, 4 Mar 2021 14:02:27 +0000 (15:02 +0100)]
new version

10 months agonew version
Tobias Girstmair [Thu, 4 Mar 2021 13:07:57 +0000 (14:07 +0100)]
new version

10 months agonew version
Tobias Girstmair [Thu, 4 Mar 2021 13:05:26 +0000 (14:05 +0100)]
new version

10 months agonew version
Tobias Girstmair [Thu, 4 Mar 2021 12:57:20 +0000 (13:57 +0100)]
new version

10 months agonew version
Tobias Girstmair [Thu, 4 Mar 2021 12:45:34 +0000 (13:45 +0100)]
new version

10 months agonew version
Tobias Girstmair [Thu, 4 Mar 2021 12:44:52 +0000 (13:44 +0100)]
new version

10 months agonew version
Tobias Girstmair [Thu, 4 Mar 2021 12:41:18 +0000 (13:41 +0100)]
new version

div10 was prototyped with this program:

typedef unsigned char u8;
int main(void) {
for (int i = 0; i <= 0x78; i++) {
u8 real = i/10;
u8 test = i;
i++;

test >>= 1;
test += i;

test >>= 1;
test += 0;

test >>= 1;
test += 0;

test >>= 1;
test += i;

test >>= 1;
test += i;

test >>= 1;
test += 0;

test >>= 1;
test += 0;

test >>= 1;
test += 0;

test >>= 1;
i--;
if (test != real)
printf ("%hhd/10 == %hhd != %hhd\n", i, real, test);
}
return 0;
}

10 months agonew version
Tobias Girstmair [Thu, 4 Mar 2021 12:27:09 +0000 (13:27 +0100)]
new version

div6 was prototyped with this program:

typedef unsigned char u8;
int main(void) {
for (int i = 0; i <= 0x78; i++) {
u8 real = i/6;
u8 test = i;

test >>= 1;
test += i;

test >>= 1;
test += 0;

test >>= 1;
test += i;

test >>= 1;
test += 0;

test >>= 1;
test += i;

test >>= 1;
test += 0;

test >>= 1;
test >>= 1;

if (test != real)
printf ("%hhd/6 == %hhd != %hhd\n", i, real, test);
}
return 0;
}

10 months agonew version
Tobias Girstmair [Thu, 4 Mar 2021 12:26:26 +0000 (13:26 +0100)]
new version

10 months agonew version
Tobias Girstmair [Thu, 4 Mar 2021 12:24:45 +0000 (13:24 +0100)]
new version

10 months agonew version
Tobias Girstmair [Thu, 4 Mar 2021 02:15:59 +0000 (03:15 +0100)]
new version

10 months agonew version
Tobias Girstmair [Thu, 4 Mar 2021 02:07:07 +0000 (03:07 +0100)]
new version

10 months agonew version
Tobias Girstmair [Thu, 4 Mar 2021 01:51:56 +0000 (02:51 +0100)]
new version

10 months agonew version
Tobias Girstmair [Thu, 4 Mar 2021 01:33:22 +0000 (02:33 +0100)]
new version

10 months agonew version
Tobias Girstmair [Thu, 4 Mar 2021 01:31:04 +0000 (02:31 +0100)]
new version

10 months agonew version
Tobias Girstmair [Thu, 4 Mar 2021 01:25:16 +0000 (02:25 +0100)]
new version

10 months agonew version
Tobias Girstmair [Thu, 4 Mar 2021 01:23:59 +0000 (02:23 +0100)]
new version

10 months agonew version
Tobias Girstmair [Thu, 4 Mar 2021 01:14:32 +0000 (02:14 +0100)]
new version

10 months agonew version
Tobias Girstmair [Thu, 4 Mar 2021 01:02:38 +0000 (02:02 +0100)]
new version

10 months agonew version
Tobias Girstmair [Thu, 4 Mar 2021 00:44:48 +0000 (01:44 +0100)]
new version

10 months agonew version
Tobias Girstmair [Thu, 4 Mar 2021 00:43:51 +0000 (01:43 +0100)]
new version

10 months agonew version
Tobias Girstmair [Thu, 4 Mar 2021 00:39:48 +0000 (01:39 +0100)]
new version

10 months agonew version
Tobias Girstmair [Thu, 4 Mar 2021 00:18:52 +0000 (01:18 +0100)]
new version

10 months agonew version
Tobias Girstmair [Thu, 4 Mar 2021 00:17:02 +0000 (01:17 +0100)]
new version

10 months agonew version
Tobias Girstmair [Thu, 4 Mar 2021 00:11:59 +0000 (01:11 +0100)]
new version

10 months agonew version
Tobias Girstmair [Thu, 4 Mar 2021 00:09:10 +0000 (01:09 +0100)]
new version

10 months agonew version
Tobias Girstmair [Thu, 4 Mar 2021 00:07:54 +0000 (01:07 +0100)]
new version

10 months agoonly loop through once
Tobias Girstmair [Thu, 4 Mar 2021 00:06:48 +0000 (01:06 +0100)]
only loop through once

same change as with attiny4 version; allows us to get rid of i3.

10 months agonew version
Tobias Girstmair [Thu, 4 Mar 2021 00:04:04 +0000 (01:04 +0100)]
new version

10 months agonew version
Tobias Girstmair [Thu, 4 Mar 2021 00:01:13 +0000 (01:01 +0100)]
new version

10 months agonew version
Tobias Girstmair [Wed, 3 Mar 2021 23:52:15 +0000 (00:52 +0100)]
new version

10 months agonew version
Tobias Girstmair [Wed, 3 Mar 2021 23:45:49 +0000 (00:45 +0100)]
new version

10 months agonew version
Tobias Girstmair [Wed, 3 Mar 2021 23:42:02 +0000 (00:42 +0100)]
new version

10 months agonew version
Tobias Girstmair [Wed, 3 Mar 2021 23:36:37 +0000 (00:36 +0100)]
new version

10 months agonew version
Tobias Girstmair [Wed, 3 Mar 2021 23:28:46 +0000 (00:28 +0100)]
new version

10 months agonew version
Tobias Girstmair [Wed, 3 Mar 2021 23:26:52 +0000 (00:26 +0100)]
new version

10 months agonew version
Tobias Girstmair [Wed, 3 Mar 2021 23:01:04 +0000 (00:01 +0100)]
new version

10 months agonew version
Tobias Girstmair [Wed, 3 Mar 2021 22:54:41 +0000 (23:54 +0100)]
new version

10 months agoinitial commit
Tobias Girstmair [Wed, 3 Mar 2021 22:52:50 +0000 (23:52 +0100)]
initial commit

Imprint / Impressum