log in | register | forums
Show:
Go:
Welcome
The Icon Bar is the longest running RISC OS portal. The sensibilities that Acorn instilled in us still influence our interests and writing.

Buy swag
Got news?
Let us know!
Bob and Trev: Resurrection
Bob and Trev: Resurrection
A dystopian Acron roguelike written in 7 days and 32K
Subscriptions RSS Feeds
RSS 2.0 | 1.0 | 0.9
Atom 0.3
Misc RDF | CDF
Podcasts
Subscribe | iTunes | List
Latest MP3
Site Search
 
Article archives

Adventures in Optimisation - Audio mixing

Posted by Jeffrey Lee on 09:00, 5/7/2019 | ,
 
Welcome to the first in a (very) infrequent series of articles about optimisation. In this article I'll be looking at audio mixing in C/C++ using GCC 4.7.4, running benchmarks of various routines and optimisations across multiple machines in order to work out what works well and what doesn't.
 
 
Continue reading "Adventures in Optimisation - Audio mixing" | 2 comments in the forums

David Pilling Treasure Trove

Posted by Mark Stephens on 07:02, 18/1/2019 | ,
 
If you are looking to learn about software, there is a treasure trove of source code and resources available on the Internet.
 
One of the more interesting resources is from David Pilling. He is something of a RISC OS legend (being behind OvationPro and many critical tools for RISC OS). His website lists his software and also includes several free utilities.
 
There is also an interesting section for 'retired' software here. Rather than just let the packages disappear, the source code is now available for all the ArcFax, Panorama, SparkFS and many other former commercial applications. Enjoy digging....
 
[Updated 18 January] Thanks to Sprow for pointing out SparkFS does not include source code
 
David Pilling website
 
Comment in the forums

PackMan in practice, part 2

Posted by Jeffrey Lee on 09:00, 16/11/2018 | , , ,
 
As mentioned at the end of part one, this article about creating PackMan packages is going to look at what's necessary to generate distribution index files, ROOL pointer files, and how these tasks can be automated. Towards the end I'll also be taking a look at some options for automating the uploading of the files to your website.
 
 
Continue reading "PackMan in practice, part 2" | 1 comment in the forums

GPS becomes Data Logger

Posted by Mark Stephens on 06:21, 9/11/2018 |
 
At the recent London Show Chris Hall was showing his new Data Logger. Here he gives some info into the new hardware
 
Version 2.40 of my SatNav software and the compact hardware unit with just an OLED display meant I could stop trying to fix things that were still unfinished. I had full battery management, conditional data logging, robust and error-tolerant data downloading on demand and power management that avoided any SD card corruption.

Where next?

 
There were things still unfinished: I wanted the unit to be able to use WiFi to transmit data instead of making do with manual downloads to a USB pen drive; I would have liked to remove the code which drives a liquid ink display (Papirus) into a more general purpose module, where it should be, but had never tried writing one. RiscBASIC could compile an application to a module but only at 26 bit. Both these aspirations were therefore not immediate.


 
 
Continue reading "GPS becomes Data Logger" | 2 comments in the forums

PackMan in practice

Posted by Jeffrey Lee on 09:00, 14/9/2018 | , , ,
 
For this first article looking at how to create PackMan/RiscPkg packages, I've decided to use my SunEd program as a guinea pig. Being a simple C application with no dependencies on other packages, it'll be one of the most straightforward things on my site to get working, and one of the easiest for other people to understand.
 
Read on to discover how to turn simple apps like SunEd into RiscPkg packages, and more importantly, how to automate the process.
 
 
Continue reading "PackMan in practice" | Comment in the forums

The state of PackMan in 2018

Posted by Jeffrey Lee on 21:30, 20/8/2018 | , , , , ,
 
In a previous article we've looked at what software is available via !PackMan. But what if you're a developer who wants to get your software listed - where do you start?
 
 
Continue reading "The state of PackMan in 2018" | Comment in the forums

Getting started with Bash on RISC OS

Posted by Mark Stephens on 08:53, 15/6/2018 |
 
There are lots of hidden treasures to try for free in PackMan (see our review from 2017). In this article we are going to go into more depth with Bash. Bash is a freely available on many systems (I use it all the time at work on Macs and Linux systems). It also provides the basis for running many other tools and automating things by writing short Bash scripts.
 

 
Once installed, you can start writing Bash directly in a single-tasking window by running the Bash App. But the best way to run it is from a terminal window. Just type the command Bash and you will be using bash.
 
Type in exit to return to the standard RISC OS command line.
 
Type in help to give you a list of commands at any time.
 

 
If you want to learn more about Bash, we recommend you start with the Wikipedia entry.
 
What is your favourite tool on !PackMan?
 
1 comment in the forums

Power Switching a RaspberryPi

Posted by Mark Stephens on 10:27, 28/4/2018 | ,
 
Chris Hall has been trying to make the most of power for a RISC OS based RaspberryPi for his GPS system. In his guest post , he lifts the lid on how he does this...
 
