Skip to content

Commit 327dcf5

Browse files
committed
Rework examples for RMTPLAY and RMTPLAY2
1 parent 743f254 commit 327dcf5

File tree

12 files changed

+110
-182
lines changed

12 files changed

+110
-182
lines changed

samples/a8/sound/rmt/atari.chr

1 KB
Binary file not shown.

samples/a8/sound/rmt/delta.feat

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
;* --------BEGIN--------
2+
;* C:\jac\system\Atari800\Programming\Repositories\Mad-Pascal\samples\a8\sound\rmt\test.rmt
3+
FEAT_SFX equ 0
4+
FEAT_GLOBALVOLUMEFADE equ 0 ;RMTGLOBALVOLUMEFADE variable
5+
FEAT_NOSTARTINGSONGLINE equ 0
6+
FEAT_INSTRSPEED equ 1
7+
FEAT_CONSTANTSPEED equ 10 ;(0 times)
8+
FEAT_COMMAND1 equ 1 ;(16 times)
9+
FEAT_COMMAND2 equ 1 ;(3 times)
10+
FEAT_COMMAND3 equ 0 ;(0 times)
11+
FEAT_COMMAND4 equ 0 ;(0 times)
12+
FEAT_COMMAND5 equ 1 ;(4 times)
13+
FEAT_COMMAND6 equ 1 ;(12 times)
14+
FEAT_COMMAND7SETNOTE equ 0 ;(0 times)
15+
FEAT_COMMAND7VOLUMEONLY equ 0 ;(0 times)
16+
FEAT_PORTAMENTO equ 1 ;(10 times)
17+
FEAT_FILTER equ 1 ;(39 times)
18+
FEAT_FILTERG0L equ 1 ;(39 times)
19+
FEAT_FILTERG1L equ 0 ;(0 times)
20+
FEAT_FILTERG0R equ 0 ;(0 times)
21+
FEAT_FILTERG1R equ 0 ;(0 times)
22+
FEAT_BASS16 equ 0 ;(0 times)
23+
FEAT_BASS16G1L equ 0 ;(0 times)
24+
FEAT_BASS16G3L equ 0 ;(0 times)
25+
FEAT_BASS16G1R equ 0 ;(0 times)
26+
FEAT_BASS16G3R equ 0 ;(0 times)
27+
FEAT_VOLUMEONLYG0L equ 0 ;(0 times)
28+
FEAT_VOLUMEONLYG2L equ 0 ;(0 times)
29+
FEAT_VOLUMEONLYG3L equ 0 ;(0 times)
30+
FEAT_VOLUMEONLYG0R equ 0 ;(0 times)
31+
FEAT_VOLUMEONLYG2R equ 0 ;(0 times)
32+
FEAT_VOLUMEONLYG3R equ 0 ;(0 times)
33+
FEAT_TABLETYPE equ 0 ;(0 times)
34+
FEAT_TABLEMODE equ 0 ;(0 times)
35+
FEAT_TABLEGO equ 0 ;(0 times)
36+
FEAT_AUDCTLMANUALSET equ 0 ;(0 times)
37+
FEAT_VOLUMEMIN equ 0 ;(0 times)
38+
FEAT_EFFECTVIBRATO equ 1 ;(5 times)
39+
FEAT_EFFECTFSHIFT equ 0 ;(0 times)
40+
;* --------END--------

samples/a8/sound/rmt/delta.rmt

1.18 KB
Binary file not shown.

samples/a8/sound/rmt/rmt_play.pas

Lines changed: 63 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,94 @@
1-
// RMT PLAYER
2-
3-
{$define romoff}
1+
// RMT - RASTER Music Tracker Player
2+
// To use this player, you need and ".RMT" file and the corresponding features file.
3+
// The features file is module-specific assembly file that indicates which features
4+
// of the player the module actually uses. Using this file at compile-time, a player
5+
// that is optimized to the requirements of the specific song is created.
6+
// While this help to save memory for a single song, it also creates overhead when
7+
// using multiple songs at once. Because then you need the player also indidivually
8+
// for every song.
9+
// To create a stripped ".RMT" file (with song name and instrument names removed to
10+
// save space) and the features files, use the menu "File / Export As... / ".
11+
// Copy the displayed features definition to the clipboard and paste it into a ".FEAT" file.
12+
// The songs and their feature files are linked as resources using the related ".RC" file.
13+
// See "base\atari\players" folder for implementation details.
14+
15+
16+
{$define romoff} // TODO: Does not copy font https://forums.atariage.com/topic/240919-mad-pascal/page/38/#findComment-5623690
417

