User Port Emulation in VICE

You need an actual VIC.

Moderator: Moderators

Post Reply
User avatar
chysn
Vic 20 Scientist
Posts: 1205
Joined: Tue Oct 22, 2019 12:36 pm
Website: http://www.beigemaze.com
Location: Michigan, USA
Occupation: Software Dev Manager

User Port Emulation in VICE

Post by chysn »

Is it possible to simulate incoming data on VIA#1 Port B in VICE?

Code: Select all

lda #%00000000
sta $9112 ; DDR - Input on all
sta $911c ; PCR - Interrupt input mode
The interrupt flag bit 3 is set when there's a transition on the VIA's CB2. But there's no memory that's mapped to this pin, the signal needs to go directly into the VIA. And it doesn't appear that I can "fake out" the code by setting the interrupt flag register.

I don't see anything promising in the VICE menus, so I suspect it can't emulate hardware at the granularity that I'm looking for. I want to make sure I'm not missing anything, though. It's no problem using real hardware. I just can't do it while sitting on the couch watching Star Trek.
VIC-20 Projects: wAx Assembler, TRBo: Turtle RescueBot, Helix Colony, Sub Med, Trolley Problem, Dungeon of Dance, ZEPTOPOLIS, MIDI KERNAL, The Archivist, Ed for Prophet-5

WIP: MIDIcast BASIC extension

he/him/his
groepaz
Vic 20 Scientist
Posts: 1187
Joined: Wed Aug 25, 2010 5:30 pm

Re: User Port Emulation in VICE

Post by groepaz »

You'd have to hack in a userport device that does what you want to do

that said, the entire userport system is being rewritten right now - perhaps make a feature request that explains what you want to do, so we can think about some kind of interface for that
I'm just a Software Guy who has no Idea how the Hardware works. Don't listen to me.
User avatar
chysn
Vic 20 Scientist
Posts: 1205
Joined: Tue Oct 22, 2019 12:36 pm
Website: http://www.beigemaze.com
Location: Michigan, USA
Occupation: Software Dev Manager

Re: User Port Emulation in VICE

Post by chysn »

groepaz wrote: Sat Sep 11, 2021 5:25 am You'd have to hack in a userport device that does what you want to do

that said, the entire userport system is being rewritten right now - perhaps make a feature request that explains what you want to do, so we can think about some kind of interface for that
Thanks! My perspective on it might be a bit narrow, but I'll put some thought into how to phrase such a feature request. The question is, "what sets the simulated user port (a.k.a. VIA) pins high or low?" It would have to involve some communication between not-VICE and VICE. Back in my Amiga days I would have said, "This looks like a job for AAREX!"
groepaz
Vic 20 Scientist
Posts: 1187
Joined: Wed Aug 25, 2010 5:30 pm

Re: User Port Emulation in VICE

Post by groepaz »

One way could be:
- add a monitor command for it
- add a remote monitor command for it
I'm just a Software Guy who has no Idea how the Hardware works. Don't listen to me.
Post Reply