CPCWiki forum

General Category => Applications (CPC and CPC-related) => Topic started by: m_dr_m on 13:01, 09 February 21

Title: New customisable firmware (lower ROM).
Post by: m_dr_m on 13:01, 09 February 21
Hi!


Both X-Men and M4Board allow to change the firmware. Both propose firmware mods.
I plan to cook a source of the firmware with several flags, to be able to cherry pick:
Let me know if you think of something else!

Title: Re: New customisable firmware (lower ROM).
Post by: SOS on 13:05, 09 February 21
Quote from: m_dr_m on 13:01, 09 February 21Let me know if you think of something else!
Some CPC's cant replace ROM7. Duke has in his LowerROM-Patch an logic:
"If i need to init ROM7, i will init ROM6 instead"
Title: Re: New customisable firmware (lower ROM).
Post by: Gryzor on 13:06, 09 February 21
I knew about fast PRINT, but fast CLS?

Mode 2 boot would also be nice, I love that font.
ROM deactivation also sounds quite practical.
How does BOOBS initialise?
Title: Re: New customisable firmware (lower ROM).
Post by: Bryce on 14:09, 09 February 21
What size boobs were you thinking of implementing? Will more RAM be required for the larger ones?

Also, will you be doing all versions of the lower ROM (there are several variants)?

Bryce.
Title: Re: New customisable firmware (lower ROM).
Post by: Gryzor on 14:20, 09 February 21
Quote from: Bryce on 14:09, 09 February 21will you be doing all versions of the lower ROM

Are we talking about software here?
Title: Re: New customisable firmware (lower ROM).
Post by: Shining on 14:27, 09 February 21
Something like autostart perhaps? (to autostart some non rom rsx expansions for example).
Title: Re: New customisable firmware (lower ROM).
Post by: m_dr_m on 15:07, 09 February 21
Thanks for the suggestions, really appreciated. Keep them coming!

Quote from: Bryce on 14:09, 09 February 21What size boobs were you thinking of implementing? Will more RAM be required for the larger ones?
CPC (C+ Cup)
Depending on the graphist, it may require one additional RpB (ROM per Boob).

All versions of the ROM: it would be exponential!
It would be an auto-installable CPC source with flags:


boot_mode_2 = 1
keyboard_layout = GREEK_LAYOUT
[...]


    if boot_mode_2
         ld a,2
    else
         ld a,1
    end   



Title: Re: New customisable firmware (lower ROM).
Post by: Gryzor on 15:15, 09 February 21
What values does the boob_mode accept then?
Title: Re: New customisable firmware (lower ROM).
Post by: m_dr_m on 15:27, 09 February 21
I guess we'll have to ask @MacDeath (https://www.cpcwiki.eu/forum/index.php?action=profile;u=221) !
Title: Re: New customisable firmware (lower ROM).
Post by: Bryce on 15:27, 09 February 21
Quote from: Gryzor on 14:20, 09 February 21
Are we talking about software here?

The BASIC 1.0 Firmware is different than the BASIC 1.1 Firmware, etc. So my question was will he be making a customisable version of all variants)?

Bryce.
Title: Re: New customisable firmware (lower ROM).
Post by: m_dr_m on 15:29, 09 February 21
Refactoring:



screen_mode_at_boot = 2
[...]
       ld a,screen_mode_at_boot
Title: Re: New customisable firmware (lower ROM).
Post by: m_dr_m on 15:30, 09 February 21
Quote from: Bryce on 15:27, 09 February 21The BASIC 1.0 Firmware is different than the BASIC 1.1 Firmware, etc. So my question was will he be making a customisable version of all variants)?

Good point! I don't plan to, but it will be open-source, so...
Title: Re: New customisable firmware (lower ROM).
Post by: roudoudou on 18:35, 09 February 21
Quote from: Bryce on 15:27, 09 February 21
The BASIC 1.0 Firmware is different than the BASIC 1.1 Firmware, etc. So my question was will he be making a customisable version of all variants)?