518
uses crt, rmt;
619

720
const
8-
rmt_player = $e000;
9-
rmt_modul = $c000;
21+
rmt_player_4 = $8000; // RMTPLAY resource, can be used in memory area $0000-$bfff
22+
// Beware, the player uses also $400 byte before this address
23+
rmt_player_8 = $f000; // RMTPLAY2 resource, can also be used in memory area $c000-ffff
24+
// Beware, the player uses also $400 byte before this address
25+
26+
rmt_module_4 = $6000;
27+
rmt_module_8 = $c000;
28+
29+
charset = $e000; // Workarund for https://github.com/tebe6502/Mad-Pascal/issues/162
1030

1131
var
32+
song: byte;
33+
song_name: string;
34+
song_author: string;
1235
msx: TRMT;
1336

1437
ch: char;
1538

1639
{$r 'rmt_play.rc'}
1740

18-
1941
begin
20-
while true do begin
21-
22-
msx.player:=pointer(rmt_player);
23-
msx.modul:=pointer(rmt_modul);
2442

25-
msx.init(0);
43+
song:=0;
2644

27-
writeln('Pascal RMT player example');
45+
(* The following block can only be used if there is a single RMLT/RMT2 player
46+
asm
47+
lda #$00 ; $00 max volume ; $f0 silenc
48+
sta RMTGLOBALVOLUMEFADE
49+
end;
50+
*)
2851

52+
while true do begin
2953

30-
asm
31-
32-
lda #$00 ; $00 max volume ; $f0 silenc
33-
sta RMTGLOBALVOLUMEFADE
34-
54+
write(chr$(125));
55+
writeln('Pascal RMT player example');
56+
writeln;
57+
58+
if song=0 then
59+
begin
60+
song_name:='Delta (Mono)';
61+
song_author:='Radek Sterba aka RASTER';
62+
msx.player:=pointer(rmt_player_4);
63+
msx.modul:=pointer(rmt_module_4);
64+
end else
65+
begin
66+
song_name:='Smells Like Teen Spirit (Stereo)';
67+
song_author:='Adam Hay aka sack/c0s';
68+
msx.player:=pointer(rmt_player_8);
69+
msx.modul:=pointer(rmt_module_8);
3570
end;
3671

37-
72+
msx.init(0);
73+
writeln('Currently playing ...');
74+
writeln;
75+
writeln(song_name);
76+
writeln('by ', song_author);
77+
writeln;
78+
writeln('Press any key to toggle song.');
3879
repeat
3980
pause;
4081

4182
msx.play;
4283

4384
until keypressed;
85+
4486
ch:=readkey();
4587

4688
msx.stop;
89+
90+
inc(song);
91+
if song=2 then song:=0;;
4792

4893
end;
4994

samples/a8/sound/rmt/rmt_play.rc

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
1-
rmt_player RMTPLAY2 'smells.feat' 1
2-
rmt_modul RMT 'smells.rmt'
1+
rmt_player_4 RMTPLAY 'delta.feat' 1
2+
rmt_module_4 RMT 'delta.rmt'
3+
rmt_player_8 RMTPLAY2 'smells.feat' 1
4+
rmt_module_8 RMT 'smells.rmt'
5+
charset RCDATA 'atari.chr'
6+

samples/a8/sound/rmt/rmt_play.xex

7.85 KB
Binary file not shown.

samples/a8/sound/rmt/rmt_title.pas

Lines changed: 0 additions & 39 deletions
This file was deleted.

samples/a8/sound/rmt/rmt_title.rc

Lines changed: 0 additions & 2 deletions
This file was deleted.

samples/a8/sound/rmt/smells.feat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
;* --------BEGIN--------
22
;* D:\!Atari\P O K E Y\RMT\songs\sack_cosine\ddd.rmt
33
FEAT_SFX equ 0
4-
FEAT_GLOBALVOLUMEFADE equ 1 ;RMTGLOBALVOLUMEFADE variable
4+
FEAT_GLOBALVOLUMEFADE equ 0 ;RMTGLOBALVOLUMEFADE variable
55
FEAT_NOSTARTINGSONGLINE equ 0
66
FEAT_INSTRSPEED equ 1
77
FEAT_CONSTANTSPEED equ 0 ;(28 times)

samples/a8/sound/rmt/title.feat

Lines changed: 0 additions & 40 deletions
This file was deleted.

0 commit comments

Comments
 (0)