LisaList2

Advanced search  

News:

2019.06.07 fixed NChat for the "Curve" theme, will eventually move it to its own page and add it to the default theme as well. Other plugins are next. see post in the Meta board for details

Pages: 1 2 [3] 4 5 ... 10
 21 
 on: January 31, 2020, 07:48:34 pm 
Started by stepleton - Last post by rayarachelian
Quote
Now on the Lisa, WaitForCops works as expected: type some keys, move the mouse, and you get bytes; otherwise you don't (or maybe you get zero bytes---my program doesn't display those). Either way, something I can work with.

In LisaEm 1.2.6.2, WaitForCops works as expected until the first time I move the mouse. Then it continually streams what looks like the last mouse byte it had streamed previously (again, maybe there are zeros I'm not seeing). You can type more, or move the mouse more, and see those codes blip up occasionally in the bytes, but the old mouse bytes just won't stop---they just keep coming and coming.
Hi Tom!

Thanks for this, I'll test this out and see if I can fix this behavior!

That if statement is basically saying, if there's no keys in the queue to send, and the Lisa is reading from the VIA, then send a mouse movement. If there's no mouse movement recently, send code 0 which indicates mouse status, followed dx,dy, but in this case dx=0, dy=0, so you'd get 3 zero bytes. (mouse movements are additive to the dx,dy, so if you first move +1,+2 and a bit later, you move +1,+1, it will send +2,+3.)

Off the top of my head it should add mouse movement to the queue anyway, so this condition is when you'd use polled I/O without an interrupt service routine. I'm not sure what a real COPS will return in that case, but expected a null mouse movement wouldn't break anything.

But it should not repeat the same movement again.

So, as an aside, so what are you seeing returned on the real Lisa when there's no mouse movement and no keys pressed and you read from IRA, ignoring the IFR wait? I'll add that to that fn if you have seen it.

I think in this case the bug is that the IFR is being set and not cleared somehow, or something else is setting it again and again. Off the top of my head, I think I remember the VIA docs say that when IRA is read or written to, from it should clear that corresponding IFR bit.

So likely the bug isn't in that line but rather that the IFR bit isn't being cleared on the read. Which might be the case. The macro on line 1072 should be clearing that IRQ, but perhaps it isn't working as intended. https://github.com/rayarachelian/lisaem/blob/8ae6947342ed6035fe5f99ea65ab0631204ade2d/src/lisa/io_board/cops.c#L1072
I can understand that when you get the first zero, two more are sent as dx,dy, and this would trigger IFR again as the cops queuelen is now 2 after reading the 1st zero. But that should stop after reading that 3rd byte. So not sure why it's repeating beyond that. The bug might even be in irq.c and not in either via6522.c nor cops.c.I'd suspect this block: https://github.com/rayarachelian/lisaem/blob/8ae6947342ed6035fe5f99ea65ab0631204ade2d/src/lisa/cpu_board/irq.c#L809 or maybe here:https://github.com/rayarachelian/lisaem/blob/8ae6947342ed6035fe5f99ea65ab0631204ade2d/src/lib/libGenerator/generator/reg68k.c#L301
irq.c is a bit complex, it has a way to queue IRQs in the future, for things like the VIA timers, video retrace, and async disk requests.

I'll experiment in the current repo and see what I'll find and reply here again.

Please note that the source code you're looking at is actually 1.2.7 and not 1.2.6.2 but much of this code hasn't been touched for the 1.2.7 changes.

I'd do another push soon, but I've been stuck trying to sort out some issues with scaling and skinless modes for the last couple of weeks without much progress. (Basically the wx3.1.2 is reporting a screen size of 1920x1080 for my 4K display possibly because I've set GTK scaling to 200% and it's trying to do 4K scaling, but wx3.0.x returns 4K for the resolution!
Then on top of that the dc has it's own scaling via dc.SetUserScale, which I'm now using instead of the code from the last push. But now I'm having trouble calculating the sizes and locations of things and so both mouse and centering code is broken in OnPaint_skinless() for zoom sizes other than 50% ). Skinned modes work fairly well, but not for all scale sizes.

Edit, yup, confirmed, this is stuck forever flagging that it has mouse movement data as soon as the mouse is moved the first time and doesn't quiesce.:

Code: [Select]
src/lisa/io_board/cops.c:via1_ira:1061:IRA1 copsqueuelen:0, mousequeuelen:1 cops_mouse:81500 VIA1.IFR:00000000 VIA1.IER:00000082| 20:16:03.9 858443839
src/lisa/io_board/cops.c:via1_ira:1061:IRA1 copsqueuelen:2, mousequeuelen:1 cops_mouse:81500 VIA1.IFR:00000000 VIA1.IER:00000082| 20:16:03.9 858443973
src/lisa/io_board/cops.c:via1_ira:1061:IRA1 copsqueuelen:2, mousequeuelen:1 cops_mouse:81500 VIA1.IFR:00000000 VIA1.IER:00000082| 20:16:03.9 858443973
src/lisa/io_board/cops.c:via1_ira:1061:IRA1 copsqueuelen:1, mousequeuelen:1 cops_mouse:81500 VIA1.IFR:00000000 VIA1.IER:00000082| 20:16:03.9 858444105
src/lisa/io_board/cops.c:via1_ira:1061:IRA1 copsqueuelen:1, mousequeuelen:1 cops_mouse:81500 VIA1.IFR:00000000 VIA1.IER:00000082| 20:16:03.9 858444105
src/lisa/io_board/cops.c:via1_ira:1061:IRA1 copsqueuelen:0, mousequeuelen:1 cops_mouse:81500 VIA1.IFR:00000000 VIA1.IER:00000082| 20:16:03.9 858445857
src/lisa/io_board/cops.c:via1_ira:1061:IRA1 copsqueuelen:0, mousequeuelen:1 cops_mouse:81500 VIA1.IFR:00000000 VIA1.IER:00000082| 20:16:03.9 858445857
src/lisa/io_board/cops.c:via1_ira:1061:IRA1 copsqueuelen:2, mousequeuelen:1 cops_mouse:81500 VIA1.IFR:00000000 VIA1.IER:00000082| 20:16:03.9 858445991
s

Here's a workaround, add this line:
Code: [Select]
  if ( !(mouse_pending_x|mouse_pending_y) && mousequeuelen==1 && copsqueuelen==0) mousequeuelen=0;
here: https://github.com/rayarachelian/lisaem-1.2.x/blob/v1.2.6.2.1/lisa/cops.c#L1242  for 1.2.6.2
or here:
https://github.com/rayarachelian/lisaem/blob/master/src/lisa/io_board/cops.c#L1244 for 1.2.7

 22 
 on: January 30, 2020, 03:53:19 pm 
Started by stepleton - Last post by stepleton
Hi folks,

This might just be a question for Ray, but it might also be a question for anyone with knowledge of Lisa internals.

First, I've definitely found a behaviour difference between my 2/10 and LisaEm (1.2.6.2, to be fair). I think this one might be easy to fix for someone knowledgeable. But it also may not matter, because it could be that I'm doing something wrong in the first place, at least as far as Lisa programming is concerned.

I'm trying to code up a little library for bare-metal mouse and keyboard I/O, in service of another project. It's pretty basic for the moment. For the purposes of this post, you can imagine that it boots straight off of a floppy and jumps straight into the following:

Code: [Select]
    ; Define VIA addresses
kKbVia      EQU  $FCDD81
kKbViaIfr   EQU  $1A
kKbViaOra   EQU  $02

  ...

WaitForCops:
    LEA.L   kKbVia,A1
.wb MOVE.B  kKbViaIfr(A1),D0
    BTST    #1,D0
    BEQ.S   .wb
    MOVE.B  kKbViaOra(A1),D0
    RTS

Now on the Lisa, WaitForCops works as expected: type some keys, move the mouse, and you get bytes; otherwise you don't (or maybe you get zero bytes---my program doesn't display those). Either way, something I can work with.

In LisaEm 1.2.6.2, WaitForCops works as expected until the first time I move the mouse. Then it continually streams what looks like the last mouse byte it had streamed previously (again, maybe there are zeros I'm not seeing). You can type more, or move the mouse more, and see those codes blip up occasionally in the bytes, but the old mouse bytes just won't stop---they just keep coming and coming.

I don't know that this matters all that much---it's obviously not something that bothers the operating systems or even Service Mode. Does anyone know if they're doing something I'm not (e.g. some kind of initialisation step)?

I did notice this line in LisaEm's cops.cc and wondered if it might be related, but thought it might not be because it always resets the mouse motion data to 0, 0, and my bytes aren't changing.

Anyhow, thanks for any thoughts!

 23 
 on: January 13, 2020, 04:32:26 pm 
Started by rayarachelian - Last post by Lisa2
Fantastic!  Thanks for doing this Ray!

 24 
 on: January 13, 2020, 11:05:10 am 
Started by rayarachelian - Last post by rayarachelian
So it's been almost a year since LisaList2 started, but I've been too busy to do a proper import of LisaList1 into the forum and write the PHP code to do this generically. To address this, in the interim, I've cheated a bit and used HyperMail to convert the old mailing list archives into HTML format. They can be found here:

https://lisalist2.com/lisalist1/date.html

This is an interim step, and will eventually be replaced with a proper import into SMF of the old messages and user accounts as planned, but perhaps I can use the resulting output from HyperMail (https://github.com/hypermail-project/hypermail.git) to SMF as it already did some of the heavy lifting of processing the emails, attachments, usernames, etc.

 25 
 on: January 07, 2020, 04:10:21 pm 
Started by rayarachelian - Last post by rayarachelian
Quote
everything we've written has a loader that exploits a "vulnerability" in the kernel to take over and sweep it aside.)  It should conceivably be quite possible to write drivers for either Workshop or Lisa Office that provides proper user-mode access.
I think I've seen this before in tracelogs of LOS, it's more of a trampoline. Off the top of my head if you invoke an opcode that starts with 0xa1234568 it will execute a trap that will then ultimately JSR to address 0x00234568 or something like that. The Mac instead, has real A-Line traps with a look up table instead of this. The Lisa wasn't very security savvy, even though it did have an enforcing user/supervisor mode enabled and MMU memory protection.

I'm surprised they bothered building this for LOS, they could have just directly written their own boot loader (or used Tom's or even reused LOS's boot loader) that brings up their app even without any OS, but hey, sure, why not!

Who knows, maybe they needed the LisaGraf routines.

That sound card sounds pretty neat!

 26 
 on: January 07, 2020, 10:43:21 am 
Started by rayarachelian - Last post by Lisa2
Here is some more information on this:
https://coda.s3m.us/2012/08/06/creation-of-the-ilisa-demo-soundtrack/

This is a quote from the developer  in 2012 about the custom sound card that I had in my archives:

"Currently, it acts as a valid bus-accessible device, but we've only used it from programs running in kernel mode from Lisa Workshop that are able to directly access the add-in slot addresses.  (Needing nearly all the RAM, requiring deterministic execution time, and needing to slot in our own interrupt handlers for these demos, everything we've written has a loader that exploits a "vulnerability" in the kernel to take over and sweep it aside.)  It should conceivably be quite possible to write drivers for either Workshop or Lisa Office that provides proper user-mode access. Interface-wise, it's a bunch of memory-mapped registers that activate operations or allow the uploading of audio samples.  Given such a driver, it wouldn't be very hard to write a program that plays raw WAV or OPL (e.g. Adlib files from old DOS games) files.  Brief experimentation indicates that compressed audio (e.g. MP3) is laughably beyond the machine's abilities.

However... our current feeling is "it's been fun" and that we've shown off some ridiculous stuff that can be done with this machine but that it's both so limited in capability and rare that it's probably not worth our while to keep going.

At this point I'm inclined to just release the gerber CAD files, bill of materials, the CPLD programming binary, and programming interface to the world so that anyone that really wanted one could build one.  (We're going to hold onto schematics and CPLD source for now.)  The BOM probably runs $150 each for small orders of parts, and the assembly is easily a day or two task for a highly skilled surface-mount solderer if done by hand (some chips with very small pitch pins and 100-some bypass capacitors you mostly don't see on the back).  Automated assembly would make that a lot more sane but isn't going to be economical for small batches."

To answer Ray's question: this is a completely different animal than the Lisa DAC card that allows Macintosh sound support under MacWorks.

Rick


 27 
 on: January 06, 2020, 10:27:54 pm 
Started by rayarachelian - Last post by rayarachelian
Don't miss their award-winning second demo if you don't mind a rickroll. (It's also mentioned at the bottom of the linked article.) This one uses a custom soundcard that they made for the machine.

Very neat! Did they release schematics for the sound card they've built? Wonder how it compares to the LisaDAC.

 28 
 on: January 06, 2020, 03:11:12 pm 
Started by rayarachelian - Last post by stepleton
Oh I knew about it ;D

But regrettably I didn't know about it in 2011 when it was first developed, at my graduate school alma mater no less, and within walking distance of my house at the time. I found out in 2015, just before moving from Pittsburgh to London. I wish I could have paid them a visit...

Don't miss their award-winning second demo if you don't mind a rickroll. (It's also mentioned at the bottom of the linked article.) This one uses a custom soundcard that they made for the machine.

I have to wonder: have their demos pushed the Lisa to the limit, or could you something more impressive with a bit of persistence? I have to imagine that if they could have got the beeper to play something more interesting than a beepy soundtrack (like those programs that play lo-fi audio on PC speakers), then they would have done it.

 29 
 on: January 06, 2020, 08:53:24 am 
Started by D.Finni - Last post by D.Finni
Yes, I would like to standardize on menus too, even if we do keep the separate wxui versions for maintaining compatibility with older systems.

Hey @D.Finni, so would it help your efforts (both on the G4/G5 front and future UI) if I split up lisaem_wx.cpp into multiple files?

I was thinking of something like this for a future release since that file's pretty huge and includes multiple classes rather than one per file?
[...]
That way when I push new code you could do `git diff` and see what changed and make mirror changes as needed.
Yeah, I think that'll work nicely.

 30 
 on: January 05, 2020, 08:35:28 pm 
Started by rayarachelian - Last post by rayarachelian
Apprently back in 2016 there was a Lisa demo scene that we didn't know about.https://bytecellar.com/2016/03/29/an-interview-with-cmucc-members-behind-the-apple-lisas-first-scenedemo-le-requiem-de-lisa/
And an interesting hack that displays color at the end!https://www.youtube.com/watch?v=ViroWYBvNRE
Neat!

Pages: 1 2 [3] 4 5 ... 10