![](https://s.togetter.com/static/web/img/placeholder.gif)
オープンデベロッパーズカンファレンス2020 Online NetBSDのご紹介&名古屋*BSDユーザグループ(NBUG)2020/12月例会の記録
![](https://s.togetter.com/static/web/img/placeholder.gif)
とりあえずで雑に sti_sgc_attach() の中でコンソールだったら ssc->sc_rom->iot = saa->saa_iot; ssc->sc_rom->memt = saa->saa_iot; の初期化をしてやるとフレームバッファコンソールでも mlterm-wscons 動くようになった。 pic.twitter.com/1vaXRy75nK
2020-12-18 02:33:03![](https://s.togetter.com/static/web/img/placeholder.gif)
![](https://s.togetter.com/static/web/img/placeholder.gif)
が、 mlterm-wscons 終了時にパレットがちゃんと元に戻らない。明示的にパレットを初期化するテストプログラムを走らせると元に戻る。これは WSDISPLAYIO_MODE_DUMBFB の状態でパレットいじっても WSDISPLAYIO_MODE_EMUL に戻すときの sti_init() でおかしくなるのだろうか
2020-12-18 02:36:18![](https://s.togetter.com/static/web/img/placeholder.gif)
early console の cnattach で bus_space_tag を渡すのは一時的な bus_space_map(9) のためだけというのが既存実装の定石に見えるけど、 sti_cnattach() から sti_rom_setup() を呼ぶのがイマイチなのか sti_rom_setup() で bus_space_tag と bus_space_handle を保存するのがイマイチなのか
2020-12-18 02:44:07![](https://s.togetter.com/static/web/img/placeholder.gif)
とりあえずコミットに向けてソースをゴソゴソ整理したのでテスト(ここで動かなくなる罠がよくある) pic.twitter.com/6luyPm72t0
2020-12-18 22:50:54![](https://s.togetter.com/static/web/img/placeholder.gif)
![](https://s.togetter.com/static/web/img/placeholder.gif)
sti_sgc の bus_space_tag 問題は com_dio.c とかを見直して sti_sgc.c 内に static struct bus_space_tag sticn_tag; を用意して sti_sgc_cnattach() で渡されてきた bst をそこにコピーするようにした。とりあえず許容範囲だと思いたい
2020-12-18 22:54:52![](https://s.togetter.com/static/web/img/placeholder.gif)
#OpenBSD/luna88k monochrome X server on nono(LUNA88K) on #OpenBSD/amd64. Still need to investigate some broken fonts, but it is fascinating! pic.twitter.com/t0TcSOGT5K
2020-12-18 23:38:39![](https://s.togetter.com/static/web/img/placeholder.gif)
![](https://s.togetter.com/static/web/img/placeholder.gif)
![](https://s.togetter.com/static/web/img/placeholder.gif)
うーん。 Xサーバーはちゃんと起動して映って終了できるのに mlterm-wscons では WSDISPLAYIO_MODE_DUMBFB と WSDISPLAYIO_MODE_EMUL の切り替えが動いたり動かなかったりする。なんなんだこれは……
2020-12-18 23:49:12![](https://s.togetter.com/static/web/img/placeholder.gif)
正しくは case WSDISPLAYIO_MODE_EMUL: if (scr->scr_wsmode != WSDISPLAYIO_MODE_EMUL) ret = sti_init(scr, STI_TEXTMODE); のように scr_wsmode が変更のときだけ更新
2020-12-19 00:11:09![](https://s.togetter.com/static/web/img/placeholder.gif)
#102 ひとまずひと通り動いてるっぽい。 pic.twitter.com/D8TSMoPEbA
2020-12-19 02:19:37![](https://s.togetter.com/static/web/img/placeholder.gif)
![](https://s.togetter.com/static/web/img/placeholder.gif)
![](https://s.togetter.com/static/web/img/placeholder.gif)
![](https://s.togetter.com/static/web/img/placeholder.gif)
![](https://s.togetter.com/static/web/img/placeholder.gif)
WIP diff for NetBSD 9.1 to support HP9000/425t SGC CRX framebuffer bitmap and color palette ops gist.github.com/tsutsui/65c712… だいぶいじったのと、 425e の EVRX のほうも修正しているので追ってテストする必要がある
2020-12-19 03:09:11![](https://s.togetter.com/static/web/img/placeholder.gif)
あと attr_alloc でエンコード情報をそのまま使わないフレームバッファの場合には反転その他の属性をどう書くのが妥当なのかよくわからない
2020-12-19 03:12:03![](https://s.togetter.com/static/web/img/placeholder.gif)
ちょっと考えたけれど alloc_attr の対応というか WSATTR_REVERSE の反転表示対応は OpenBSD そのままを持ってくるという形にはできないので別コミットにする
2020-12-19 09:49:38![](https://s.togetter.com/static/web/img/placeholder.gif)
wscons というか wsdisplay(9) の allocattr について man に The allocattr member defines a function for converting an attribute specification given by its foreground color, background color and flags, to the internal representation used by the underlying graphics driver. とある
2020-12-19 10:05:10![](https://s.togetter.com/static/web/img/placeholder.gif)
しかし "the internal representation used by the underlying graphics driver" と呼ぶには APIが VGAを始めとする Text VRAM方式の attribute RAM 構造に特化しすぎてて、 rasops(9) のような汎用ビットマップや sti(4) のような専用APIを呼ぶ時に色やBLINK等の属性情報を独立して取り出すAPIがない
2020-12-19 10:08:42![](https://s.togetter.com/static/web/img/placeholder.gif)
この点について OpenBSD は allocattr を packattr に改名した上で unpackattr というのを作っている。ただ、これもなんかイケてなくて、単純に fg を取り出す関数、bg を取り出す関数、属性(BLINKとか)を取り出す関数ないしマクロをそういうのが必要なドライバだけに提供するという方が良い気もする
2020-12-19 10:12:23![](https://s.togetter.com/static/web/img/placeholder.gif)
元の allocattr という名前は malloc() 的割り当てを想像させるのだけれど、実際にやっているのは色情報と属性情報を long 型の attr に押し込んでいるだけで、ここは OpenBSD のように pack とか enc とかのほうが適切。 実際、こんな感じに騙されているコメントがある nxr.netbsd.org/xref/src/sys/d…
2020-12-19 10:14:42![](https://s.togetter.com/static/web/img/placeholder.gif)
あと、 wsdisplayvar.h に定義されている struct wsdisplay_emulops でのメンバー名は allocattr なのに sti(4) では sti_alloc_attr() とアンダースコアが入っていて検索で惑わされる問題。まあ、これはローカルで直しても良いんだけど
2020-12-19 10:25:45![](https://s.togetter.com/static/web/img/placeholder.gif)
【MTG】NetBSDのご紹介 - セミナープログラム - オープンデベロッパーズカンファレンス(ODC)2020 Online event.ospn.jp/ODC2020-Online… 2020年12月19日(土) 14:00 〜 14:45
2020-12-19 10:42:09![](https://s.togetter.com/static/web/img/placeholder.gif)
NetBSD/hp300 CRX の差分をちょっと前の -current のソースに当ててビルドしてテスト。mlterm-wscons の起動もOK……と書こうとしたらなんか panic して再起動するんですけど(´・ω・`) pic.twitter.com/qSRDbl0dwn
2020-12-19 11:00:46![](https://s.togetter.com/static/web/img/placeholder.gif)
![](https://s.togetter.com/static/web/img/placeholder.gif)
![](https://s.togetter.com/static/web/img/placeholder.gif)
フレームバッファの操作をした瞬間に落ちているのではなくて、 mlterm-wscons の壁紙を描画し終わって shell が起動しようとするあたりで落ちたっぽいけど、これ wscons の変更と関係あるのか? pic.twitter.com/05gKjE28TY
2020-12-19 11:14:05![](https://s.togetter.com/static/web/img/placeholder.gif)
![](https://s.togetter.com/static/web/img/placeholder.gif)
[ 358.9157590] panic(26bf5b,0,0,f4f2b533,3) + c [ 359.0556990] trap(57eba88,8,505,31) + 268 [ 359.2456390] ptyfs_get_node(0,0,57ebb58,57ebbdc,8) + 50 wscons 関係ないですね。最近の修正で ptyfs 関係があったようなないような…… pic.twitter.com/smEEZHjvpR
2020-12-19 11:46:21![](https://s.togetter.com/static/web/img/placeholder.gif)
![](https://s.togetter.com/static/web/img/placeholder.gif)
"Reported by martin@ as crashes in ptyfs on Krups." mail-index.netbsd.org/source-changes… これかしらん
2020-12-19 11:54:36