QL Tinkering
Re: QL Tinkering
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.
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
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.
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
- Mark Swift
- Bent Pin Expansion Port
- Posts: 86
- Joined: Fri Jul 18, 2014 9:13 am
- Location: Blackpool, Lancs, UK
- Contact:
Re: QL Tinkering
Hi Qbits,
...impressive as ever.
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:
The end of file bug is due to line 1685 of KSave which outputs beat and tempo values to file using a comma separator.
This causes the beat and tempo to be wriiten to file like this:
instead of like this
Change line 1685 as follows to fix the KSave bug.
Finally, here's a fixed version of QBS_ScoreDemo.
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
...impressive as ever.
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
Code: Select all
1685 PRINT#99,bn%,mn%:CLOSE#99
Code: Select all
1 200
Code: Select all
1
200
Code: Select all
1685 PRINT#99,bn%:PRINT#99,mn%:CLOSE#99
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
-
- Aurora
- Posts: 890
- Joined: Mon Nov 24, 2014 2:03 pm
Re: QL Tinkering
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.
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.
Re: QL Tinkering
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: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.
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_
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.
Re: QL Tinkering
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
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
Re: QL Tinkering
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.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.
Re: QL Tinkering
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:
This gave an "out of memory" error with the following emulators/configuration:
This, again, gave "out of memory" error on all the same emulators/configuration:
Plus, there are two more lines of DIM statements which seem pretty big as well:
So, how much total memory does this program require to run?
Code: Select all
1011 DIM FG(32,64,64),TG(64,64),File$(50,20),CP(15),BEEP$(4,34)
- QLAY, JS ROM, TK2, 8MB RAM
- QLAY, JS ROM, TK2, 640K RAM
- Q-Emulator, JS ROM, TK2, 368K RAM
Code: Select all
1011 DIM FG(32,64,64)
- QLAY, JS ROM, TK2, 8MB RAM
- QLAY, JS ROM, TK2, 640K RAM
- Q-Emulator, JS ROM, TK2, 368K RAM
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
Re: QL Tinkering
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
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
Re: QL Tinkering
Ok.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.
Hmm, also tried it on Minerva (198) with same result on QLAY. Maybe it's an emulator issue.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.
Re: QL Tinkering
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
)
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.
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

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.