Jump to content
IGNORED

HCM & HARDBASS tools


Recommended Posts

I thought I'd put these into the programmer section as I presume not many ppl will browse my entire source repo in seek of information:

 

HCM Converter examples and sources:

 

post-49218-0-65104200-1513080921.png post-49218-0-46344300-1513080927.png post-49218-0-88144900-1513080935.png

post-49218-0-99896400-1513080942.png post-49218-0-28856800-1513080949.png post-49218-0-21932900-1513080956.png

 

About HCM: https://bitbucket.org/sandor-hard/reharden/src/master/HCM.md

Converter Sources (Java): https://bitbucket.org/sandor-hard/hcm-converter

Viewer Example (Atari): https://bitbucket.org/sandor-hard/hcm-viewer-example

 

The (VERY) experimental HARDBASS tracker I made for Android looks like this:

 

post-49218-0-93438100-1513080627_thumb.png post-49218-0-88065600-1513080639_thumb.png

 

About HARDBASS: https://bitbucket.org/sandor-hard/reharden/src/master/HARDBASS.md

Tracker Sources (Android): https://bitbucket.org/sandor-hard/hardbass-tracker-android

Player Example (Atari): https://bitbucket.org/sandor-hard/hardbass-player-example

Edited by Sandor / HARD
  • Like 22
Link to comment
Share on other sites

I'm loving it ! Still few things I don't understand. Mainly 64kHz source. You say you are realigning the IRQ every frame .. is it enough to prevent IRQ/DLI conflict ? Well since it's once per 8 lines, I guess it is, but I want to know more.

Also the demo is stereo pokey right ? I mean you need 2 channels for IRQ, and even if you share synth with RMT, the music is clearly more then 2 channels .. right ?

Thanks for making everything public !

  • Like 1
Link to comment
Share on other sites

I'm loving it ! Still few things I don't understand. Mainly 64kHz source. You say you are realigning the IRQ every frame .. is it enough to prevent IRQ/DLI conflict ? Well since it's once per 8 lines, I guess it is, but I want to know more.

Also the demo is stereo pokey right ? I mean you need 2 channels for IRQ, and even if you share synth with RMT, the music is clearly more then 2 channels .. right ?

Thanks for making everything public !

Hi R0ger,

 

Thanks for your questions and your nice comment on YouTube!

 

Let me address each of your questions inline:

 

> You say you are realigning the IRQ every frame .. is it enough to prevent IRQ/DLI conflict ? Well since it's once per 8 lines, I guess it is

 

Ok, so I demonstrated two different approaches to propagate the generated sample buffer to the sample register.

 

1. HCM based screens

This is the approach that's by far the easiest to implement as DLIs and IRQs never run at the same time.

