I've checked in today an update to the Loader design to allow 24 bit RGB backgrounds - mainly to test some changes to the DRAM controller.
Loader is usually booted first (from replay.ini) and allows you to select other cores.
In replay.ini there are a few things you can tweak :
# enables verification feature, checks back any ROM/DATA upload
VERIFY = 1
# background image to load (autosize)
ROM = background.raw,0,0x00400000
#ROM = background_rgb.raw,0,0x00400000
The ROM command selects the file to upload. If the size is 0, the complete file is uploaded to the address specified.
If VERIFY = 0 then software will not read back the file which saves some time on boot.
I've checked in an example background_rgb.raw if you wish to try it. Simply move the # (comment) to the line above.
You can change all the options from the OSD menu. They are also defined in the ini file.
item = "Background Type", 0x00000084,dynamic
option = " BW", 0x00000004,default
option = " RGB", 0x00000000
option = " RGB24", 0x00000080
If you want to use the 24 bit image, move the ,default to RGB and the software will select that by default. Like :
item = "Background Type", 0x00000084,dynamic
option = " BW", 0x00000004
option = " RGB", 0x00000000
option = " RGB24", 0x00000080,default
Loader can also play audio files, as an test of the fileio code. You can select a file from the OSD, but to auto mount, remove the #in the cha_mount line.
# HDs / Carts / Floppys etc
cha_cfg = "removable", PCM
# to auto play
#cha_mount = "loop.pcm",0
If you want to make your own backdrop, it should be a raw image 720x576 (50Hz) or 720x488 (60Hz).
I use paint shop pro, so there the required options are:
Three channel RGB
Interleaved RGB
Order RGB
My example is 576 lines, so when it's displayed in 720x488 the bottom is chopped off. To centre it, you could modify the address the image is loaded to
ROM = background_rgb.raw,0,0x00400000
subtract x870 bytes per line, 44 lines to move, so 0x003E8CC0 should be about right. Note, you need to start on a 4 byte boundary otherwise the burst addressing goes wrong.
For the audio (Audacity works well) use RAW import, signed 16 bit PCM, little endian, 2 channels 48KHz.
Default clocking is for 48KHz audio. To play 44.1 KHz you could adjust the frequency of the audio clock (also in the INI file).
# outputs
# y0 - FPGA DRAM PLL1 / 2 = 114.5 MHz
# y1 - Coder PLL1 / 16 = 14.3 MHz
# y2 - FPGA aux/sys clk PLL3 / 5 = 49.152 MHz (audio)
# y3 - Expansion Main off
# y4 - FPGA video PLL1 / 8 = 28.625 MHz (Same as sysclock for standard video)
# y5 - Expansion Small off
#
# NTSC SETUP by parameter set
# PLL1 229.09MHz = 27 * 280/ 33
# PLL2 133.00MHz = 27 * 133/ 27 (not used)
# PLL3 245.76MHz = 27 * 2048/225
# n max 4095
# m max 511
# P value source 0=27MHz, 1 = PLL1, 2 = PLL2, 4 = PLL3
# D divider value
# Y divider selector
# M1 N1 M2 N2 M3 N3 | p0 p1 p2 p3 p4 p5 | d0 d1 d2 d3 d4 d5 | y0 y1 y2 y3 y4 y5
CLOCK = 33, 280, 27, 133, 225,2048, 1, 1, 4, 0, 1, 0, 2,16, 5, 1, 8, 1, 1, 1, 1, 0, 1, 0
This is a bit more complex, but FPGA aux/sys clk is used for Audio in the loader design.
The input clock 49.152 MHz / 256 gives 192KHz audio. It's used with a 1 in 4 enable to get 48KHz.
The reference clock is 27MHz. The output is given by 27 * n/m / p (in MHz)
Setting n3 = 475, m3 = 71 and d2=4 would give 45.158MHz, which should be correct for 44.1MHz.
(Edit, i've added these notes into the ini file)
/MikeJ