Author Topic: Searching for BASIC Source code for a replayer want to convert to AGK and OUYA  (Read 76 times)

0 Members and 1 Guest are viewing this topic.

Offline xaby

  • ZX 81
  • *
  • Posts: 1
  • Karma: 0
    • View Profile
Hello,

I was trying to get something replayed nativly on the OUYA. I was using App Game Kit Tier 1 Basic, it has some things in common with PureBasic, DarkBasic, BlitzBasic/Max
I found this: http://www.dbfinteractive.com/forum/index.php?topic=3931.msg53409#msg53409

But these are using some kind of "LIB". What I am looking for is simple native Pascal or Basic code without DLLs, LIBs or ASM.
I tried some C and C++ code, but in App Game Kit Tier 1 Basic there are missing some datatypes. You can create structures, but there are only 3 standard types.

integer (32 Bit, signed)
float (32 Bit, signed)
string

There are some commands for memblocks. It is possible to have bytes, and signed and unsigned data in memory and in files.

My idea is, to somehow create a converter, that could on the fly in memory "write" the "wave" into such a memblock. And after that create a sound out of that memblock.

PureBasic can replay MOD, S3M, IT and some others nativly. So there is no source code in most cases that I could translate.
Bitshifts are possible.

I know, it would be possible to create an OGG or MP3 before and replay that in App Game Kit Tier 1 Basic without problems. I love the idea of having hours of music in small files.
My best example is the Bejeweled 3 songs, they are compressed with MO3, a combination of MOD/S3M/IT and MP3/OGG/FLAC. And this game has about 1 hour of great music packed into less then 770 kByte.

https://modarchive.org/index.php?request=view_by_moduleid&query=179344

I also like the idea of sound generator like SFXR. And I feel, a combination of MIDI and SFXR could sound like something from the http://www.hivelytracker.co.uk/

I also tried some PSG, SID and listened to MSX or Music Macro Language (Flash lib here https://github.com/keim/SiON)

From what I understand, the C64 replayer mostly needs an emulator of the sound chip. Like also MegaDrive or MasterSystem sounds or these Yamaha-Chips.

What could be an easy way to generate sounds and re-play them? I know how to generate some generic waveforms.

As a kid I was fascinated by Sound Club from BlueMoon http://www.bluemoon.ee/history/scdos/index.html

So maybe someone can hint me to the right direction. Maybe there is some Turbo Pascal / Delphi code or Basic code without DLLs, objects, libs and so on and without ASM.
So I can understand that.

Thx.
---- I searched again MML Music and PureBasic and found this ... but also has some ASM in it. My final goal would be to be able to have some kind of dynamic replayer on Android made with App Game Kit Tier 1 Basic.
PSG and MML re-player in PureBasic
https://www.purebasic.fr/english/viewtopic.php?f=12&t=61587
« Last Edit: February 10, 2021 by xaby »

Offline Rbz

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 2733
  • Karma: 485
    • View Profile
    • http://www.rbraz.com/
Welcome xaby!

Try looking at browser javascript mod players, it might be a bit easier to convert to your prog language, here one example:
https://github.com/gasman/jsmodplayer

Challenge Trophies Won: