QL Tinkering

Helpful tips and guides, also new users can ask for help here.
qbits
Gold Card
Posts: 261
Joined: Sun Dec 11, 2016 3:32 pm

Re: QL Tinkering

Post by qbits »

Hi all,
The QBITS PIXEL Art project: Two steps back one step forward. The progress on Action with the final step to produce a Playable Retro Game is going to take a little longer. What I have put in place are some further extensions to the SPRITE and SCREEN background designs.

SPRITE Bitmap files are Loaded or Merged with a previously loaded _bmp file. Bitmaps of the Merged file are appended to any spare Frame slots. In this way SPRITE’s can be swapped between files. SCREEN background Tiles can now be set to 8x8 12x12 16x16 20x20 or 24x24 Tile sizes.
QBITS PIXEL Art.jpg
QBITS_PIXArt_WIPvA31.zip
(15.34 KiB) Downloaded 176 times
QB04_PIXELArt_WIPvA31_doc.pdf
(1.23 MiB) Downloaded 164 times
Mark Thanks for the details on the Notes [dur del BMP] I will see how they match my own attempts and get back to you [time being available].

Steve had a quick look at your Prog haven’t had time to review it properly. Did you use Marq’s BEEP Pitch Frequencies or your own.

QBITS


User avatar
Mark Swift
Bent Pin Expansion Port
Posts: 86
Joined: Fri Jul 18, 2014 9:13 am
Location: Blackpool, Lancs, UK
Contact:

Re: QL Tinkering

Post by Mark Swift »

Hi Qbits,

...impressive as ever.
qbits wrote: Fri Aug 09, 2024 6:17 pm Mark Thanks for the details... [time being available]
One more bug in QBITS_QLSoundSE...

Line 1664 of KLoad, fails to read in mn% from saved Score files due to an end of file error.
The issue leaves eck% holding a value of 1 which causes the next Load Score to fail signalling "File Not Found".

The issue can be confirmed by modifying line 1664 as follows:

Code: Select all

1664 INPUT#99,bn%\mn%:CLOSE#99:mn%=(mn% DIV 10)*10:IF eck%=1 THEN CURSOR 12,36:PRINT 'File Error...':eck%=0
The end of file bug is due to line 1685 of KSave which outputs beat and tempo values to file using a comma separator.

Code: Select all

1685 PRINT#99,bn%,mn%:CLOSE#99
This causes the beat and tempo to be wriiten to file like this:

Code: Select all

1       200
instead of like this

Code: Select all

1
200
Change line 1685 as follows to fix the KSave bug.

Code: Select all

1685 PRINT#99,bn%:PRINT#99,mn%:CLOSE#99
Finally, here's a fixed version of QBS_ScoreDemo.
QBS_ScoreDemo.zip
(506 Bytes) Downloaded 164 times

The original version contains half and quarter note durations that are rounded to the nearest integer due to the earlier nv% bug. Beat and tempo were also written to file incorrectly.

Thanks


stevepoole
Aurora
Posts: 890
Joined: Mon Nov 24, 2014 2:03 pm

Re: QL Tinkering

Post by stevepoole »

Hi Qbits,
To establish the keyboard pitches, back in the late eighties, I tuned my keyboard by ear, against a school recorder in 'C'. Lower octaves could then be determined by ear in relation to the higher tones. But you will note that one pitch is missing in the highest octave : The QL has no such Beep frquency, so the note is 'rest'ed.
The tempos were taken from a standard website. The time signatures allow for '1/4' but I have yet to get certain rare ones figured out.
My scoresheet is probably too generous, as the lower notes are almost indistinguishable. Yours is probably quite adequate.
A two-note keyboard was developed to allow 'duo' scores to be played, (trilling, not two-pitch timbres). Indeed you can Trill timbres too !
Frustrated by not being able to play demisemiquavers and rests, I abandoned 'BEEP duration, pitch' for 'Beep 0,pitch: wait(delay)', which is far more accurate, and machine compatible... (See the music demo accessed by pressing TAB).
Now I am on vacation, I will have time to study your code in detail and will report back. Regards, Steve.


User avatar
bwinkel67
QL Wafer Drive
Posts: 1539
Joined: Thu Oct 03, 2019 2:09 am

Re: QL Tinkering

Post by bwinkel67 »

qbits wrote: Fri Aug 09, 2024 6:17 pm Hi all,
The QBITS PIXEL Art project: Two steps back one step forward. The progress on Action with the final step to produce a Playable Retro Game is going to take a little longer. What I have put in place are some further extensions to the SPRITE and SCREEN background designs.
Tried to run it on QLay with 8MB of RAM and get an error message on line 1011 saying "out of memory" after taking a long time to read the config file. Also, this is the config file I found, since it wasn't included in this zip file:

Code: Select all

0
0
dos1_QBITSProgs_bas
dos1_
8
15
win1_
win2_
win3_
win4_
win5_
win6_
flp1_
flp2_
dos1_
dos2_
dos3_
dos4_
dos5_
dos6_
dos7_
dos8_
Not sure why the program needs all of that. I'm running it form mdv2_ and win1_ and don't have flp or dos defined. I also don't have QBITSProg_bas.

What are the resource requirements for this program and why is the config file needed? I've had success running one of your other programs only from mdv on a BBQL and was wondering if this one could be run in a similar form.


qbits
Gold Card
Posts: 261
Joined: Sun Dec 11, 2016 3:32 pm

Re: QL Tinkering

Post by qbits »

