Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Edwing

#1
Tips & tricks / Re: Basic keywords listing
May 06, 2009, 02:52 PM
Hey, cool method :ö)

But if I may ask, doesn't this leave out the two-byte tokens? Shouldn't one have a nested loop for those?


Ciao,
Edwing
#2
Tips & tricks / Re: Disabling function keys
May 06, 2009, 02:43 PM
Might this also have been what KEY OFF and KEY ON would've been doing if they'd been implemented? One of the original programmers might be able to tell us ...

And am I the only person who ever wondered what OFF and QUIT were supposed to do?

Oh BTW the POKEs mentioned should be extendable to F9 (aka RUN) and F10 (aka HELP). I always felt it lends a professional touch to a program if the user is able to get some help pressing the HELP key - better than this PC habit of using F1 ;~)

One BASIC extension I "had a crush on" (MasterBasic 128) did a very sensible tweak by extending KEY and KEY n,... to 9 & 10 so you could reprogram RUN and HELP for direct mode needs.


Regards,
Edwing
#3
...by the way... an alternative to this, if you use it a lot, is the hardware solution.

If anybody's interested I can look it up (it's been a while) but basically it makes use of the fact that while a C64 cartridge pulls /GAME and /EXROM to ground, a C128 module only uses /EXROM (or /GAME?) ... so as you may know this is how the C128 tells if a cartridge requires C64 mode & then jumps there upon switching up with a C64 cartridge.

Now you can simply connect that C64 pin to ground (via an interruptor, obviously ;ö) and it'll ALWAYS go to C64 mode on power on and reset.

Oh BTW ... I remember I used a two-way switch that would, in the other non-neutral position, rather connect it to /HI (or something) which means the C128 stays in C128 even with a C64 module inserted.
Effect? Normal C128 mode but you can PEEK (or e.g. disassemble) the module since it also prevents autostart ...
I found it kinda cool to be able to look at & save games by putting a module into my C128 and using the MONITOR for looking at & saving module games as simple as with internal ROMs :öD

Cheers, Edwing
#4
PET software / Re: 8296D 40/80 column ROM
May 06, 2009, 01:55 PM
QuoteChanging the CRT controller registers is one thing, but wouldn't all of the screen editor routines have to be re-written? They still expect the screen to be 80 columns.

If you apply this question to the C128, some serious re-writing of the editor routines would have to be made in order to make the 80-columns screen display everything in 40 columns.

...sorry if I'm totally missing out on something here, but at least on the C128, isn't it sufficient (from a pragmatic POV) to just set a 40x25 window (with ESC sequences or WINDOW command) after activating double pixel size on the VDC and tweaking the sync registers accordingly? Or, if you don't like half of the screen RAM being filled with zeroes (rather out of principal reasons I suppose, because who actually cares about 2000 bytes of characters and attributes when you have 16 or even 64 K to spend?), just set that maximal width zeropage address recently discussed somewhere here to 39 and reset the editor or something... Cheers, Edwing
#5
VICE / Re: My palette file for VICE
May 01, 2009, 12:21 PM
Hey. Thanks for your color lists. Having used CCS64 for a while, as time went by I did some manual fine tuning until I've come to the following set of emulated VIC colors:

$RGBCOLOR0=181818
$RGBCOLOR1=ffffff
$RGBCOLOR2=903040
$RGBCOLOR3=b6fafa
$RGBCOLOR4=ba31e4
$RGBCOLOR5=60c050
$RGBCOLOR6=3018c0
$RGBCOLOR7=fbfb60
$RGBCOLOR8=b87028
$RGBCOLOR9=703800
$RGBCOLOR10=ef839f
$RGBCOLOR11=4d4d4d
$RGBCOLOR12=808080
$RGBCOLOR13=b7fbbf
$RGBCOLOR14=948cff
$RGBCOLOR15=c8c8c8


Note that they're not for 9300 °K but some custom setting at around 8000 °K; and that they're not for "plain" but scanline filtered display (which I think looks much more like the real thing).

So these are supposed to be mixed with alternating lines of black, meaning that "black" is not shown as 181818 but rather like 0c0c0c.

The filter of course also requires the PC monitor's contrast to be set quite high ... for the emulator with scanlines, I have it at 80% while normally I work at 50% or 60%. (I believe in VICE you can set the alternating color to shades of grey rather than just black...)

Hope this is of some use for someone.

Cheers,
Edwing :ö)
#6
Don't know either, but ... what programs besides Arkanoid are there supporting the NEOS mouse? Was it bundled with some gfx prg perhaps? Just asking b/c I never met one (apart from Arkanoid).

By the way, a tip for people like me who prefer CCS64: This emulator doesn't feature a NEOS emulation, but you can set the input to convert the PC mouse movements to paddles (instead of 1351), which works great for Arkanoid - and other games allowing for paddle input (such as Clowns) :öD

Who knows, maybe choosing paddle input even works with a real 1351 on a real C128? Would make sense, technically - seeing that a 1351 is basically two paddles set at 90 degrees angle ;ö)

