Hacking Inside WBFS

PsyBlade

Snake Charmer
Member
Joined
Jul 30, 2009
Messages
2,204
Trophies
0
Location
Sol III
XP
458
Country
Gambia, The
How are the the blocks allocated? (i guess simply the first free block)
Can u try different allocation policies?
Maybe from the largest continious group of free blocks (aka worst-fit), from the first group which is large enough for the game (first-fit) or from the smallest large enough group (best-fit)?
 

PsyBlade

Snake Charmer
Member
Joined
Jul 30, 2009
Messages
2,204
Trophies
0
Location
Sol III
XP
458
Country
Gambia, The
While I dont think its a critical problem fragmentation seems ridiculously high.
I would like to try myself but as I dont know much C and nothing of libwbfs I cant make head or tails of the allocation function.
And as you were experimenting anyway I wanted to share my ideas about it.
 

PsyBlade

Snake Charmer
Member
Joined
Jul 30, 2009
Messages
2,204
Trophies
0
Location
Sol III
XP
458
Country
Gambia, The
Well ... I knew that much.
The code itself was the problem.
But once I got that it is a simple bitmap the rest was easy.

I implemented a variation of the worst fit algorithm.
Everything else would require deeper changes in the code and I only wanted to play around a bit.


To test it I used
CODE./wwt -q init a.wbfs -s512 -f; ./wwt -qp a.wbfs phantom 150x1-4g; for ((i=0;i
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • BigOnYa @ BigOnYa:
    "Crab people"
    +1
  • BigOnYa @ BigOnYa:
    I took your mum out dancing the other night...
  • Sicklyboy @ Sicklyboy:
    Oh I thought it was going to give a preview
  • K3Nv2 @ K3Nv2:
    @Sicklyboy, tap on edit then just hit enter
  • Sicklyboy @ Sicklyboy:
    oh sweet
  • BakerMan @ BakerMan:
    it's a bit more complicated than that
  • BakerMan @ BakerMan:
    click link (the chain icon), then paste the link without adding text for the link to say
    +1
  • BakerMan @ BakerMan:
    that's how you embed
  • K3Nv2 @ K3Nv2:
    Or just hit edit
  • Sicklyboy @ Sicklyboy:
    This newfangled shoutbox always trips me up
  • K3Nv2 tempBOT:
    K3Nv2 rolls 1d6 and gets 2 (2).
  • BakerMan @ BakerMan:
    how do you roll a die?
  • BigOnYa @ BigOnYa:
    with your hands, duh. Well uremum has a party trick that she uses something else
  • BakerMan @ BakerMan:
    in chat i mean
  • BakerMan @ BakerMan:
    and what if i don't have any hands? (i mean, i do (duh), but what if i didn't?)
  • K3Nv2 @ K3Nv2:
    Uremum is in the chat and she told me you're grounded
    +1
  • BakerMan @ BakerMan:
    cap
  • Xdqwerty @ Xdqwerty:
    Uremum's mum grounded her
  • K3Nv2 @ K3Nv2:
    This is Bakermans mum you're grounded no internet
    +1
  • BigOnYa @ BigOnYa:
    He must be listening, no response
  • K3Nv2 @ K3Nv2:
    Well he shouldn't have used chatgpt to do his homework
    +1
  • Xdqwerty @ Xdqwerty:
    Wut
    Xdqwerty @ Xdqwerty: Wut