News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_zhulien

Julian's Long List of Ideas Thread

Started by zhulien, 17:54, 12 February 25

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

zhulien

The line numbers are only in the line editor so you can edit and insert etc.  A fullscreen editor would remove the line numbers and put them back after exiting the fullscreen editor. Since I'm beautifying the JS code automatically it is a tiny more involved than just stripping the numbers - I'd probably beautify it with tabs for fullscreen, not spaces like the line editor.

There are two reasons it's JS and not something else - JS came almost for free without much development and AI LLMs seem to be good at JS, and unfortunately not as good at some others especially they are bad at assembly language.

It seems AI agents are a bit dumb when you tell them to it's "a line editor" only, I found i had to tell manus.im and another "it's a line editor just like 80s BASIC but using JavaScript instead" and it got it.  All this i will put in a programming prompt text file at some stage along with more detailed instructions in a single file - it takes manus some time to go through all the separate pages.  When it realises it's a line editor though it usually zips through.

bits of the JS framework are here: https://8bitology.net/poc/

zhulien

#51
I was doing some more coding the other day with Primal (my kernel) and had an interesting problem - that was, with my current memory routines how to deal with 4mb+ RAM to access all 256 16kb blocks plus internal memory with a single byte.  I came up with a solution,  I now have 3 heaps - An application heap, a system heap and a buffers heap.  keeping the API currently almost as it was, I added a Heap selector which lets me change heaps then use the other APIs like bankselect etc... for 4mb+ systems, I gave 3mb+ to applications, and 512kb to system and buffers each.  For 2mb+ systems, half that, until down to 128kb systems (that's 64kb extra ram - so 128kb total), they only have the 3 heaps are merged.  This sharing of heaps as a fallback works extremely well on paper at least - meaning if there is an abundance of RAM, the system can guarantee it's own RAM and RAM for buffers, but if there is not much RAM, they fall back to a single heap where it's more a typical CPC program (shared space for program, jumpblock, buffers).  The loader now defaults to working with unexpanded 464 or 664 and gives about 35kb available shared after the kernel is loaded no longer requiring an expanded memory driver.  I'm not yet overwriting the firmware jumpblock - but in time I will to use all RAM up to #C000.  But I also created a virtual memory variant for unexpanded machines which gives 1 x 64kb+ heap and 2 x 64kbMemory heaps - which will work fine on M4 or other Mass Storage - obviously not useable for Tapes or Floppy Discs.  This Virtual Memory isn't best for expanded machines but of course will work... a more intelligent virtual memory version would be best, that is to use a LIFO model for swapping files into physical expansion RAM - maybe in future I will code this.

Actually I could create a 4th pseudo-heap which is like a reserved, do not use heap - so that if someone was e.g. using an AMSDOS RAM expansion, we can not corrupt it, but

Next. to recode my Malloc (SysHeapAlloc) and Free (SysHeapFree) to use a better system than the slow iterate through banks, then iterate through lists - it takes quite a bit of time (fractions of a second though) to find a free block after e.g. 500 filled blocks.

I'm going to reinvestigate my RAT (RAM Allocation Table idea) - I think that is likely best, it's definitely the fastest, but it does have byte-aligned blocks which are the minimum memory allocation size even if you want smaller.

It isn't runnable yet, some code can be stepped through.

Latest Coding Status here:
https://docs.google.com/spreadsheets/d/14JQa3cTEd9fIz9lyoQRkzVc5xBz5FhEdr_DC41xPkJs/edit?usp=sharing

zhulien

#52
For all you adventuring "Text Adventure" (that's Interactive Fiction for all you newbies) fanatics, I have released Potent JS Adventure Creation Framework which lets you create some pretty cool Text Adventure games in JavaScript.  It is available for download at the Cyborg Unicorn website or if you follow the links from https://potentjs.com where you can also play a sample game created with it. You can create text adventure games with multiple playable characters. Think a RPG adventure game where you can be every member of the party which interesting puzzles they each can contibute to solve.

Now on github:

https://github.com/PrimalNinja/cyborgwiki
https://github.com/PrimalNinja/potentjsacf

zhulien

It's cool what a tiny bit of JS can do...

Initialising.

Ready.

In the shadow-shrouded realm of Delos, where the moon dipped into darkness and the wind whispered secrets to the trees, Xusia, the evil sorcerer, wove a web of deceit and malice. With a cackle that sent shivers through the land, he snatched Alana, the radiant starlight maiden, destined to be Talon's bride in mere days.

You are Alana.

I lie captive in the darkness of Xusia's lair, the cold stone beneath me a harsh reminder of my fate. You took me, Xusia, but why? What purpose do I serve in your twisted games? The hours tick by, each one a slow crawl of uncertainty. My thoughts are consumed by Talon, the one I'm to marry in just a few short days. Will he come for me? Does he even know I'm trapped here? I scan my prison, searching for any weakness, any chance to escape. The iron bars, the locked door, the guards patrolling outside... but I won't give up. I have to hold on to hope, to the thought of Talon's strong arms and his gentle touch. Maybe, just maybe, he'll find a way to rescue me before our wedding day. Until then, I'll plot, I'll plan, and I'll wait... for Talon, or for my chance to break free.

You are in a room with a red door to the south.

You can see: Xusia

> look

You are in a room with a red door to the south.

You can see: Xusia

> look xusia

Xusia is very scary.

> look door

The door is red.

It is closed.

> i

You are carrying:

├─ back pack
└─ dagger
> take dagger

You have the dagger already.

> look backpack

The back pack is a typical nylon type used by most school students.

It is closed.

> open backpack

You open the back pack.

> look backpack

The back pack is a typical nylon type used by most school students.

It is open.

It contains:

- rock

> get rock

You get the rock.

> i

You are carrying:

├─ back pack
├─ dagger
└─ rock
> look

You are in a room with a red door to the south.

You can see: Xusia

> talon

You are now Talon.

You burst through the door, expecting to be greeted by Alana's warm smile, but instead, you're met with an eerie silence. You call out, 'Honey, I'm home!' but there's no response. That's when you see Alana's little brother, his face frantic with worry, running towards you. 'Help! Help! Alana's been kidnapped by Xusia!' he cries, tugging at your leg.

Without hesitation, you grip your trusty Tri-Sword, its familiar weight a comfort in the face of danger. Our wedding is just a few days away, and you won't let Xusia ruin it. You set off towards Xusia's lair, determination burning within you. As you enter the dark, foreboding caverns, you feel a sudden, searing pain in the back of your neck. Everything goes dark, and you crumple to the ground.

When you come to, your head throbs, and your vision blurs. You're disoriented, but as your senses return, you realize you're in Xusia's lair, and... where's Alana? You struggle against your restraints, a growing sense of urgency and fear driving you. What has Xusia done to her? You need to find out, and fast. You glance around, taking stock of your surroundings, searching for any opportunity to escape and rescue your beloved Alana before it's too late.

You are in a room with a red door to the north.

You can see: black box, sword

> get swword

I don't see that here.

> get sword

You get the sword.

> get box

You get the black box.

> i

You are carrying:

├─ sword
└─ black box
> look box

The box is made of wood and painted black, it feels quite strong.

It is closed.

> open box

You open the black box.

> look box

The box is made of wood and painted black, it feels quite strong.

It is open.

It contains:

- red key

> get key

You get the red key.

> look box

The box is made of wood and painted black, it feels quite strong.

It is open.

It is empty.

> i

You are carrying:

├─ sword
├─ black box
└─ red key
> open door

The door is locked.

> unlock door

You unlock the door.

> open door

You open the door.

> go door

You enter the red door.

You are in a room with a red door to the south.

You can see: Alana, Xusia

> look alana

Such a beautiful lass.

> look xusia

Xusia is very scary.

> kiss alana

You put your hands on Alana's hips and give her a long intimate kiss.

> kiss xusia

Yuk! That's gross.

> alana

You are now Alana.

You are in a room with a red door to the south.

You can see: Xusia, Talon

> i

You are carrying:

├─ back pack
├─ dagger
└─ rock
> put dagger into bag

I don't see that here.

> put rock in bag

I don't see that here.

> i

You are carrying:

├─ back pack
├─ dagger
└─ rock
> put dagger into backpack

You put the dagger into the back pack.

> put rock into backpack

You put the rock into the back pack.

> i

You are carrying:

└─ back pack
   ├─ dagger
   └─ rock
> look back pack

The back pack is a typical nylon type used by most school students.

It is open.

It contains:

- dagger

- rock

> close back pack

You close the back pack.

> i

You are carrying:

└─ back pack
> give back pack to talon

You give the back pack to Talon.

> talon

You are now Talon.

You are in a room with a red door to the south.

You can see: Alana, Xusia

> i

You are carrying:

├─ sword
├─ black box
├─ red key
└─ back pack
> open box

The black box is already open.

> i

You are carrying:

├─ sword
├─ black box
├─ red key
└─ back pack
> open back pack

You open the back pack.

> o

I don't see that here.

> i

You are carrying:

├─ sword
├─ black box
├─ red key
└─ back pack
   ├─ dagger
   └─ rock
> look xusia

Xusia is very scary.

> kill xusia

After a long and hard-fought battle, you kill Xusia with the Tri-Sword.

I hold Alana's hand tight, feeling her warmth and love radiating towards me. The memory of Xusia's defeat still fresh in my mind, I'm grateful to have saved the woman I love. As we walk towards our future, I glance at Alana, her beauty and strength captivating me.

With Xusia's darkness vanquished, our path is clear. Our wedding awaits, and I'm eager to start our life together. Alana's smile lights up the world, and I'm honored to be her partner, her protector, and her love.

I look into her eyes, and she sees the sincerity in mine. 'I'll always protect you, Alana,' I promise, my voice filled with conviction. 'Together, we'll face whatever comes next, side by side.'

With Alana by my side, I know we'll conquer any challenge. Our love will flourish, and our bond will grow stronger with each passing day. As we step into our new life, I'm excited to see what the future holds for us, together.

> look xusia

Xusia is dead.

The following catches your attention:

- gold pouch

> get pouch

I don't see that here.

> get pouch from xusia

You take the gold pouch from the Xusia.

> i

You are carrying:

├─ sword
├─ black box
├─ red key
├─ back pack
│  ├─ dagger
│  └─ rock
└─ gold pouch
   └─ gold pieces
> put pouch into box

You put the gold pouch into the black box.

> i

You are carrying:

├─ sword
├─ black box
│  └─ gold pouch
│     └─ gold pieces
├─ red key
└─ back pack
   ├─ dagger
   └─ rock
> put box into back pack

You put the black box into the back pack.

> i

You are carrying:

├─ sword
├─ red key
└─ back pack
   ├─ dagger
   ├─ rock
   └─ black box
      └─ gold pouch
         └─ gold pieces
> close back pack

You close the back pack.

> i

You are carrying:

├─ sword
├─ red key
└─ back pack
> get gold

You get the gold pieces.

> i

You are carrying:

├─ sword
├─ red key
├─ back pack
└─ gold pieces
> look gold

Oooh, nice and shiny. Now you can afford a fantastic honeymoon!

> kiss alana

You put your hands on Alana's hips and give her a long intimate kiss.

> alana

You are now Alana.

You are in a room with a red door to the south.

You can see: Xusia, Talon

> kiss talon

You put your arms around Talon and give him a long intimate kiss.

> i

You are not carrying anything.

> alana

You are now Alana.

You are in a room with a red door to the south.

You can see: Xusia, Talon

> i

You are not carrying anything.

> take alana

You can't take the Alana.

> i

You are not carrying anything.

> talon

You are now Talon.

You are in a room with a red door to the south.

You can see: Alana, Xusia

> i

You are carrying:

├─ sword
├─ red key
├─ back pack
└─ gold pieces
> l

You are in a room with a red door to the south.

You can see: Alana, Xusia

> take xusia

You can't take the Xusia.

> i

You are carrying:

├─ sword
├─ red key
├─ back pack
└─ gold pieces
> open back pack

You open the back pack.

> i

You are carrying:

├─ sword
├─ red key
├─ back pack
│  ├─ dagger
│  ├─ rock
│  └─ black box
│     └─ gold pouch
└─ gold pieces
> put the key into the backpack

You put the red key into the back pack.

> i

You are carrying:

├─ sword
├─ back pack
│  ├─ dagger
│  ├─ rock
│  ├─ black box
│  │  └─ gold pouch
│  └─ red key
└─ gold pieces
> put the key into the black box

You're not carrying that.

> get the key

You get the red key.

> put the key into the black box

You put the red key into the black box.

> i

You are carrying:

├─ sword
├─ back pack
│  ├─ dagger
│  ├─ rock
│  └─ black box
│     ├─ gold pouch
│     └─ red key
└─ gold pieces

ervin

Tri-sword?
Xusia?

Sounds like the Sword and the Sorcerer.
GREAT movie!  :)

zhulien

Quote from: ervin on Yesterday at 08:52Tri-sword?
Xusia?

Sounds like the Sword and the Sorcerer.
GREAT movie!  :)
It's The Sorcerer and the Sword  :D

Powered by SMFPacks Menu Editor Mod