hi,
Mark
Thanks again for your code checks – KLoad line 1664 ‘ \ ‘ KSave line 1685 ‘ , ‘ .at some point got swapped.

Mark and Steve
QLSounds Research Notes: They say Timing is everything,
A normal resting heart rate should be between 60 to 100 beats per minute, and can vary from minute to minute dependant on age and general health. Music has a recurring pulse, or beat and usually in the range of 60–100 beats per minute BPM. 1 beat = 1 quarter note. 1 quarter note = 1 metronome beat at 90 BPM (so 1/90*60 = 670 ms/beat. QL SuperBASIC keyword PAUSE 33.[ 33*20=660ms ].

QBITS QLSounds decision was built around a quarter beat being in the order of 180ms including dur & del.

Bwinkel67
QBITS_PIXArt_ can run stand alone with dev$ on line 1002 set to defaut drive ie mdv2_
If you run QBITSBoot the Config details need to be changed to reflect you local requirements.

QBITS


User avatar
bwinkel67
QL Wafer Drive
Posts: 1539
Joined: Thu Oct 03, 2019 2:09 am

Re: QL Tinkering

Post by bwinkel67 »

qbits wrote: Sat Aug 10, 2024 4:30 pm Bwinkel67
QBITS_PIXArt_ can run stand alone with dev$ on line 1002 set to defaut drive ie mdv2_
If you run QBITSBoot the Config details need to be changed to reflect you local requirements.
There's little information that I've found on the Config file. Could you help create one for a BBQL using microdrives? From that kind of baseline I'll be able to understand the config file better and then customizes to anything.


User avatar
bwinkel67
QL Wafer Drive
Posts: 1539
Joined: Thu Oct 03, 2019 2:09 am

Re: QL Tinkering

Post by bwinkel67 »

I was debugging the QBITS_PIXArt program a bit more to figure out why it was running out of memory. So the first line with DIM statements already causes the problem:

Code: Select all

1011 DIM FG(32,64,64),TG(64,64),File$(50,20),CP(15),BEEP$(4,34)
This gave an "out of memory" error with the following emulators/configuration:
  • QLAY, JS ROM, TK2, 8MB RAM
  • QLAY, JS ROM, TK2, 640K RAM
  • Q-Emulator, JS ROM, TK2, 368K RAM
So then I just tried the first DIM statement:

Code: Select all

1011 DIM FG(32,64,64)
This, again, gave "out of memory" error on all the same emulators/configuration:
  • QLAY, JS ROM, TK2, 8MB RAM
  • QLAY, JS ROM, TK2, 640K RAM
  • Q-Emulator, JS ROM, TK2, 368K RAM
Looking at how much memory the first DIM statement requires, it ends up using 131,072 number entries. How many bytes per number does the QL set aside? Is it 6 bytes (i.e. 48 bits)? if so, then that's 786,432 bytes so it would need at least 1MB to run. So it failing in 640K and 368K makes sense, though I'm not sure why 8MB wouldn't be enough. Can someone explain to me here what's going on?

Plus, there are two more lines of DIM statements which seem pretty big as well:

Code: Select all

1012 DIM Tile(60,24,24),TAss(120),TScn(9,40,24),WScn(20,12),TMap(9,4),SK(9,20)
1013 DIM TAS$(9,6),RGN$(13),fnt$(9,8),CP(15):FOR i=0 TO 7:CP(i)=i
So, how much total memory does this program require to run?


qbits
Gold Card
Posts: 261
Joined: Sun Dec 11, 2016 3:32 pm

Re: QL Tinkering

Post by qbits »

bwinkel67
QBITS PIXArt is memory hungry because of the present format of the bitmaps. The development has been with QPC2 Emulator and SMSQ/e. I have it working with a min 3MB with QPC2. Future compatibility with other QL Platforms is on my to do list.

I might be wrong but recall JS ROMs have a max of access to 896KB memory.

QBITS


User avatar
bwinkel67
QL Wafer Drive
Posts: 1539
Joined: Thu Oct 03, 2019 2:09 am

Re: QL Tinkering

Post by bwinkel67 »

qbits wrote: Sun Aug 11, 2024 10:25 am bwinkel67
QBITS PIXArt is memory hungry because of the present format of the bitmaps. The development has been with QPC2 Emulator and SMSQ/e. I have it working with a min 3MB with QPC2. Future compatibility with other QL Platforms is on my to do list.
Ok.
qbits wrote: Sun Aug 11, 2024 10:25 am I might be wrong but recall JS ROMs have a max of access to 896KB memory.
Hmm, also tried it on Minerva (198) with same result on QLAY. Maybe it's an emulator issue.


User avatar
Andrew
QL Wafer Drive
Posts: 1047
Joined: Tue Jul 17, 2018 9:10 pm

Re: QL Tinkering

Post by Andrew »

Hi Qbits
I played a bit with your program and it is really nice and packed with features. It took me some time to draw a sprite, as the interface is cluttered and for a while I was lost, but I got the hang of it.
It seems that it needs a minimum resolution of 512x384 pixels to start. Looking at the picture from page 59 it might need more than that (your doc starts with page 58, so 59 is the second page)
What's the best resolution to run the program?

ALT commands do not work on my Windows PC. (ALT and arrows rotate the Windows display :D )

The BMP file saved is not really a bmp format file, so the extension is misleading.

Next I will try to create a Tile map.
Maybe you can upload some sprites and tile maps for us to play with.
Last edited by Andrew on Sun Aug 11, 2024 7:19 pm, edited 1 time in total.


Post Reply