1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-08 22:28:06 +11:00
Commit Graph

8 Commits

Author SHA1 Message Date
Virgil Dupras
d1718a90c7 sms: add support for VDP's text mode
Because that mode behaves exactly like in a regular TMS9918, a new
driver for TMS9918 has been added in blkfs and SMS' VDP now uses it.

Also, fix broken 5x7 font.
2020-11-13 12:18:00 -05:00
Virgil Dupras
09c01c4a43 emul/z80: extract tms9918 unit from sms_vdp
I'm planning on supporting Text Mode soon, and SMS' VDP, when mode
4 is not active, behaves mostly like a regular TMS9918.

By having this behavior in a separate unit, we'll be able to use it
in other systems.
2020-11-12 11:13:18 -05:00
Virgil Dupras
2b8524d11e sms: CPORT_CTL is write-only!
why did I think that I could read from it?
2020-11-08 08:43:24 -05:00
Virgil Dupras
7d568bd782 sms: simplify and solidify ports-related drivers
Add _TRA!, _THA!, _TRB!, _THB! routines to easily handle those pins'
value without stepping on other pins like the drivers previously
did. For SDC driver, it's going to be important soon because it turns
out that I can't get away with "always on" CS, so I'll need a scheme
where it's important that TH/TR pins have stable values.
2020-11-02 18:53:57 -05:00
Virgil Dupras
ce10320030 emul/z80/sms: add SPI exchange through controller port
Theoretically, it works. I can access an emulated SD card on it.

Will it work on real hardware?

I've also made SMS emulation faster. It was unbearably slow for SDC
access.
2020-10-29 19:42:19 -04:00
Virgil Dupras
97a46a7b9b emul/z80: decouple SDC and SPI
My idea of plugging a RC2014 bridge directly onto a Sega Master System
cartridge doesn't work. The SMS eats all I/O addr space, we can't use
it. Therefore, this naive idea, in the emulator, of reusing sdc.c in
sms.c as-is, doesn't work either.

I'll have to find another way of communicating to a SPI device on the
SMS. I'll probably do it through a controller port. Meanwhile, I need
to decouple SPI from SDC in the emulator code so that I can reuse
sdc.c. This is what is done here.
2020-10-29 15:01:25 -04:00
Virgil Dupras
6947fea2a8 emul/z80: add SD card support to SMS
It works (in emulation, but soon on real hardware!), but the LIST
command is awkward due to tight screen estate...
2020-10-25 16:53:58 -04:00
Virgil Dupras
490eceab6d emul/z80: flatten directory structure
I'm about to reuse sdc.c in sms.c and the old directory structure
was becoming awkward.
2020-10-25 15:58:00 -04:00