Do I need to learn assembly to make a music disk?

GFA, ASM, STOS, ...

Moderators: exxos, simonsunnyboy, Mug UK, Zorro 2, Moderator Team

User avatar
YQN
Atari nerd
Atari nerd
Posts: 44
Joined: Sat Jul 22, 2017 6:01 pm
Contact:

Do I need to learn assembly to make a music disk?

Postby YQN » Tue Jul 25, 2017 11:34 am

Hello :)

I have searched the forum and read some arguments about assembly vs c, that was quite interesting but I couldn't find the answers I was looking for. Back in the days I used GFA (didn't make anything too impressive though), now I would be more comfortable with C but I might need to learn assembly for my project... Not sure if it sounds like fun or pain in the arse.

I have a few chiptunes made in MaxYMiser and Sidsound Designer I want to release as a music disk, which I would like to attempt coding myself. I don't mean to create fancy effects but I would like to have a menu (with a custom font) and some kind of visualization (obviously no FFT). A bit like this Paradox/DHS disk. Is that possible in C or will I need to learn assembly?

Thanks in advance for your input :)

User avatar
Greenious
Hardware Guru
Hardware Guru
Posts: 1160
Joined: Sat Apr 24, 2004 5:39 pm
Location: Sweden

Re: Do I need to learn assembly to make a music disk?

Postby Greenious » Tue Jul 25, 2017 12:34 pm

Sure it is! I am pretty sure you will be able to do something in GFA, STOS etc aswell.

Apart from being darn fun to code, 68k assembler is really only a must if you want to make the absolute most out of the hardware and/or timing is critical (some screen effects requires exact cycle-timing for example, which is more or less impossible unless you use assembler).

Using clever techniques is the key though, (in any language) to make something decent, since brute force just isn't there on Atari. (Which is part of the fun coding it)
Updated my guides as of june 28th, 2016. Check'em out and feedback!
viewtopic.php?t=5040

AtariZoll
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2759
Joined: Mon Feb 20, 2012 4:42 pm
Contact:

Re: Do I need to learn assembly to make a music disk?

Postby AtariZoll » Tue Jul 25, 2017 12:36 pm

My opinion is that go with ASM. Or C with some parts in ASM. There may be some speed crucial parts.which need assembler.
Actually, this reminds me that I did only 1 SW in GFA Basic, and there were some ASM parts. So, I think that GFA+asm is option too.
Do you have routines for playback of those chiptunes done in MaxYMiser and Sidsound Designer ?
English language is like bad boss on workplace: it expecting from you to strictly follow all, numerous rules, but self bending rules as much likes :mrgreen:

User avatar
simonsunnyboy
Moderator
Moderator
Posts: 4774
Joined: Wed Oct 23, 2002 4:36 pm
Location: Friedrichshafen, Germany
Contact:

Re: Do I need to learn assembly to make a music disk?

Postby simonsunnyboy » Tue Jul 25, 2017 3:34 pm

Lots of music disks have been made with GFA and some small inline assembler.
I did one years ago: https://demozoo.org/productions/73565/


It is entirely possible with C aswell.
Simon Sunnyboy/Paradize - http://paradize.atari.org/ - STOT: http://www.npoi.de/stot/

Stay cool, stay Atari!

1x2600jr, 1x1040STFm, 1x1040STE 4MB+TOS2.06+SatanDisk, 1xF030 14MB+FPU+NetUS-Bee

Jabber: simonsunnyboy@atari-jabber.org

User avatar
YQN
Atari nerd
Atari nerd
Posts: 44
Joined: Sat Jul 22, 2017 6:01 pm
Contact:

Re: Do I need to learn assembly to make a music disk?

Postby YQN » Tue Jul 25, 2017 6:15 pm

AtariZoll wrote:My opinion is that go with ASM. Or C with some parts in ASM. There may be some speed crucial parts.which need assembler.
Actually, this reminds me that I did only 1 SW in GFA Basic, and there were some ASM parts. So, I think that GFA+asm is option too.
Do you have routines for playback of those chiptunes done in MaxYMiser and Sidsound Designer ?

Well I have the GFA routine for SNDH replay but I never tried to use it. It took me a while to remember how to load the inline files, will have to try with a tune of my own. Are there C routines around as well?

Thanks guys for your help, consider me a total beginner so any link to useful resources is more than welcome! Currently I'm reading MarkeyJester’s Motorola 68000 Beginner’s Tutorial which I found searching this forum, very interesting read!