24 updates are written into the sample register from the HCM screen kernel (that's a good thing about the small & generic HCM screen kernel - it leaves you a little time to perform tiny tasks in it in a predictable way).

15 updates are handled via IRQ. (that's covering the areas outside of the DLIST)

There's no conflict therefore.

The once-per-frame realignment happens via setting the timer freq to 0 at the beginning of the screen kernel (when we don't need the IRQs anyways).

Then we kick off our IRQs at the end of the screen kernel and it gets kicked off in a re-initialized / realigned state since our last IRQ has long ran out.

To keep the IRQ from drifting away constantly during a single frame there's a timer pattern in the code that's being followed by the IRQ code to even out the inherently unalignable 64KHz timer vs scanline difference.

That - in theory - makes the timer aligned to the same position where it started each 7th character line (if I remember my calculations correctly :)).

 

 

2. Twister-Scroller

This one's doing IRQ+DLI based sample updates.

Now this approach (like I also say in the player example code) can be a hit and miss situation.

DLI and IRQ conflicts and order issues must be expected unless you come up with some clever stuff or you're simply lucky.

I think I was lucky as it worked out nicely with my display list and the order in which IRQs and DLIs kick in on that screen turned out to be consistent.

I'm re-aligning the IRQs in DLI code and I also modify the IRQ code from DLI code so that IRQs take the samples from the correct position in the correct buffer.

Again, this could have been a lot more complex depending on the screen layout / DLIST / DMA setup.

If you choose to go down this route, you'll have to design a system that works for your screen.

You can start out from mine and debug the DLI & IRQ code to see what's happening and when.

 

There are more possible approaches than these two, but I didn't have more screens in REHARDEN :)

(something to explore / flesh out: 24 DLI based updates instead of screen kernel based ones, then 15 IRQ based updates outside of the DLIST area)

 

> Also the demo is stereo pokey right ? I mean you need 2 channels for IRQ

 

No, it's made for stock 64K XL/XE.

 

It's using channel #4 only for both the IRQ and the sample register.

 

> the music is clearly more then 2 channels .. right ?

 

Correct. You have all 4 POKEY channels in RMT and HARDBASS will only consume Channel #4 when RMT is not using it. (when channel #4 volume = 0 in RMT -OR- when channel #2 volume = 0 when channel #4 serves as a filter for channel #2)

It's completely dynamic and automatic.

For example, the bass sound I'm using most consists of a highest pitch (pitch=0) RMT instrument noise sound for a frame followed by pulse-width modulated HARDBASS bass. Along with a fully RMT drum instrument. All in Channel #4, mixed automatically.

 

Feel free to ask if something doesn't make complete sense :)

Edited by Sandor / HARD
  • Like 2
Link to comment
Share on other sites

Sorry if I sound uninformed, I'm kinda new to Atari, and all my experience with this is one attempt to make sample playback. I understand all your explanation about synchronization.

 

Still .. you say you use 1 channel for both IRQ source AND synth output ? And one channel only ? Didn't think you can do that. I can and will check the source codes, but maybe you can explain a bit here ? How exactly do you setup the channels ?

Link to comment
Share on other sites

Sorry if I sound uninformed, I'm kinda new to Atari, and all my experience with this is one attempt to make sample playback. I understand all your explanation about synchronization.

 

Still .. you say you use 1 channel for both IRQ source AND synth output ? And one channel only ? Didn't think you can do that. I can and will check the source codes, but maybe you can explain a bit here ? How exactly do you setup the channels ?

 

No worries. There's not much to this part really. You put the sample data into the audio control register for the channel and the timer freq goes into the audio frequency register for the channel. This just works.

  • Like 2
Link to comment
Share on other sites

I tried to modify my test project, which used 16kHz IRQ source, to 64kHz, and indeed, with reset Done in DLI, I can sync it even at 4kHz. Char mode + DLI, no visible conflict.

The sample playback is not as clean as 64kHz, but it's still quite clean. And it means I still have 3 channels to do whatever I want ! Still sample playback is both memory and time hungry, not sure I will use it in the end (it's like a puzzle game, secret, obviously).

 

And btw. I actually used the same channel for IRQ source and output already :-D

 

I was thinking about trying some full softsynth for Atari .. but using it only for bass is great idea. And you could also try sampled drums, as they don't need high sample rates.

Edited by R0ger
Link to comment
Share on other sites

Sorry if I sound uninformed, I'm kinda new to Atari, and all my experience with this is one attempt to make sample playback. I understand all your explanation about synchronization.

 

Still .. you say you use 1 channel for both IRQ source AND synth output ? And one channel only ? Didn't think you can do that. I can and will check the source codes, but maybe you can explain a bit here ? How exactly do you setup the channels ?

 

Yeah, making it higher and higher quality won't be difficult, but it loses the point then as you won't be able to afford it.

In its current form it's very affordable and still gives you a bass you didn't have before. In any case, do as you wish, it's all up to what do you want for your product.

BTW most types of drums do need high sample rates because of the noise component in them. That's why the 64KHz Pokey mode is essential for proper sounding drums and that's one of the reasons HARDBASS is not based on the much more straightforward and scanline aligned 15KHz mode. (as that'd impose the very limiting 15KHz requirement on all channels)

Edited by Sandor / HARD
  • Like 1
Link to comment
Share on other sites

You forget, you're a part of the Atari scene and that's a whole 'nother world.... some one has that photo somewhere somehow someway. These things manage to turn up over time. Unless you just made the screen and dumped the photo in the bin.... Then sadly you will have to photoshop your current face ....

 

Looks like this is really working out... everyone I've shown this to really likes it (that miraculous all by itself)... You kinda get that double take when they realize it's coming from the old computer, cause they don't sound like that.

 

Nice Job.

Edited by _The Doctor__
  • Like 1
Link to comment
Share on other sites

You forget, you're a part of the Atari scene and that's a whole 'nother world.... some one has that photo somewhere somehow someway. These things manage to turn up over time. Unless you just made the screen and dumped the photo in the bin.... Then sadly you will have to photoshop your current face ....

 

Looks like this is really working out... everyone I've shown this to really likes it (that miraculous all by itself)... You kinda get that double take when they realize it's coming from the old computer, cause they don't sound like that.

 

Nice Job.

 

That's great to hear! I never had anybody around me who knew what an Atari was, so I can't show it to anybody who'd appreciate any of it :)

 

BTW, it appears to me that HARDBASS stole all the spotlight from HCM. I hope ppl will start seeing the use cases for HCM as well in a decade or two ;)

  • Like 3
Link to comment
Share on other sites

Who will be the first to make a Christmas or New Years HCM and Hard Bass displayed for our eyes and ears?

 

I know it's a very busy time with travel, friends, family. There will be more time as winter break and a some days off come along.

 

I'm curious and wonder if a some of the rasta converted images would translate nicely into HCM. Since the images are optimized already it might make for some decent screens.

 

My wife is going to kill me, I stayed up all night reading the Hard repository...

Edited by _The Doctor__
  • Like 4
Link to comment
Share on other sites

Sandor... what's the best way to run the hardbass "tracker"?

 

Hey Heaven, I'm afraid you'll need to use an Android phone. I had RMT running on a PC on speakers and the HARDBASS tracker running on my phone with headphones. It sort of worked :) ...this stuff needs to get integrated into RMT via some black magic reverse-engineering... That's when it'd get comfortable & easy to use. Up until then you'll need a lot of dedication and patience to get something done. ..but it's doable once you get the grip on it. I did that tune in like 2-3 days in total.