Bryce.
Basic 1.1 for 464 ! Do not leave 464 alone!
Title: Re: New customisable firmware (lower ROM).
Post by: Bryce on 18:38, 09 February 21
Quote from: roudoudou on 18:35, 09 February 21
Basic 1.1 for 464 ! Do not leave 464 alone!

The 464 is BASIC 1.0. :)

Bryce.
Title: Re: New customisable firmware (lower ROM).
Post by: roudoudou on 18:43, 09 February 21
Quote from: Bryce on 18:38, 09 February 21
The 464 is BASIC 1.0. :)

Bryce.
you miss the point, i vote "Basic 1.1 for 464" there is not interest to keep 1.0
Title: Re: New customisable firmware (lower ROM).
Post by: Bryce on 18:56, 09 February 21
Quote from: roudoudou on 18:43, 09 February 21
you miss the point, i vote "Basic 1.1 for 464" there is not interest to keep 1.0

Ah, ok, now I understand. I think something similar was already done, adding the Circle and Fill commands etc. to 1.0.


Bryce.
Title: Re: New customisable firmware (lower ROM).
Post by: m_dr_m on 12:27, 08 May 21
By the way, The @Duke (https://www.cpcwiki.eu/forum/index.php?action=profile;u=1624) , I cannot find the source for the Modified Lower ROM! I'd like to move M4ROM at 32 (instead of 6 or 7) and have it initialised
Title: Re: New customisable firmware (lower ROM).
Post by: Duke on 14:35, 08 May 21
Quote from: m_dr_m on 12:27, 08 May 21
By the way, The @Duke (https://www.cpcwiki.eu/forum/index.php?action=profile;u=1624) , I cannot find the source for the Modified Lower ROM! I'd like to move M4ROM at 32 (instead of 6 or 7) and have it initialised

There isn't any source for it. I just patched in the hex codes after some disassembly. If you do a diff, ie.  fc /b original_lowerrom.bin modified_lowerrom.bin you will see the few bytes that was patched in and the small codeblock that was fitted by overwriting part of some Basic error string.
Basically it goes something like this (free from memory)

Lowerrom code....
call rom_select(rom_num); // this is patched to jump to code block

code_block (part of string *** PROGRAM LOAD FAILED ***\r\n string was ended sooner and gave a few bytes):
if  (rom_num ==7)
    rom_num = 6;

return rom_select(rom_num);

EDIT:
Just loaded it up in the disassembler, so here is the code:

At 0x339 call 0xBA79 KL ROM SELECT was patched to jp 0x70A

0x70A string is overwritten with:
cp      6
jp      z, 0xBA87      ; is it rom 6, then KL ROM DESELECT and exit early as we don't want to use the rom twice
cp      7
jr      nz, 0x715      ; is it select rom 7 ?
ld      c, 6         ; then change it to rom 6
0x715:
call    0xBA79      ; KL ROM SELECT
jp      0x339        ; resume execution...


The location of the string I overwrite varies between the different languages of lowerrom.[/font]
Title: Re: New customisable firmware (lower ROM).
Post by: m_dr_m on 11:52, 09 May 21
Thanks, if it's the only mod, it makes sense!


For a ROM>15 I guess there is more work to do.
I wonder what @SyX (https://www.cpcwiki.eu/forum/index.php?action=profile;u=324) does for firmware 3.15, since there the ram-allocation-table-for-roms at &b8da is only 16 entries long (thanks @OffseT (https://www.cpcwiki.eu/forum/index.php?action=profile;u=1826) ).
Title: Re: New customisable firmware (lower ROM).
Post by: Duke on 18:33, 09 May 21
Quote from: m_dr_m on 11:52, 09 May 21
Thanks, if it's the only mod, it makes sense!
It is.

Quote
For a ROM>15 I guess there is more work to do.
I don't think so, if you want to achieve the same as I do with the modified lowerrom (make games/programs that use firmware and re-init roms compatible). Just replace 6 with 31 and put M4 rom in slot 31, that should work I think.
Powered by SMFPacks Menu Editor Mod