Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > Packer vs Code VM vs Code Generator
2016-08-13 16:38
oziphantom

Registered: Oct 2014
Posts: 490
Packer vs Code VM vs Code Generator

Has anybody experimented with/know of code VMs or Generators.
Just thinking to get code size down they might perform better than exomiser et al.

I know of Sweet16 by Woz any others?
 
... 80 posts hidden. Click here to view all posts....
 
2016-08-17 12:53
Krill

Registered: Apr 2002
Posts: 2980
But it triggers an interrupt from software.
2016-08-17 13:52
JackAsser

Registered: Jun 2002
Posts: 2014
Quote: brk is more useful for systemcall type of things, not "yield" imho

It's for a demo part and not an OS and I have many other IRQs going on so I decided that 1) I don't want to clutter each handler with B-flag check, 2) couldn't take the risk of a possible uncontrolled extra stall in f.e. a tight multiplexer. But yeah I condidered BRK long and hard before I decided to do the manipulation manually (and thus a need for semaphores to block the scheduler from interrupting a "user mode" task switch).
2016-08-17 13:53
JackAsser

Registered: Jun 2002
Posts: 2014
(Sorry for being OT, one thing led to another...)
2016-08-17 14:43
Oswald

Registered: Apr 2002
Posts: 5094
in my first demo I had "multitasking" with raster irqs. about in 20% for each frame I switched to loader then back. So only one type of return adresses, but I had other problems, the two threads messed up each other's stacks, so I simply copyed back and forth each one's stack (not all of it) to a temp buffer. also all register swapped. worked nicely today I'd just halve the stack and replace S tho.
2016-08-17 14:56
JackAsser

Registered: Jun 2002
Posts: 2014
Quote: in my first demo I had "multitasking" with raster irqs. about in 20% for each frame I switched to loader then back. So only one type of return adresses, but I had other problems, the two threads messed up each other's stacks, so I simply copyed back and forth each one's stack (not all of it) to a temp buffer. also all register swapped. worked nicely today I'd just halve the stack and replace S tho.

I do that too, but split the stack properly. 25% to loader, 75% to plotter, loader yields when not loading.
2016-08-17 15:06
oziphantom

Registered: Oct 2014
Posts: 490
Make 128 demos, problem solved :D
2016-08-17 15:08
Oswald

Registered: Apr 2002
Posts: 5094
Quote: I do that too, but split the stack properly. 25% to loader, 75% to plotter, loader yields when not loading.

you could just set some flag to tell the irq to stop scheduling the loader in, insead of that supper scifi method? :)
2016-08-17 15:29
JackAsser

Registered: Jun 2002
Posts: 2014
Quote: you could just set some flag to tell the irq to stop scheduling the loader in, insead of that supper scifi method? :)

I did consider that also, but was too boring to code
2016-08-17 17:32
Oswald

Registered: Apr 2002
Posts: 5094
well yeah certainly a more sexy solution :) brk could work too tho if you replace all your raster IRQs with NMIs :)
2016-08-17 18:25
TNT
Account closed

Registered: Oct 2004
Posts: 189
NMI happening during BRK will cause BRK to be ignored. See http://visual6502.org/wiki/index.php?title=6502_BRK_and_B_bit#N..
Previous - 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 - Next
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
Copyfault/Extend^tsn..
Linus/MSL
pcollins/Quantum
kbs/Pht/Lxt
Faayd/Quantum
Mythus/Delysid
t0m3000/hf^boom!^ibx
chancer
Walt/Bonzai
Mike
Mason/Unicess
katon/Lepsi De
Guests online: 120
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 Edge of Disgrace  (9.6)
6 What Is The Matrix 2  (9.6)
7 The Demo Coder  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 Layers  (9.6)
2 No Listen  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 Dawnfall V1.1  (9.5)
7 Rainbow Connection  (9.5)
8 Onscreen 5k  (9.5)
9 Morph  (9.5)
10 Libertongo  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Triad  (9.3)
5 Censor Design  (9.3)
Top Crackers
1 Mr. Z  (9.9)
2 Antitrack  (9.8)
3 OTD  (9.8)
4 Fungus  (9.8)
5 S!R  (9.8)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.119 sec.