Edited by Sandor / HARD
  • Like 1
Link to comment
Share on other sites

Who will be the first to make a Christmas or New Years HCM and Hard Bass displayed for our eyes and ears?

 

I know it's a very busy time with travel, friends, family. There will be more time as winter break and a some days off come along.

 

I'm curious and wonder if a some of the rasta converted images would translate nicely into HCM. Since the images are optimized already it might make for some decent screens.

 

My wife is going to kill me, I stayed up all night reading the Hard repository...

 

Well, Rasta converter is such a brilliant tool. Only mono-tone (greyscale/etc...) images would be comparable or better in HCM.

Color photos will be shoulders down bettern via Rasta converter.

The main strengths of HCM are the small size (8k vs 20-22k) and the fact that you can manipulate the image in real time + you can do a small task in the kernel at predictable times in a predictable way (updating HARDBASS say).

So it will never replace or rival Rasta converter for colorful photo images. It could for other use cases though.

Edited by Sandor / HARD
  • Like 3
Link to comment
Share on other sites

I was thinking the Rasta color images would look nice coverted to HCM, much of what looks nice on rasta is detail and alignment achieved by size manipulation with the color processed/optimized. With that excellent source material for HCM color mode, it may just be what is needed to give it that ever so slight bump up. and that's could be a nice surprise.

 

It's not to compete or replace, but to get an optimized source. The better the source the better the output. :) Not sure if it will diffuse or look like a copy of a copy, but it shouldn't. Something to play with and see what the affect is

 

@Stephen, Does Picard Play the Bass? Love to see and hear that one!

Edited by _The Doctor__
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...