Anyway, the specifications of that ominous NEOS rodent are indeed an interesting question ... will stay tuned :ö)
#7
Tips & tricks / Re: In and out of windows
May 01, 2009, 09:00 AM
Seconding airship, I also find the "practices" quoted by xlar54 questionable ... albeit for different reasons. (Actually, airship's are better ;ö)

Personally I prefer not to use POKEs unnecessarily. Thus, why not leaving a window by
?"<home><home>";
and re-establishing it via the appropiate WINDOW command?

I don't think a WINDOW is slower than a POKE (at least not significantly measured by BASIC time dimensions ;ö). If you don't like inserting a lot of the same WINDOWs into your program, you could have GOSUBs to one (if speed is not critical). For resuming print in the same position inside the window, the old co-ordinates could be PEEKed or LINed or something and later used by the WINDOW command.

I know, it's not as sexy as jumping in and out with a single POKE ... but as airship explained, that method isn't working cleanly.

BTW,
QuoteLeave locations 237 and 238 alone. They are set to '24' and '79' by the startup routines and you really don't want to tell the C128 it has a bigger or smaller screen than it actually does.
...well, at least not unintentionally. Changing these is justified if you set the VDC to a different screen size and want the editor to use all of that (or, not more than that e.g. for a 40x25 double width screen).
It also makes sense to use these for protecting a status line on bottom of the screen from user activity, e.g. for a utility in direct mode - how quickly does the user press <Home> twice when meaning to press it once ...
Actually, one could also think of using these for a "virtual screen" bigger than what's displayed ... under program control the user could scroll the screen "window" through that, pretty much as with C64 word processors or CP/M in 40 columns - or indeed GUIs like that of Windows.

Regards,
Edwing :ö)
#8
Thanks for clarifying :ö)
#9
BASIC / Re: PEEKing Bitmap Color?
May 01, 2009, 07:42 AM
...maybe I'm thick, but you surely have a reason to use the bitmap screen for your color cards rather than using the same CHAR command in text mode?

Regards,
Edwing
#10
Hey :ö) This thread is a bit older but since I'm just meeting it now ...

So if it's still relevant to your programming projects, there actually is something you can do to use PLAY with indefinite note length ...

You see, there's a flag in the zeropage (sorry don't know the address now, someone else may help) that switches the BASIC interrupt on/off. If this is set to stop, sprites don't move by their own anymore (as by MOVSPR 1,90#5 etc.) which is useful for aligning sprites before starting them all at once ... but also, there's eg. no split screen (GRAPHIC 2, GRAPHIC 4) anymore and PLAY is paused, too...

So my idea for holding a note is to start it with PLAY, then switch off the IRQ, wait until the key is released, then switch the IRQ on again for having the note sound off. Here's some pseudo code example:

10 ESC$=CHR$(27)
20 ENVELOPE 0,Attack,Decay,Sustain,Release:PLAY"U9 X0 T0":REM for preset 0, choose for a sustain a little longer than the BASIC loop takes
30 ?"<cls>EDWING'S SMALL MONOPHONIC SYNTHESIZER"
40 ?"<down>PRESS ANY NOTE KEY TO PLAY - ESC TO EXIT"
50 DO
55 GETKEY A$:IF INSTR("CDEFGAB",A$) THEN BEGIN
65 DO:V%=V%+1:IF V%=4 THEN V%=1
70 PLAY"M V"MID$(STR$(V%+1),2)A$:POKE Irq,off:DO:GET B$:LOOP WHILE B$=A$
80 POKE Irq,on:A$=B$:LOOP WHILE B$>ESC$
90 BEND
100 LOOP UNTIL A$=ESC$


Notes:
65 - I cycle the voice used so that it's possible to "slide" from one key to another, rather than having to let the first go before being able to press the second. It's still monophonic though.
70 - Notice the "M" parameter in the PLAY command; in case you don't know, it means "wait for measure" and causes PLAY to wait until the present note is finished. The idea is to finish the sounding off of the former note before starting a new (indefinite) one which would also cause the first one to keep on going. I didn't test the program, but this should work b/c the "M" is played in the old voice and then we switch to the new one. It also should do no harm for the first note played b/c there's no notes waiting in the IRQ queue.

You could also try fiddling with the TEMPO command, which can be set to play really long notes.

But actually, it may be best to use SOUND instead of PLAY for these purposes ... you could have it play a tone and change the frequency ... with POKEs even in real time ... not as much work as it sounds, just two POKEs for a frequency ... I believe this approach still would be much easier than in BASIC 2.0 since even if you have to use some POKEs to accompany the BASIC 7.0 commands, on the 64 it would be ALL POKES ;ö)

Still, of course then you have to convert notes to frequencies via a table (there's one in the back of the C128 manual) in DATA lines (or from the PLAY command's table in the ROM?), but it gives you the flexibility to also encorporate quarter-tones (since you asked for them ;ö). Also, you only would have to define values for an octave, and then you could have the program calculate the rest.

Cheers,
Edwing :ö)