User avatar
Greenious
Hardware Guru
Hardware Guru
Posts: 1160
Joined: Sat Apr 24, 2004 5:39 pm
Location: Sweden

Re: Do I need to learn assembly to make a music disk?

Postby Greenious » Tue Jul 25, 2017 6:31 pm

You can find more or less everything you need at http://dev-docs.atariforge.org/ under the category out of print books.

If you want to go the asm route, I also recommend motorola m68000 family programmer's reference manual, that can be found here: http://www.nxp.com/docs/en/reference-ma ... 000PRM.pdf
Updated my guides as of june 28th, 2016. Check'em out and feedback!
viewtopic.php?t=5040

User avatar
YQN
Atari nerd
Atari nerd
Posts: 44
Joined: Sat Jul 22, 2017 6:01 pm
Contact:

Re: Do I need to learn assembly to make a music disk?

Postby YQN » Tue Jul 25, 2017 7:48 pm

simonsunnyboy wrote:Lots of music disks have been made with GFA and some small inline assembler.
I did one years ago: https://demozoo.org/productions/73565/


It is entirely possible with C aswell.

Cool! Have you got the source by any chance? Are the flashes triggered by the sndh?

User avatar
simonsunnyboy
Moderator
Moderator
Posts: 4774
Joined: Wed Oct 23, 2002 4:36 pm
Location: Friedrichshafen, Germany
Contact:

Re: Do I need to learn assembly to make a music disk?

Postby simonsunnyboy » Wed Jul 26, 2017 4:16 pm

The flashes are controlled by reading YM channel volume registers.
No, source code is not available.

Yes, i ported the SNDH routines to C aswell, mainly for AHCC. I am unsure on gcc, maybe that one is still on my todo list but not too complicated. Mainly pasing arguments through registers have to be changed to passing via stack.
Simon Sunnyboy/Paradize - http://paradize.atari.org/ - STOT: http://www.npoi.de/stot/

Stay cool, stay Atari!

1x2600jr, 1x1040STFm, 1x1040STE 4MB+TOS2.06+SatanDisk, 1xF030 14MB+FPU+NetUS-Bee

Jabber: simonsunnyboy@atari-jabber.org

User avatar
YQN
Atari nerd
Atari nerd
Posts: 44
Joined: Sat Jul 22, 2017 6:01 pm
Contact:

Re: Do I need to learn assembly to make a music disk?

Postby YQN » Wed Jul 26, 2017 5:22 pm

I'm already stuck with gwEm's GFA routine :/ all my SNDH files are too large for an INLINE, I assume there is a workaround?

Edit: badly searched, now reading the GFA forum...

User avatar
YQN
Atari nerd
Atari nerd
Posts: 44
Joined: Sat Jul 22, 2017 6:01 pm
Contact:

Re: Do I need to learn assembly to make a music disk?

Postby YQN » Wed Jul 26, 2017 7:32 pm

Readings haven't been helpful, I'm afraid I'm gonna need some help to sort that out :/ Can anyybody help?

User avatar
simonsunnyboy
Moderator
Moderator
Posts: 4774
Joined: Wed Oct 23, 2002 4:36 pm
Location: Friedrichshafen, Germany
Contact:

Re: Do I need to learn assembly to make a music disk?

Postby simonsunnyboy » Thu Jul 27, 2017 3:46 pm

There are plenty tutorials for GFABASIC.

On the C side, I started a library of various former GFABASIC inlines to be used from gcc.
It is unfinished but you can check it out on GitHub. There is also SNDH and Modfile support.

See https://github.com/simonsunnyboy/stlibs4gcc
Simon Sunnyboy/Paradize - http://paradize.atari.org/ - STOT: http://www.npoi.de/stot/

Stay cool, stay Atari!

1x2600jr, 1x1040STFm, 1x1040STE 4MB+TOS2.06+SatanDisk, 1xF030 14MB+FPU+NetUS-Bee

Jabber: simonsunnyboy@atari-jabber.org

User avatar
Mug UK
Administrator
Administrator
Posts: 11179
Joined: Thu Apr 29, 2004 7:16 pm
Location: Stockport (UK)
Contact:

Re: Do I need to learn assembly to make a music disk?

Postby Mug UK » Sat Jul 29, 2017 9:04 am

YQN wrote:I'm already stuck with gwEm's GFA routine :/ all my SNDH files are too large for an INLINE, I assume there is a workaround?