A Raspberry Pi can be powered by a mains adapter or by a powerbank. I found myself often pulling out the power plug to power cycle the Pi and came up with a software power switching method that would allow power to be removed under software control.
 

 
A 'power booster' board allows an internal 3.7V Lithium-Polymer battery to produce a 5.2V output and any external 5V power source will take over this rule and charge the internal battery until fully charged. Switching on and off is controlled by an 'ENABLE' input, pulled high by default. A blue LED lights if power is being supplied to the computer. With the booster board output disabled, only a minimal current is drawn from the internal battery. A red LED lights if the internal battery becomes discharged below 3V (and if a diode is fitted to the 'LBO' pad this can disable the output automatically). Fully discharging the internal battery is likely to damage it.
 
While the internal battery is being charged a yellow LED lights, turning green when it is fully charged. A small current drain to light the green LED to show a full charge seems enough to keep some power banks happy even whilst the unit is otherwise powered down and the internal battery fully charged.
 
This means the external source can be connected and disconnected without affecting the operation of the device except to extend battery life.
 

 
Power control
With no power control hardware it is difficult to ensure that the computer is not, inadvertently,turned off during a write operation to the SD card, which can corrupt the file or the whole card. My power control circuit allows power to be applied at any time by pressing the 'on' button. The 'off' button simply signals that a power off has been requested, which can be detected in software. A shutdown/restart cycle will then remove power as soon as the system has been shut down and the CMOS updated.
 
If software detects a 'power off' request then all it has to do (once it has completed any essential tasks) is to issue the command:
 
SYS "TaskManager_Shutdown",162
 
which will do a shutdown/restart cycle.
 
Doing a manual shutdown (CTRL-SHIFT-f12) and then pressing 'Restart' will also remove power (if a 'power off' request has been issued).
 

 
How Does It Work?
 
Software can detect the 'on' button being pressed or held down by reading the GPIO 19 line and can use this information for any purpose. The fact that the 'off' button has been pressed (and the 'on' button remains open circuit) can be detected by reading GPIO 26, meaning that 'power off' has been requested.
 
A little piece of software in !Boot.Choices.Boot.PreDesk sets GPIO 4 to output high (which ensures power stays on even after a 'power off' request).
 
During a restart cycle, before any writes are made to the SD card, the ROM modules are reset which takes GPIO 4 to high impedance: with a 'power off' request pending this will remove power.
 
Provided that the unit has been operating for at least six seconds (enough time for the RISC OS desktop to start), the 'off' button will pull GPIO 26 low but do nothing else. Software can detect this, complete any essential tasks and then either explicitly set GPIO 4 low (if a Witty Pi is present, this will remove power immediately) or (if not) perform a complete system shutdown using the command SYS "TaskManager_Shutdown",162 which will shutdown all applications tidily and restart RISC OS. The effect of this is to update the CMOS êlast time onë setting and restart the ROM. As the ROM reinitialises, GPIO 4 becomes high impedance thus removing power.
 

 
The 'on' button has some additional functions: whilst pressed, components (R6, R7 and LED) may also be fitted to present an LED load to any external power source that will only light if the external source is healthy (this works by sensing whether Vs from the power boost board is 3.7V or 5.2V). If a voltmeter is fitted as shown, the voltage of the internal LiPo battery is displayed whilst the button is depressed. A power meter can also be connected between the power boost board and the Raspberry Pi giving a voltage, current and power consumption readout.
 

 
Battery Life
With an internal 4400mAh LiPo battery, a Raspberry Pi Zero with an OLED display and GPS module (but with no HDMI connection) uses about 170mA (at 5V) and the battery should therefore last for about (4400 x 3.7)/(170 x 5.2)h which is just over 18 hours. A 5000mAh 5V powerbank should extend this by about 28 hours.
 

 
Chris Hall's website
 
1 comment in the forums

DDE tools update released

Read article... | 4 comments in the forums

55 BBC Micro Books on CD

Read article... | Comment in the forums

BBC BASIC Reference Manual updated

Read article... | 4 comments in the forums

DDE reaches release 28 and above

Read article... | Comment in the forums

Newsround

Read article... | 3 comments in the forums

Easier video playback on RISC OS?

Read article... | 17 comments in the forums
Recent discussions
- South West Show 2020 date confirmed (News:2)
- Aemulor (Gen:22)
- Alternative forum (Prog:4)
- Adventures in Optimisation - Audio mixing (News:2)
- June News round-up (News:)
- NetFetch updated to 5.50 (News:)
- RISC OS Interview with Sophia “sapphire” Bartram (News:)
- Code GCC produces that makes you cry #12684 (Prog:35)
- NBlood (Games:1)
- May News Round-up (News:)
Services
- Free ads
- Web hosting
Sites we like
- Kotaku
- pagetable.com
- Daring Fireball
- Drobe
- Ars Technica