English Amiga Board Amiga Lore


Go Back   English Amiga Board > Coders > Coders. System

 
 
Thread Tools
Old 10 July 2017, 16:35   #1
Photon
Moderator
Photon's Avatar
 
Join Date: Nov 2004
Location: Hult / Sweden
Posts: 4,356
Coding challenge: Maximize-contiguous-chipmem bootblock

From this simple question, I started thinking. While there are some commands you can add in startup-sequence, this fragments the precious contiguous chip RAM needed to squeeze in some games and demos on A500.

There have been a few bootblocks that have allowed the user to manually disable DF1 (and reboot), but it made me want to find out if there is a way to disable all external floppy drives, shrink the CLI window to, let's say, two lines of text high, and reduce it to one bitplane in depth, jerry-rigged by the bootblock before the startup-sequence.

Previous solutions have not been compatible between Kickstarts. So is there a way which is compatible on all machines from kick 1.2 to 3.1?


I'm posting here even though it's a boot block, because I think the focus is knowledge of the system.

So if you want, give some ideas for the components, C, Assembler, or pseudocode - doesn't matter!
Photon is offline  
AdSense AdSense  
Old 10 July 2017, 19:47   #2
Leffmann

 
Join Date: Jul 2008
Location: Sweden
Posts: 1,999
Nothing I've tried, but as for the diskdrives, one idea is to check io_Unit in your IOStdReq to see what drive you've booted from, then open disk.resource and check dr_Flags to see what other units are enabled, and call GetUnit() and FreeUnit() to disable them.
Leffmann is offline  
Old 10 July 2017, 19:51   #3
Galahad/FLT
Going nowhere

Galahad/FLT's Avatar
 
Join Date: Oct 2001
Location: United Kingdom
Age: 43
Posts: 6,461
Pretty sure Quartex did something like this from a bootblock (disable all external drives).
Galahad/FLT is online now  
Old 13 July 2017, 16:08   #4
Photon
Moderator
Photon's Avatar
 
Join Date: Nov 2004
Location: Hult / Sweden
Posts: 4,356
Thx Leffman!

Galahad - without rebooting tho? And compatible. If so then it could interesting to have a look if you can find it.

The rebooting kind as you know is common, although I dunno many more than mine that are updated to be compatible. Toggle fastmem is easier to do without reboot.

Anyway the thing would be to strip external drives and strip one bitplane (or "1.5") and carry on booting normally from Kick 1.2 up.
Photon is offline  
Old 14 July 2017, 15:05   #5
NorthWay
Registered User
 
Join Date: May 2013
Location: Grimstad / Norway
Posts: 294
Isn't it possible to never have the CLI show? Or does 1.x always pop it up even if you redirect to NIL:?
NorthWay is offline  
Old 14 July 2017, 20:12   #6
ross
Vae victis!

ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Posts: 314
Quote:
Originally Posted by NorthWay View Post
Isn't it possible to never have the CLI show? Or does 1.x always pop it up even if you redirect to NIL:?
No, in 1.x is impossible to hide CLI.

But...
There is plenty of track loaders from Bootblock.
In the last days i'm writing a file loader for non-system environment
(yes, there are plenty also, but no one safe, small, functional and with good source code available).

My code ended up as about $250 bytes (i will publish the source).

With a little parser for startup-sequence we can 'emulate' everything from bootblock.

Strange idea?

Bye!
ross
ross is online now  
Old 14 July 2017, 20:31   #7
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,346
You could experiment with SetFunction-ing OpenWorkBench or OpenScreen to change the depth used by the WB screen to 1.
(Somehow) patch the DOS CON handler to open the initial CLI window much smaller. Or maybe an OpenWindow patch would be simpler?
mark_k is online now  
Old 14 July 2017, 21:17   #8
meynaf
68k wisdom
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon (France)
Age: 44
Posts: 2,297
You could just detach from CLI and call intuition.library/CloseWorkBench.
Using area $100-$3FF to move some code is possible as well ; from there you can run a small loader for whatever game or demo that follows.
If the game does not use some libs you can perform RemLibrary() on them.

Anyway, it all depends on what you really want to achieve. Is this purely academic or is there some specific goal ?
Taking over the system might be a better solution for new games/demos needing lots of chipmem.
meynaf is offline  
Old 15 July 2017, 13:13   #9
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,346
Ah, if $100-$3FF are unused, you could copy any patch code there. And/or use AddMemList to add that small amount of memory to the system list. Make its priority one higher than chip RAM.
mark_k is online now  
Old 16 July 2017, 00:09   #10
NorthWay
Registered User
 
Join Date: May 2013
Location: Grimstad / Norway
Posts: 294
You could relocate the header for chipmem to (fake) fastmem and then free it. That is some 16-32 bytes IIRC.
NorthWay is offline  
AdSense AdSense  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to maximize memory jotd support.Other 3 27 November 2015 22:41
ChipMEM Bug. FOL support.WinUAE 4 09 January 2013 22:41
Contiguous memory Quiet_Man New to Emulation or Amiga scene 0 03 November 2011 08:53
Coding a bootblock Yesideez Coders. General 15 23 May 2010 00:13
Apollo1260 + extra SIMM: contiguous RAM? (+ thank you Dimlow!) Quagliarulo support.Hardware 10 10 April 2010 00:16

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 22:53.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Page generated in 0.14990 seconds with 14 queries