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: 502
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: 3098
But it triggers an interrupt from software.
2016-08-17 13:52
JackAsser

Registered: Jun 2002
Posts: 2038
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: 2038
(Sorry for being OT, one thing led to another...)
2016-08-17 14:43
Oswald

Registered: Apr 2002
Posts: 5127
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: 2038
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: 502
Make 128 demos, problem solved :D
2016-08-17 15:08
Oswald

Registered: Apr 2002
Posts: 5127
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: 2038
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: 5127
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
Guests online: 351
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Codeboys & Endians  (9.7)
4 Mojo  (9.6)
5 Coma Light 13  (9.6)
6 Edge of Disgrace  (9.6)
7 Signal Carnival  (9.6)
8 Wonderland XIV  (9.5)
9 Uncensored  (9.5)
10 Comaland 100%  (9.5)
Top onefile Demos
1 Nine  (9.7)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.5)
6 Scan and Spin  (9.5)
7 Onscreen 5k  (9.5)
8 Grey  (9.5)
9 Dawnfall V1.1  (9.5)
10 Rainbow Connection  (9.5)
Top Groups
1 Artline Designs  (9.3)
2 Booze Design  (9.3)
3 Performers  (9.3)
4 Oxyron  (9.3)
5 Censor Design  (9.3)
Top Fullscreen Graphicians
1 Joe  (9.7)
2 Sulevi  (9.6)
3 The Sarge  (9.6)
4 Veto  (9.5)
5 Facet  (9.5)

Home - Disclaimer
Copyright © No Name 2001-2025
Page generated in: 0.091 sec.