Edit: badly searched, now reading the GFA forum...


Are you packing the SNDH files?
My main site: http://www.mug-uk.co.uk - slowly digging up the bits from my past (and re-working a few): Atari ST, Sega 8-bit (game hacks) and NDS (Music ripping guide).

I develop a free Word (for Windows) add-in that's available for Word 2007 upwards. It's a fix-it toolbox that will allow power Word users to fix document errors. You can find it at: http://www.mikestoolbox.co.uk

User avatar
YQN
Atari nerd
Atari nerd
Posts: 44
Joined: Sat Jul 22, 2017 6:01 pm
Contact:

Re: Do I need to learn assembly to make a music disk?

Postby YQN » Sat Jul 29, 2017 5:49 pm

Mug UK wrote:
YQN wrote:I'm already stuck with gwEm's GFA routine :/ all my SNDH files are too large for an INLINE, I assume there is a workaround?

Edit: badly searched, now reading the GFA forum...


Are you packing the SNDH files?

Well I read this routine plays unpacked files only so no I don't pack them, but you make me think I could pack them and use a depack routine... just found this thread you contributed to: viewtopic.php?f=69&t=3022&hilit=ice+unpack
Am I on the right track?

User avatar
Mug UK
Administrator
Administrator
Posts: 11179
Joined: Thu Apr 29, 2004 7:16 pm
Location: Stockport (UK)
Contact:

Re: Do I need to learn assembly to make a music disk?

Postby Mug UK » Mon Jul 31, 2017 5:22 pm

Yep. There's a filesize limit to GFA's Include command, so you can't go above 65535 bytes. So use a MALLOC to create the full size memory buffer for the unpacked tune and then store the ICE (or whatever packer you use) within the Include area. Depack from the Include into the MALLOC area and then point the SNDH replay at the MALLOC area.
My main site: http://www.mug-uk.co.uk - slowly digging up the bits from my past (and re-working a few): Atari ST, Sega 8-bit (game hacks) and NDS (Music ripping guide).

I develop a free Word (for Windows) add-in that's available for Word 2007 upwards. It's a fix-it toolbox that will allow power Word users to fix document errors. You can find it at: http://www.mikestoolbox.co.uk

User avatar
simonsunnyboy
Moderator
Moderator
Posts: 4774
Joined: Wed Oct 23, 2002 4:36 pm
Location: Friedrichshafen, Germany
Contact:

Re: Do I need to learn assembly to make a music disk?

Postby simonsunnyboy » Tue Aug 01, 2017 3:40 pm

I think the limit is even 32767 bytes....an ugly way to having to deal with Malloc and RESERVE is to use a array:

DIM tunedata%(25000) ! 25000 longs = 100 000 bytes
tuneptr%=V:tunedata%(0)

IIRC .. it has been 6 or 7 years since I coded GFA...
Simon Sunnyboy/Paradize - http://paradize.atari.org/ - STOT: http://www.npoi.de/stot/

Stay cool, stay Atari!

1x2600jr, 1x1040STFm, 1x1040STE 4MB+TOS2.06+SatanDisk, 1xF030 14MB+FPU+NetUS-Bee

Jabber: simonsunnyboy@atari-jabber.org

User avatar
Grazey / PHF
Captain Atari
Captain Atari
Posts: 487
Joined: Fri Jun 21, 2002 12:50 pm
Location: Montreal, Quebec
Contact:

Re: Do I need to learn assembly to make a music disk?

Postby Grazey / PHF » Tue Aug 01, 2017 3:53 pm

Assembler all the way.

Gfa is far too restrictive
I'll help

Grazey
http://phf.atari.org - demo coders since 1983
http://sndh.atari.org - Maintainer of the Atari ST chip music archive
http://www.scenemusic.net - Nectarine Administrator

User avatar
YQN
Atari nerd
Atari nerd
Posts: 44
Joined: Sat Jul 22, 2017 6:01 pm
Contact:

Re: Do I need to learn assembly to make a music disk?

Postby YQN » Sun Aug 06, 2017 4:32 pm

Grazey / PHF wrote:Assembler all the way.

Gfa is far too restrictive
I'll help

Grazey

Cool! In what ways are you willing to help? BTW another forum user has offered me some help with assembly, maybe we can make this a team work... The thing is I started looking up how to make a music disk but I don't have enough material yet so maybe it's best that I focus on the music first :P


Social Media

     

Return to “Coding”

Who is online

Users browsing this forum: No registered users and 3 guests